Tools From Erland Sommarskog: sp_sqltrace and beta_lockinfo

You can simply to run this to get a resultset from sp_sqltrace:
EXEC sp_sqltrace ‘EXEC yourSP pVal’

Download link for these Tools from Erland Sommarskog, SQL Server MVP:

beta_lockinfo –
this will give you a snapshot of what is going on right, including current stored procedure and statement. You need to have at least VIEW SERVER STATE to run it.

sp_sqltrace –
This tool permits you to run a trace filtered for a certain process for a while (default 10 seconds) and then summarises the data. You need the same permissions as to run Profiler, but everything is executed server-side.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s