DBCC TRACEOFF 3604

Urantia 0 Reputation points
2025-11-18T14:52:31.8666667+00:00

Good afternoon

SQL 2022 Standard

I would like to better understand:

  1. DBCC TRACEOFF 3604
  2. DBCC TRACEON 3604

How to use it?

How to activate it?

How and when should it normally be used?

Thank you

Urantia

SQL Server | SQL Server Transact-SQL
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 128.6K Reputation points MVP Volunteer Moderator
    2025-11-18T17:39:13.3866667+00:00

    For some DBCC commands, output is only written to the SQL Server errorlog by default. If you also want the output in SSMS, you need to enable TF 3604.

    I'm not sure in which DBCC commands this applies to. It may be a thing of the past, so that there are no such DBCC commands any more - at least not documented once. I cannot recall having seen any reference to TF3604 for a long time.

    1 person found this answer helpful.

  2. Q&A Assist
    2025-11-18T14:52:56.8366667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more
    1. DBCC TRACEOFF 3604: This command is used to disable the trace flag 3604. When trace flag 3604 is enabled, it allows the output of certain DBCC commands to be printed to the console, which can be useful for debugging and monitoring purposes. Disabling it with DBCC TRACEOFF 3604 will stop this output.
    2. DBCC TRACEON 3604: This command enables trace flag 3604, allowing the output of DBCC commands to be displayed in the console. This is particularly useful when you want to see detailed information about the execution of certain commands, such as DBCC PAGE or DBCC CHECKDB.

    How to Use It:

    • To activate trace flag 3604, you would run the following command in your SQL Server Management Studio (SSMS):
        DBCC TRACEON(3604);
      
    • To deactivate it, you would run:
        DBCC TRACEOFF(3604);
      

    When to Use It:

    • DBCC TRACEON 3604 is typically used when you are troubleshooting or debugging issues in SQL Server. It can provide valuable insights during the execution of certain DBCC commands, helping you understand what is happening internally.
    • DBCC TRACEOFF 3604 should be used after you have gathered the necessary information and no longer need the detailed output to avoid cluttering the console with unnecessary messages.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.