|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, March 21, 2011 9:28 AM
Points: 10,
Visits: 41
|
|
In SQL 2005 Configuration Manager, if I want to turn on multiple trace flags for sqlservr, what is the correct syntax? For example if I want to have trace # 1204 and 1222 both on when SQL Server starts, do I use -T1204 -T1222 or -T1204,1222 or something else?
Thanks for your input.
Nate
Nate TeWinkel UFS Inc. - DBA / Operations Analyst / Programmer
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, September 21, 2011 1:19 PM
Points: 933,
Visits: 1,016
|
|
I don't know if that is possible Nate...
But... isn't 1222 only isn't enough? They both return full information; only thing is 1222 returns information in XML format.
1204: Returns the resources and types of locks participating in a deadlock and also the current command affected.
Scope: global only
1222: Returns the resources and types of locks that are participating in a deadlock and also the current command affected, in an XML format that does not comply with any XSD schema.
Scope: global only
Thanks.
---
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog. Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding... * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. 
How to ask for help .. Read Best Practices here.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, March 21, 2011 9:28 AM
Points: 10,
Visits: 41
|
|
In the Books Online, under Trace flags [SQL Server]:deadlocks it says "It is possible to enable both trace flags to obtain two representations of the same deadlock event."
I'm trying to troubleshoot some deadlock issues and that is when I saw that comment. I am really just using these two as an example. Whether it is these two or combinations of any of the trace flags, I am curious as to what the actual syntax is to do multiple trace flags.
Nate TeWinkel UFS Inc. - DBA / Operations Analyst / Programmer
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 9:58 AM
Points: 1,097,
Visits: 2,137
|
|
NateT (3/11/2009) In the Books Online, under Trace flags [SQL Server]:deadlocks it says "It is possible to enable both trace flags to obtain two representations of the same deadlock event."
I'm trying to troubleshoot some deadlock issues and that is when I saw that comment. I am really just using these two as an example. Whether it is these two or combinations of any of the trace flags, I am curious as to what the actual syntax is to do multiple trace flags.
Yes, you can use both but it is hard to analyze a deadlock issue with the graph generated by 1204. Enable 1222 will give you clear picture and also TSQL statements causing the deadlock issue. If you have any torubles, post the output of 1222, we would be able to help you out.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, March 21, 2011 9:28 AM
Points: 10,
Visits: 41
|
|
Yes, I have turned on one of the trace flags and I'm beginning to examine what is causing the deadlocks.
However, that is not what this post is about.
I would like to know how to turn on multiple global trace flags at startup with the -T option. I should have used a more generic example of mythical trace flags 1111 and 9999. How do I enable two (or more) of the trace flags at startup?
Thank you.
Nate TeWinkel UFS Inc. - DBA / Operations Analyst / Programmer
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 10:19 AM
Points: 4,505,
Visits: 9,197
|
|
if doing it via configuration manager:
;-T1204;-T1222
add that to the end of current startup parameters. You should see the flags referred to in the errorlog when SQL is restarted
If you want to enable them without restarting SQL
DBCC TRACEON(1204,1222,-1)
the -1 means enable for all sessions.
to check use DBCC TRACESTATUS(-1)
to turn off
DBCC TRACEOFF(1204,1222,-1)
using 1204 and 1222 just as an example
---------------------------------------------------------------------
proud member of the 'et al' fraternity.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 9:58 AM
Points: 1,097,
Visits: 2,137
|
|
NateT (3/11/2009)
I'm trying to troubleshoot some deadlock issues and that is when I saw that comment.
My apologies, but I was trying to give more insight into your troubleshoot just an extra info.
|
|
|
|
|
One Orange Chip
          
Group: Administrators
Last Login: Today @ 4:06 PM
Points: 29,496,
Visits: 11,673
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 9:58 AM
Points: 1,097,
Visits: 2,137
|
|
Steve Jones - Editor (3/11/2009) http://msdn.microsoft.com/en-us/library/ms187329.aspx
You can include 1..n trace flags with DBCC TRACEON
OP was wanting solution at the startup steve:)
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, March 21, 2011 9:28 AM
Points: 10,
Visits: 41
|
|
Thank you, George. That's what I was looking for. Since I didn't see any specific syntax for the -T it would make sense that it would have to be added a second time with the next flag to turn on.
Nate TeWinkel UFS Inc. - DBA / Operations Analyst / Programmer
|
|
|
|