Changing Primary Keys for Existing Tables Containing Data
Hi, Running SQL Server 2008 R2 SP3. We are working on implementing some DDL changes with the goal of improving overall performance. Aside from indexing strategies we would like to change the data type of primary key columns from varchar to bigint. …

Using OPENROWSET to Export to .csv Not Inserting Rows
When I execute the code below in SSMS I receive the message X rows affected where X is the number of rows in mytable. When I open myfile.csv it remains empty except for the headers which were in the file prior to me executing the INSERT. Is there some…
Unexpected Plan Regression in SQL Server 2022 CU10 After Query Store Forced Plan Enabled
Hello After upgrading to SQL Server 2022 CU10, we noticed a sudden performance regression on a stored procedure that previously ran fine. We had Query Store enabled with a forced plan applied for stability & it was respected correctly until this…
How to fix MS SQL Server Express 2019 startup error?
Hi guys. I'm trying to install MS SQL Server Express 2019 on Windows 11. I did end up installing MS SQL Server Express 2019 and verified my installation using "where sqllocaldb" on Windows Cmd. However, I get error when I try "sqllocaldb…
SQL Installer
I downloaded the free software and I'm attempting to use SQL, but I'm getting an error message when trying to install it. Any solutions?
How to create a localDB
Dear all, once upon a time, I had good experiences with SQL Server. I was able to create a localDB out of the Management Studio. Nowadays it seems this not possible any longer. A colleague of mine gave me the following learning…
SQL Server 2019 replace() function does NOT replace char(30) with empty string properly
I ran across a funny bug in SQLserver 2019, when trying to replace char(30) (ascii character 30) in a string, with an empty string (effectively removing the char30 from the string), the replace() function also strips all trailing spaces in the string.…

A mistake in a training module
Module: Configure database authentication and authorization Unit: Describe security principal Seems like there is a mistake for equivalent of database roles: loginmanager and dbmanager and their equivalent on on-prem should be switched This question is…
Login failed for user [domain\computer name] reason could not find a login matching the name provided. [client <local machine>]
Hi, I know this is an old issue, but I have looked everywhere and still I'm stuck with this. I have a local instance of SQL 2022, (16.0.1135.2), in my development computer. The computer is on a domain and I'm able to login with Windows Authentication. I…
SQL on Always ON HA is on Suspect mode
We have one database in suspect status and one database in Initializing/in recovery. The application is Solarwinds and it fails to start unless the databases are in sync Anyone face that issue ?
Can only select both tables filter direction in SSAS tabular
Hi, I use the same SQL server database to do an import in Power BI Desktop as for my model created in SSAS Tabular SQL Server 2019 with Visual Studio 2019. My issue is in the create relationships. In Power BI Desktop I can do: In Visual Studio I…
Adding Conditional Not Null Constraint to Table
Hi, Running SQL Server 2008 R2. DDL below: CREATE TABLE [dbo].[Test] ( [TestID] [bigint] NOT NULL IDENTITY, [Column1] [varchar](50) NOT NULL, [Column2] [varchar](50) NULL, [Column3] [varchar](50) NULL, [Flag] [bit] NOT NULL, CONSTRAINT…
Shrinking Production Database Post-Transition
Hi, Running SQL Server 2008 R2. We are in the process of planning a change to a database to use integer-based primary keys instead of character-based primary keys. The update process works in our test environment, but as a result we end up with a…
How to install SQL Server 2022 on Ubuntu Server 24.04 LTS
I couldn't find a proper way to install SQL Server 2022 on Ubuntu Server 24.04 LTS. I tried to use Microsoft SQL Server 2022 from the Ubuntu 22.04 repository, but I couldn't run the service correctly. I'm done with this state of service (see printout).Is…
[SQL Server 2019 Standard]Order history now shows, but missing download link and product key
Hello, I am currently having trouble downloading SQL Server 2019 Standard that I purchased from the Microsoft Store(https://www.microsoft.com/). The purchased item is certainly displayed in my order history, but I cannot find the download link or product…
SQL server lift and shifted to Azure is using 100% cpu
HI, SQL server lift and shifted to Azure is using 100% cpu. when I check activity monitor everyday different SQL select statement is using the high CPU. sometimes it is as simple as select get date(). Please let know how can I find what is causing the…
SQL Server Setup Error 2147467259 - The system cannot find the path specified
Hello, I am trying to install SQL Server 2022 on my Windows 10 Pro system using the EXE installer. I chose to install it on Drive D: as an adminstrator but the setup fails with the following error: Unable to install SQL Server (setup.exe) Exit code…
SQL Server 2022 CU18 Crashing with EXCEPTION_ACCESS_VIOLATION
SQL Server 2022 CU18 is experiencing crashes approximately 1-2 times a month since installation. The error log shows the following message: 2025-03-18 08:20:04.77 spid70 SqlDumpExceptionHandler: Process 70 generated fatal exception c0000005…
Add-Migration works, but Update-Database says "no migrations to update". I tried deleting the Mig.. Folder
Visual Studio and EF Core problem. Migrations don't work. Add-Migration Title works to update the schema, but Update-Database in NuGet Command Console says that the db is already up to date, but the db does not have my new table in it. I tried…
I have been trying to install SQL Server 2022 Developer edition on windows 11, still so far no success
Detail.txt Hi, i have trouble installing SQL server on windows 11. did mentioned steps as well to troubleshoot, still no success. …