|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 5:02 AM
Points: 2,365,
Visits: 1,825
|
|
nice article.
Is the deadlock info persisted after server/sql service restart.
"Keep Trying"
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
|
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:07 AM
Points: 229,
Visits: 257
|
|
Can you alter the default system_health default session?
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
|
|
Jonathan Kehayias (2/23/2009) You can however, alter the system_health session and add a asyncronous_file_target to it which will log the information to a file on disk which will survive service restarts.
As I covered in my first response, yes you can alter the default system_health session, though beyond adding a file target, I personally wouldn't change it, I would instead create a new session to handle whatever events I am interested in looking at. You can also drop it if you don't want it to exist at all. If you mess it up, you won't be capturing the information that the CSS team may want in troubleshooting a problem which may cause delays in your support case if they request that you recreate the system_health session from script.
The script that created this session is located in the InstallPath\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Install folder in the u_tables.sql file. It is at the very bottom of the file. So if you do play with this session and screw it up, you can fix it by running the script from that file.
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008 My Blog | Twitter | MVP Profile Training | Consulting | Become a SQLskills Insider Troubleshooting SQL Server: A Guide for Accidental DBAs
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:07 AM
Points: 229,
Visits: 257
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Today @ 3:16 AM
Points: 10,
Visits: 140
|
|
Hi,
you can use SQL Agent with WMI alert to capture and log deadlocks it works beautifully in SQL2005 and hope should work in SQL2008 see http://msdn.microsoft.com/en-us/library/ms186385.aspx for more details.
Rama Mathanmohan
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
|
|
rama.mathanmohan (2/23/2009) Hi,
you can use SQL Agent with WMI alert to capture and log deadlocks it works beautifully in SQL2005 and hope should work in SQL2008 see http://msdn.microsoft.com/en-us/library/ms186385.aspx for more details.
Rama Mathanmohan
WMI alerts are still there, but you have to turn them on, and they have a considerable cost when compared with Extended Events and the system_health session which is running by default. The cost to fire an event in Extended Events is 2 thousands of a millisecond (2us) which is insignificant when compared with the 2-3% CPU cost for the WMI deadlock monitor. The difference is that the event is buffered to the ring_buffer target asynchronously as the event fires instead of having to be read from the WMI Eventing and then processed by triggering a job. There is also consider problems with setting up WMI alerts in some environments for varying reasons. You can search the Administering forum on here and find a number of people having WMI namespace problems configuring the alerts like the following:
"The @wmi_query could not be executed in the @wmi_namespace provided. Verify that an event class selected in the query exists in the namespace and that the query has the correct syntax."
Extended Events are the future of troubleshooting SQL Server, so if you are on SQL Server 2008, I'd advise to utilize it over an older construct like WMI Alerts, Trace Flags, or Profiler Traces, all of which I have written about previously. They were all good methods of doing things in SQL 2005, but they don't compare to Extended Events in SQL 2008.
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008 My Blog | Twitter | MVP Profile Training | Consulting | Become a SQLskills Insider Troubleshooting SQL Server: A Guide for Accidental DBAs
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 5:02 AM
Points: 2,365,
Visits: 1,825
|
|
Jonathan Kehayias (2/23/2009) Great question. Unfortunately, the answer is no. Since the ring_buffer target is memory resident, it does not persist the information after restart. You can however, alter the system_health session and add a asyncronous_file_target to it which will log the information to a file on disk which will survive service restarts.
Thankyou
"Keep Trying"
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:07 AM
Points: 229,
Visits: 257
|
|
I have and had quite a few issues with SQL Server integration with WMI especially with the Configuration Tools, so I am at the point that I think that regardless what might be the issues, the implementation of WMI is just unstable. To use WMI for anything would be a hard sale for me.
|
|
|
|