Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Another way to view my scheduled job?

Author  Topic 

johnsql
Posting Yak Master

161 Posts

Posted - 2006-06-01 : 14:34:04
I have scheduled a simple job on the server of my company db server. And I'd like to try to see/view my scheduled job status and history (fail, success, or complete) on the same server by issuing the following script commands: (in SQL Query Analyzer)

select * from msdb..sysjobhistory
select * from msdb..sysjobschedules

But I get the permission errors: (in SQL Query Analyzer)

Server: Msg 229, Level 14, State 5, Line 1
SELECT permission denied on object 'sysjobhistory', database 'msdb', owner
'dbo'.
Server: Msg 229, Level 14, State 5, Line 1
SELECT permission denied on object 'sysjobschedules', database 'msdb', owner
'dbo'.

My Question:
----------------
Do you have any idea or another way for me to use if I do NOT have the permission over the MSDB database, I still be able to see the history and status for scheduled test job?
BTW, On the current MSDB db on my company db server, only 2 users have access priviledges are "sa" and "guest", but I do not have account or pwd to login as "sa" and "guest" users.
Thank you so much in advance.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-06-01 : 14:45:08
Try this:

exec sp_help_jobschedule @job_name = 'My Job'

exec sp_help_jobhistory @job_name = 'My Job'




CODO ERGO SUM
Go to Top of Page

johnsql
Posting Yak Master

161 Posts

Posted - 2006-06-09 : 10:14:40
Michael Valentine Jones,
Thanks very much for your GREAT helps to me. They work! but I have to specify the database if I am stading in another working db in QA like
exec msdb..sp_help_jobschedule @job_name = 'My Job'

exec msdb..sp_help_jobhistory @job_name = 'My Job'

Your instructions are excellent to solve my problem. At my workplace, nobody is able to give me the answer for the problem I have dealt over one month.
Have a nice day.
Go to Top of Page
   

- Advertisement -