By default, each SQL Server 2000 (I'm using SP3a) SPID has a Transaction Isolation Level of 'READ COMMITTED'. You can easily check your own Transaction Isolation level by executing DBCC USEROPTIONS. You will see isolation level in the set option column, and its current setting in the Value column. This will show up only if you execute SET TRANSACTION ISOLATION LEVEL 'nnn'. If you do not see this row, then you are running at the default isolation level of READ COMMITTED. DBCC USEROPTIONS is good only for your own spid.
But now you ask, how do I check the isolation level of other users (other SPIDs)? Sorry, DBCC USEROPTIONS cannot do this. The way aound this is to use the undocumented DBCC PSS command. You will need to turn on traceflag 3604 to see the results of DBCC PSS. The parameters are uid, spid.
DBCC PSS(uid [, spid]) [i.e. DBCC PSS(1,65) ]
After executing this, look for isolation_level in the text. The values for this are:
1 - READ UNCOMMITTED 2 - READ COMMITTED 3 - REPEATABLE READ 4 - SERIAZABLE 0 - CHAOS - (system processes only, not settable on user spids)There you have it, with these commands you will be able to check the isolation level of any SPID on your Microsoft SQL Server.
For More Information
- Feedback: E-mail the editor with your thoughts about this tip.
- More tips: Hundreds of free SQL Server tips and scripts.
- Tip contest: Have a SQL Server tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize -- submit your tip today!
- Ask the Experts: Our SQL, database design, SQL Server, DB2, and data warehousing gurus are waiting to answer your toughest questions.
- Forums: Ask your technical SQL Server questions--or help out your peers by answering them--in our active forums.
- Best Web Links: SQL Server tips, tutorials, and scripts from around the Web.