Thread: SQL Server 2005
View Single Post
  #45 (permalink)  
Old 11-30-2007, 05:08 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Dbcc Traceon , Dbcc Traceoff , Dbcc Tracestatus

DBCC TRACEON - Enable trace flags.
DBCC TRACEOFF - Disable trace flags.
DBCC TRACESTATUS - Display the status of trace flags.

Syntax
DBCC TRACEON ( trace# [ ,...n ][ , -1 ] ) [WITH NO_INFOMSGS]

DBCC TRACEOFF ( trace# [ ,...n ] [ , -1 ] ) [WITH NO_INFOMSGS]

DBCC TRACESTATUS ( [ [trace# [,...n ] ] [,] [-1] ] ) [WITH NO_INFOMSGS]

Key:

trace# - Number of the trace flag(s)
-1 - Display the status of trace flags that are enabled globally.
NO_INFOMSGS - Suppress all information messages.

By default all trace flags that are enabled for the session are displayed.

Examples

-- Turn flag on
DBCC TRACEON (3205)
GO
-- Turn flag on globally
DBCC TRACEON (2528, -1)
GO
-- Turn flag off
DBCC TRACEOFF (3205);
GO
-- Show flag status
DBCC TRACESTATUS (2528, 3205)
GO
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Reply With Quote