Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start a Trace from a Job 1

Status
Not open for further replies.

ptheriault

IS-IT--Management
Aug 28, 2006
2,699
US
Has anyone ever started a profiler trace from a scheduled job?
Here is my problem.. I have a job that runs at 2 AM. It is very I/O intensive so I can't run it during the day. For the past few days it has been loosing it's connection. I don't understand why since it is only transforming data from one database and inserting it into another db on the same server. I was going to run a trace against it to see if I can find where the connection is being dropped. I just don't want to wake up at 2 AM to do it. I would like to configure my trace file and schedule it to run.
Can anyone help?
 
Yes you can. Setup profiler and remove the default filter which stops it from displaying the commands from SQL Profiler. Then start the trace. Then start another trace with the settings that you want including the file to save to. Grab all the SQL code that SQL Profiler uses and use that in your job.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Excellent...
Thanks Denny..

--- Paul
-- The Database server looks fine, it must be the Network!
 
no problem.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top