How to check how many Traces are enabled on the server and how traces are set (globally or session)
In SQL Server, there are two types of trace flags: session and global. Session trace flags are active for a connection and are visible only for that connection. Global trace flags are set at the server level and are visible to every connection on the server.
The following example displays the status of all trace flags that are currently enabled globally.
DBCC TRACESTATUS(-1); GO
The following example displays the status of trace flags 2528 and 3205.
DBCC TRACESTATUS (2528, 3205); GO
The following example displays whether trace flag 3205 is enabled globally.
DBCC TRACESTATUS (3205, -1); GO
The following example lists all the trace flags that are enabled for the current session.
DBCC TRACESTATUS(); GO