Thursday, June 27, 2013

dbcc traceon/traceoff

dbcc traceon(302) redirects output to client rather than logs.  dbcc traceon(302) is often used in conjunction with dbcc traceon(310), which provides more detail on the optimizer’s join order decisions and final cost estimates. dbcc traceon(310) also prints a “Final plan” block at the end of query optimization. To enable this trace option also, use:
dbcc traceon(3604, 302, 310)
To turn off the output, use:
dbcc traceoff(3604, 302, 310)

No comments:

Post a Comment