|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:37 PM
Points: 941,
Visits: 1,041
|
|
I found the default trace a long while back while wondering around in SQL Install files. As soon as I noticed it I had the questions like performance, who set it and such. So I went digging around and was quite pleased with this little trick of Microsoft's :D. It has saved me more the once in various environment when someone asked when something was modified. But what I wanted to know was Adam is there a way to add events to Default Trace? As you said and most probably noticed it doesn't contain all the event. And adding all the events probably is a bad idea because it will grow the log files; but selected few events. Also how can I make it so it saves more then 5 roll-over files?
Thanks.
- Mohit.
---
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN. 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.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Monday, February 02, 2009 10:07 AM
Points: 81,
Visits: 23
|
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 1:57 PM
Points: 37,687,
Visits: 29,945
|
|
Mohit (11/11/2008) But what I wanted to know was Adam is there a way to add events to Default Trace? Also how can I make it so it saves more then 5 roll-over files?
As far as I know, you can't change the default trace's definition. The events, columns and number of files is hardcoded somewhere. If you want more events or more files, disable the default trace and set up your own one.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:37 PM
Points: 941,
Visits: 1,041
|
|
Thanks Gail.
That what I ended up doing; just wanted to make sure I wasn't missing something :).
- Mohit.
---
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN. 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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, April 12, 2013 4:35 AM
Points: 6,
Visits: 229
|
|
Adam, GREAT WORK!! Very concise and informative. Thanks!
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, April 12, 2013 4:35 AM
Points: 6,
Visits: 229
|
|
Adam, GREAT WORK!! Very concise and informative. Thanks!
David Dye
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:27 PM
Points: 365,
Visits: 623
|
|
Thanks for posting this article - I didn't know this trace was out there.
Does anyone have any suggestions as to why my default trace doesn't show up?
I'm a sysadmin...
When I run: SELECT * FROM sys.configurations WHERE configuration_id = 1568
I get this: configuration_id name value minimum maximum value_in_use description . is_dynamic is_advanced -------------------------------------------------------------------------------- 1568 default trace enabled 1 0 1 1 Enable or disable the default trace 1 1
But when I SELECT * FROM ::fn_trace_getinfo(0) OR select * from sys.traces I get no results.
I see some old trace files named log_625.trc, log-626.trc, log_627.trc, log_628.trc but they're from a two-day time period back in October.
I'm confused...
again...
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Sunday, June 07, 2009 7:42 PM
Points: 2,
Visits: 13
|
|
I think this is a very cool tool. My only problem is that on all our servers, the most recent trc file is not log.trc, it is something like log_211.trc and dates back two weeks. I have verified that the default trace is on, but it doesn't seem to be logging all the time.
Any ideas?
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:37 PM
Points: 941,
Visits: 1,041
|
|
Marcia,
Maybe someone turned of the trace, I know when I first discovered it I was like who turned this on and turned it off without realizing its use. Try turning it off in the optins and turning it on to see if brings it back. Mind you mine came on the next day without me doing anything.
Brian,
The trace doesn't long all the events if you open one of the trace files you can see the events it logs what events are being logged.
Now with Log Growth, DDL changes you would think something got logged. Maybe yours default trace is turned off also?
- Mohit.
---
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN. 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.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 9:39 PM
Points: 2,278,
Visits: 2,998
|
|
Brian Strickland (11/11/2008) I think this is a very cool tool. My only problem is that on all our servers, the most recent trc file is not log.trc, it is something like log_211.trc and dates back two weeks. I have verified that the default trace is on, but it doesn't seem to be logging all the time.
Any ideas? Brian,
log_211.trc is indicative of the current log file being 211. You can still use log.trc to rollup every log file from the very first to the current (211). Your other option is to specify log_211.trc and only get the trace data from log 211 and greater.
Edit: You can check the sys.configurations table to make sure the trace is still enabled.
Thanks, Adam
My blog: http://jahaines.blogspot.com
|
|
|
|