r/SQLServer • • Sep 10 '25

Discussion Sql server 2019 installed on hyper-v 2019

Thumbnail reddit.com
1 Upvotes

r/SQLServer • • Sep 09 '25

Solved Increasing connection time-out in SQL Server Management Studio?

4 Upvotes

I'm running a long SQL program in SSMS that is taking > 24 hours to run, and am finding my session times out if left running more than a few hours & I lose my work. (A separate issue: the IT in my company only lets us create temporary tables, not permanent, on the SQL server.)

Clicking on File -> Connect Object Explorer... -> Options>>, I see the default connection time-out setting is only 30 seconds, which seems pretty low.

Can we increase connection time-out setting from 30 seconds to an arbitrarily large value to prevent time-outs?


r/SQLServer • • Sep 07 '25

Discussion Request: ELI5 "SPNs"

11 Upvotes

TL;DR background: 40+ years in IT, 25 in "SQL Server" (10 as SQL dev, 15 as some form of DBA).

Having come up thru the DEV ranks, I was more concerned with the coding/optimization/design/etc side than anything related to the infrastructure side (network, security, hardware, etc). Obviously I've picked up a log of infra knowledge along the way, but there's one thing I've just not been able to wrap my head around -- at least not well enough that I could explain it to someone.

SPNs.

I know how to use SETSPN -L MyDomain\ServiceAcct to get a list of SPNs, and I know how to use

SETSPN -S MSSQL\MyServer.fqdn.com:49001 MyDomain\ServiceAcct SETSPN -S MSSQL\MyServer:49001 MyDomain\ServiceAcct SETSPN -S MSSQL\MyServer.fqdn.com:MyInstance MyDomain\ServiceAcct SETSPN -S MSSQL\MyServer:MyInstance MyDomain\ServiceAcct

As needed to add "missing" entries.

But I don't know -- at an "instinctual" level -- what that actually means, under the hood so to speak. Not like I instinctually know, e.g., what a clustered index is.

So... can anyone with decent network/security knowledge/experience explain this, in plain English? Or point me to a link which accomplishes that?

Thanks in advance!


r/SQLServer • • Sep 07 '25

Solved Help me restore a file in ssms 2022

0 Upvotes

I literally don't know anything about sql, im trying to restore a deleted file but could only find the .bak version. Im trying to restore it through sql ssmss 2022, my libreoffice says it's in c:\users\jdn\AppData\Roaming\LibreOffice\4\user\backup\immortal sin_stigmata.docx.bak. when I try to look for it in ssmss, I go to c:users\jdn but none of the following folders appear.

I made a copy of the bak file and put it in my SD card which is currently connected to the computer, when I click ok it says the media family on device D:\docs\database\immortal sin_stigmata.docx.bak is incorrectly formed. Sql server cannot process this media family. Restore headeronly is terminating abnormally. (Microsoft sql server, error:3241)

What am I supposed to do? And could I get the file back to how it was?


r/SQLServer • • Sep 06 '25

Community Share Learn SQL via typing practice

19 Upvotes

Hi 👋

I'm a software engineer on TypeQuicker.

Most of my previous jobs involved working with some SQL databases and throughout the day, I would frequently need to write (relatively) long and complex queries quickly. Writing queries without having to look up certain uncommon keywords became a cause of friction for me.

In the past I used Anki cards to study various language keywords - but I find this makes it even more engaging and fun!

Helpful for discovery, learning and re-enforcing your SQL skill (or any programming language or tool for that matter)

Hope this helps you! (you can also use custom code - so any queries you write a lot can be practiced here)


r/SQLServer • • Sep 05 '25

Community Share Microsoft listened. GitHub Copikot is coming to SSMS!

27 Upvotes

The most recent comment here has an article explaining why it’s coming. This is exciting news and encouraging that Microsoft is listening and taking action based on customer feedback.

https://developercommunity.visualstudio.com/t/Copilot-in-SSMS-does-not-support-using-G/10907218


r/SQLServer • • Sep 06 '25

Question Azure data factory behaving differently for different sql server

2 Upvotes

So we use azure data factory to fetch the data from Salesforce and dump into our database . We have two database one azure managed sql server and on sql server locally installed on a vm .

So when we dump the data in azure managed sql server the decimals are getting truncated and in vm local db they are getting rounded off

The table and column structure is same on both side

Decimal (18,2 )

For example if values is 124.566 in Salesforce it is coming as

In azure managed sql server- 124.56 And in vm sql server - 124.57

Does anyone know what is causing this inconsistent behavior

Ps : The pipeline of adf is same in both case I cloned the original pipeline and just changed the dumping db that's it


r/SQLServer • • Sep 04 '25

Question In memory heap tables - Is it possible

2 Upvotes

I have a database that is used to import data, compare it to data/ update data in a different database and then the data is deleted. This happens hundreds of times per day. For various reasons, I want to us in-memory tables for the tables used for the import. These tables do not need indexes or primary keys. Can I create in-memory heap tables? I hate to add constraints to these tables, as it could slow down the import process. I'm using MSSQL 2019, but I am porting it to MSSQL 2022 shortly.


r/SQLServer • • Sep 03 '25

Question Sql server utilization increased from 40 % to 60%

6 Upvotes

Hi we have sql server where cpu use to range between 30-40% .But for last 2 days it has been in range 60% and higher .We have checked and its mostly sql server .How to check query which is causing higher cpu utilization. I see many query running there is no pattern to it

I have checked below link https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/performance/troubleshoot-high-cpu-usage-issues

should i run current one or should i execute query which gave historical ones

Also i have doubt , in query which outputs current one does ordering by cpu time desc gives right query ?

Also we have process tracking which trakes and dumps long running query in tables. IN those i am seeing various query with last waittype sos_scheduler_yield , pageIolatchIO_** and some times those related to locks....

So in high cpu case should i target those query which has lastwaitype as sos_scheduler_yield or should I also target pageIolatchIO_** ....

is sos_scheduler_yelid purley related to CPU while pageIOlatch isn`t ? wont query with pageIOLatch wont increase CPU usage ?