335 questions with SQL Server Database Engine tags

Sort by: Updated
0 answers

Long running query that occurs every 3 hours, can't tell WHERE it is coming from

There is a query running every three hours that spikes my DTU upto 100% . It is: subscriptions - Query ID 10126 I can not tell who or what is calling this query, how could find out what it is? This is my…

SQL Server Database Engine
asked 2025-08-28T23:18:51.15+00:00
Len Ott 25 Reputation points
2 answers

Cores Per Socket Best Practices for VMs

Hello, What configuration offers better performance for SQL Server Enterprise Edition Running on virtual machines like VMWare: multiple sockets with one core each (e.g., 8 sockets, 1 core per socket) or a multi-core setup (e.g., 1 socket, 8 cores)?…

SQL Server Database Engine
asked 2025-07-22T19:08:33.1466667+00:00
Wallace, Glenn 20 Reputation points
commented 2025-08-28T16:41:47.5533333+00:00
Ben Miller-(DBADuck) 195 Reputation points MVP
1 answer

I have a 2019 SQL database which is the primary, I want to set up a secondary server using logshipping. What is the highest version on SQL server I can install. Upgrading the primary is not an option.

The supplier has a transactional database that is on a SQL 2019 server. They provide us a reporting copy using logshipping. We would like to install the latest possible version of SQL server that would be compatible. Will be able to get away with a SQL…

SQL Server Database Engine
asked 2025-08-28T12:47:25.7833333+00:00
Shipra Bajpai NHS 0 Reputation points
answered 2025-08-28T15:08:51.2166667+00:00
Bruce (SqlWork.com) 79,526 Reputation points Volunteer Moderator
1 answer

Cannot connect to SQL Server - username issue

Trying to connect to SQL Server and getting "Login failed for user '<username>'. (Microsoft SQL Server, Error: 18456). My other colleagues are using the same credentials to log in with success. Don't know what else to do.

SQL Server Database Engine
asked 2025-08-26T15:19:50.46+00:00
Hugo Mendonca 0 Reputation points
commented 2025-08-28T06:27:10.5166667+00:00
Erland Sommarskog 124.9K Reputation points MVP Volunteer Moderator
1 answer

Performance degrade after migrating to SQL server 2022

Application performance degraded by 15-20 % after moving the database from SQL server 2019 to 2022 on a stand alone server. The resources and maintenance remains the same as the 2019.

SQL Server Database Engine
asked 2025-08-27T13:56:31.7266667+00:00
Ginesh 0 Reputation points
answered 2025-08-27T21:28:12.16+00:00
Erland Sommarskog 124.9K Reputation points MVP Volunteer Moderator
1 answer

Can I safely use NORECOVERY option when restoring a database by a BAK file?

Hello, I am trying to extract the data from a customer-provided BAK file and then discard the SQL server container after. I am using the syntax below. RESTORE DATABASE [ABC123] FROM DISK = '/var/opt/mssql/data/ABC123.bak' WITH MOVE 'ABC123.mdf'…

SQL Server Database Engine
asked 2025-08-22T21:26:12.3866667+00:00
dave 0 Reputation points
commented 2025-08-27T21:02:13.0733333+00:00
Erland Sommarskog 124.9K Reputation points MVP Volunteer Moderator
1 answer

SQL 2025 release candidate - 180day expiration too for (free edition) express version?

SQL 2025 release candidate - 180day expiration too for (free edition) express version?

SQL Server Database Engine
asked 2025-08-27T07:20:53.24+00:00
Salka, Milan 21 Reputation points
edited an answer 2025-08-27T17:39:42.6766667+00:00
Bruce (SqlWork.com) 79,526 Reputation points Volunteer Moderator
1 answer

installation Signing Certificate Authority pour MSSQL.

Il semble que le problème ne soit pas lié à l'application, mais plutôt à SQL Server qui tombe en panne. Ainsi, si MM Server et Client sont en cours d'exécution et que SQL Server tombe en panne, MM Client ne peut pas charger/actualiser les données de la…

SQL Server Database Engine
asked 2025-08-26T16:46:04.66+00:00
ANDRE CONGO 0 Reputation points
answered 2025-08-26T21:38:45.5433333+00:00
Erland Sommarskog 124.9K Reputation points MVP Volunteer Moderator
3 answers

Best practice with sp_syspolicy_events_reader and ##MS_PolicyEventProcessingLogin##

The SQL Server logs on our primary replica (Microsoft SQL Server 2022 with Always On) has been filling up with this repeated message: The activated proc '[dbo].[sp_syspolicy_events_reader]' running on queue 'SQLAG1_msdb.dbo.syspolicy_event_queue'…

SQL Server Database Engine
asked 2025-08-05T14:53:19.4333333+00:00
anna@tec 0 Reputation points
answered 2025-08-26T20:36:57.6366667+00:00
Erland Sommarskog 124.9K Reputation points MVP Volunteer Moderator
1 answer

"Is it okay to run Ola Hallengren’s index rebuild and stats update script from a separate database instead of master, and will this impact fragmentation handling?"

In my organisation, we run Ola Hallengren’s index rebuild and update stats script on a separate database instead of the master database. Is this a recommended practice, and will it affect index fragmentation or reorganisation?"

SQL Server Database Engine
asked 2025-08-26T18:17:37.55+00:00
N B 0 Reputation points
edited an answer 2025-08-26T19:56:26.97+00:00
Alberto Morillo 34,926 Reputation points MVP Volunteer Moderator
1 answer

How to simulate "DB Offline Errors" in SQL server

The SQLServer:SQL Errors object provides counters to monitor errors in Microsoft SQL Server. I wanted to get the DB Offline Errors metric value through performance counters. when i set a particular database offline the offline event is showing as User…

SQL Server Database Engine
asked 2025-08-25T10:39:27.6+00:00
Joice Joy 20 Reputation points
answered 2025-08-25T21:05:27.68+00:00
Erland Sommarskog 124.9K Reputation points MVP Volunteer Moderator
2 answers

Patching is breaking the Master Database of SQL Server Installed

Hello, I am operating Microsoft SQL Server 2019 Enterprise Edition within our environment. One of our SQL Server instances, which is hosted on a virtual machine (VM), has SQL Server Integration Services (SSIS) installed. We’ve encountered a recurring…

SQL Server Database Engine
asked 2025-07-29T17:16:10.94+00:00
Tendongho, Charles 0 Reputation points
edited an answer 2025-08-25T20:44:13.19+00:00
Erland Sommarskog 124.9K Reputation points MVP Volunteer Moderator
3 answers

Using Parallels, am I able to run MS SQL Server 2019 Dev Edition on a Macbook Pro M1?

Hello all, I'm currently a student and need to have this software for my class. My professor warned us that Macbook users with apple chips are unable to use these programs. I already have Parallels installed but I'd like to get the communities' input.…

SQL Server Database Engine
asked 2025-08-22T20:04:59.77+00:00
David J. Castellanos 0 Reputation points
edited an answer 2025-08-25T19:30:23.2333333+00:00
Bruce (SqlWork.com) 79,526 Reputation points Volunteer Moderator
1 answer

How to fix transactional replication latency

Good Morning All, We are facing replication latency issue. I checked for blocking, long running transactions or bulk operations running. I tried re-running the distribution agent job also. But still the latency exists. Could you please tell me what all I…

SQL Server Database Engine
asked 2025-07-19T08:52:14.89+00:00
Chaitanya Kiran 801 Reputation points
answered 2025-08-25T15:39:39.4866667+00:00
Kumarasamy, Selvaputthiran 0 Reputation points
1 answer One of the answers was accepted by the question author.

Cannot connect to MS SQL Server. "encrypt" property is set to "false" and "trustServerCertificate" property is set to "false"

Hi all, Im trying to connect to MSSQL server (enabled with forced encryption and which uses a self signed certificate) from a java application using the sql jdbc connection. But unfortunately im getting the following error even though i set enabled=false…

SQL Server Database Engine
asked 2025-08-12T15:44:49.2666667+00:00
Joice Joy 20 Reputation points
accepted 2025-08-25T10:33:32.7366667+00:00
Joice Joy 20 Reputation points
2 answers One of the answers was accepted by the question author.

how to fix

I’ve tried downloading and reinstalling many times, and this error keeps appearing. I even tried using AI to help with the installation, but everything failed. Error detail Action required: Use the following information to resolve the error, and then…

SQL Server Database Engine
asked 2025-08-22T08:55:20.9033333+00:00
Khiêm 20 Reputation points
accepted 2025-08-24T14:34:35.8933333+00:00
Khiêm 20 Reputation points
2 answers

Microsoft SQL Server 2022 process: 'SQL Server Windows NT - 64 Bit' keep CPU on 100% usage

I have installed on my computer an instance of Microsoft SQL Server version 2022. The process: SQL Server Windows NT - 64 Bit keeps my CPU usage to 100% all the time even is nothing running on the server. What can I do to trace what is wrong with…

SQL Server Database Engine
asked 2025-08-22T10:15:58.3766667+00:00
Victor Savinescu 0 Reputation points
commented 2025-08-23T10:06:12.93+00:00
Victor Savinescu 0 Reputation points
0 answers

Did VMWare Tools break msdb?

Had a VMWare Tools upgrade from 12.5.1.52451 to 12.5.3.52671. The SQL servers were not rebooted after the upgrade was pushed. Weeks later after the SQL servers were rebooted, many of the instances came back up with msdb in a recovery pending state. We…

SQL Server Database Engine
asked 2025-08-21T20:33:52.62+00:00
bukkybu 386 Reputation points
edited the question 2025-08-23T01:04:52.97+00:00
bukkybu 386 Reputation points
1 answer

How to verify which user applied the cu patches on SQL servers in organization's.

How to verify which user applied the cu patches on SQL servers in organization's.

SQL Server Database Engine
asked 2025-08-22T04:29:49.27+00:00
Anandhswarupp 205 Reputation points
answered 2025-08-22T20:49:41.95+00:00
Erland Sommarskog 124.9K Reputation points MVP Volunteer Moderator
1 answer

How to correct the CU20 - KB5063814 security SQL patching failure

We are trying to apply the security SQL patching - KB5063814 into an Azure SQL2022 instance; however, the patching is failed during the installation and we cannot even bring the SQL instance backup. Finally, we decided to restore the disks backup (good…

SQL Server Database Engine
asked 2025-08-20T19:32:30.9+00:00
Luk, Ben 0 Reputation points
commented 2025-08-22T19:57:12.5433333+00:00
Luk, Ben 0 Reputation points