I’ve noticed that when viewing query results in a grid in SQL Server Management Studio, it often causes resource locking on the server, preventing other queries from running. Why does this happen, when I’m only opening the table for viewing and not for editing? Disconnecting the query window from the server releases the resources. I assume it doesn’t happen when I return the results as text, but I haven’t tested this yet.
What is the best practice for using query windows in SSMS?
What type of “resource locking on the server”? Running a
SELECTquery will hold read locks (that is normal behaviour).Read locks do not prevent other simple reads (SELECTs) from occurring.
Do you have other transactions occurring than have a
SERIALIZABLEisolation level?