Problem solve Get help with specific problems with your technologies, process and projects.

Get status information for trace flag(s) currently turned on

The command DBCC TRACESTATUS can be used to get the status information for a particular trace flag currently turned on.

The command DBCC TRACESTATUS can be used to get the status information for trace flag(s) currently turned on. Here...

is the syntax:

DBCC TRACESTATUS (trace# [,...n])
To get the status information for all trace flags currently turned on, use -1 for the trace#.

Here is an example:

Use the DBCC TRACEON command to turn on the specified trace flag.

DBCC TRACEON (trace# [,...n])
To turn off the specified trace flag(s), use the DBCC TRACEOFF command.

DBCC TRACEOFF (trace# [,...n])

For More Information

  • What do you think about this tip? E-mail the editor at with your feedback.
  • The Best SQL Server Web Links: tips, tutorials, scripts, and more.
  • Have an SQL Server tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize--submit your tip today!
  • Ask your technical SQL Server questions--or help out your peers by answering them--in our live discussion forums.
  • Check out our Ask the Experts feature: Our SQL, Database Design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.

This was last published in February 2005

Dig Deeper on .NET Development for SQL Server

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.