Friday, February 24, 2012

Capture user that calls sp_start_job

I have 10 users assigned to SQLAgentOperatorRole. I want to track which of the users calls sp_start_job. I am using Windows authentication. How can I capture the identity of the user that calls sp_start_job?

I want to do something like "INSERT INTO tbJobHistory(JobName, RunDate, User)"

No, unless you run profiler or encapsulate the procedure callo in your own procedure, there is no way to this.

Jens K. Suessmeyer

http://www.sqlserver2005.de

No comments:

Post a Comment