SQL server

DBCC opentran and inputbuffer.

DBCC stands for Data Base Console Commands. I am going to list some useful DBCC commands that I came across:

DBCC opentran or DBCC opentran(‘database_name’). This command will show all the open transactions for the database.

DBCC inputbuffer (SPID#). Enter the SPID of the session and you can see [part of] the SQL text pertaining to that SPID.

dbcc page ( {‘dbname’ | dbid}, filenum, pagenum [, printopt={0|1|2|3} ]) eg: DBCC PAGE (master,1,1,0); This is an undocumented command and revels information stored in the page of a database. Turn on the trace flag 3604: dbcc traceon(3604) to redirect the output to screen (instead of the error log).

Advertisements
Standard

Thinking about someting? Leave a Reply...

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s