Maintain Jobs, View Logs

  • I have a user who needs to check whether 2 jobs have run on a SQL Server 2000 instance, and be able to view logs.

    Is there a way of doing this?

  • Hello James.

    You could use the Notifications feature. You should first define an email account to the user which the sqlserveragent runs with. Then you should create a Sql Operator, under the Sql Server Agent session. At last, under the 2 jobs, move to Notifications tabs and check the E-mail operator you created. You can perform this action when the Job succeeds,  when the job fails or whenever the job completes.

    What do you mean for view logs?

    Sql Server Logs?

    Diego

     

  • Thanks for the response. Problem is, they need to be able to restart the job if it fails.

    Windows Log files, the Event Log, etc.

  • It's not so easy to manage with security.

    Is it a problem if you will give administrative rights to them?

     

  • Hi, for the logs you could just give them the relevant command line version and set up OS access ie, for the SQL logs :- explorer \\servername\d$\Program Files\Microsoft SQL Server\MSSQL\LOG\errorlog and for the event log   :-  EVENTVWR \\servername

    hth

  • If security is an issue, you can set up job-specific stored procedures for them to execute to get current status/last run, history and restart the job. These job-specific stored procedures can use the system stored procedures to do the real work.

    Note that using sp_help_job is problematic, because INSERT ... EXEC sp_help_job fails. However, you can get last-run information from either sp_help_jobserver (last run only) or sp_help_jobhistory should work.

     

    David Lathrop
    DBA
    WA Dept of Health

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply