2. Trace flag (trace flag) 3604, 3605 output DBCC command result

Source: Internet
Author: User
Tags server error log

trace flag:3604

Function:

    • The output DBCC command returns results to the query window (usually the SSMs window), similar to the display of the Print command;

Use:

    • Often used to get the output of the DBCC IND, DBCC PAGE command, because these 2 commands do not output any results by default.

Example:

 UseMasterGO--turn on trace flag 3604DBCCTRACEON (3604)--View page: (1,1,10) dbid 1 (master), file ID 1, pageDBCCPAGE (1,1,Ten)--turn off trace flag 3604DBCCTraceoff (3604)--Unable to view page: (1,1,10) dbid 1 (master), file ID 1, pageDBCCPAGE (1,1,Ten)

trace flag:3605

Function:

    • The output DBCC command returns results to the SQL Server error log (errorlog);

Use:

    • Often used to get the details of deadlocks, because when the deadlock information is fetched, it often turns on 1204, 1222 global trace flag: DBCC TRACEON (1222,-1);
    • In fact, DBCC TRACEON (1222,-1) = DBCC TRACEON (3605,1222,-1), the trace flag of a deadlock, is output to the error log by default;

Example:

 UseMasterGO--turn on trace flag 3605DBCCTRACEON (3605)--View page: (1,1,10) dbid 1 (master), file ID 1, pageDBCCPAGE (1,1,Ten)--results are saved in the error log, not displayed in the query windowexecXp_readerrorlog0,1N"'N"',NULL,NULLN'DESC'

Summary:

(1) Trace markers 3604 and 3605, which can be used to control how the DBCC command returns the result of printing;

(2) Usually only view DBCC command results, do not need to turn on global trace flag-1;

(3) These two trace marks are not officially documented.

2. Trace flag (trace flag) 3604, 3605 output DBCC command result

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.