July 18, 2014 at 10:13 am
I have an odd one. I have a SQL job that doesn't have a schedule and is being run each morning. It is a legacy system and I am trying to document the data flow process and I am having a hard time tracking down where/what is starting the job. I see which user executed the job:
SELECT message FROM sysjobhistory WHERE job_id = 'jobid' AND run_date > 'yesterday'
Which is useful, but I want to know what is starting the job. I am going to begin researching putting a trace up, but I wanted to see if anyone else had run across something like this and had some input or brilliant ideas.
July 18, 2014 at 12:40 pm
Did you check the details of the completed job in the job history?
Example from my log....
The job succeeded. The Job was invoked by User <RunAsUser>. The last step to run was step 1 (Execute procedure).
It wouldn't show what host initialed the job, but it'll show the account that triggered the job which may help you identify it.
The best bet would be to initiate a trace during the time frame of when the job starts. You can use the job history to see approximately when it starts.
July 18, 2014 at 12:41 pm
What do you mean by what started the job? Do you mean you want to know if someone is using a PoSH script or .NET application to start the job?
In that case I think you'd need to use a trace or xevent session to find that information, provided the application connection string actually provides an application name.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply