Find blocking spids/queries
Use the following script if not using sp_blitzwho
or sp_whoisactive
|
|
Find connections and running queries
List all active connections
sp_who2 active
- Bultin not much detailssp_whoIsActive
- Much more detailed lots of filtering options Download Linksp_BlitzWho
- Great Detail takes a bit longer to execute. Part of First responder kit Download Link
Get full query text for SPID
Both sp_whoIsActive
and sp_BlitzWho
provide the running query. However the following can be used with a SPID without external scripts.
|
|
Get Just the running portion of multiquery script from SPID.
|
|
SQL Diagnostic Connection
When troubleshooting SQL if the server is unresponsive and you are unable to connect via SSMS then you can use a Diagnostic connection.
Microsoft Documentation Link - Diagnostic Connection for Database Administrators
Steps for connection
- Open SSMS
- Close the Login Window
- Click File > New > Database Engine Query
- append
admin:
to the server name and login with valid SA level credentials