October 16, 2009 at 12:11 pm
I set up a trace to capture data that's not in the default trace. However, it stops running any time SQL gets restarted. Is there a way to re-start it when SQL starts (other than manually remembering) ?? If yes, please include some details.
TIA
October 16, 2009 at 12:15 pm
You can add a proc to the master database and set it to automatically run when the SQL service starts. Look up sp_procoption in Books Online for how to do that.
Another option is you can create a job for SQL Agent that will run on startup. That's not as reliable, because it's possible for SQL server to run without SQL Agent running. On the other hand, it's much more visible, because it shows as a job in SQL Agent, instead of being a proc hidden in the master db.
I prefer sp_procoption, but some like the job version better. Your call on that one.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply