SQL Server Job Status

  • I want to display status of SQL server jobs with last run date and time, in one of my application. But I am not having administrative privileges for database. Therefore, I was not able to fire "exec jobname" query for status. Can anyone help me on this ?

  • What rights do you have?

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • I am not admin for database, I am database owner.

  • tusharbedekar (9/30/2009)


    I want to display status of SQL server jobs with last run date and time, in one of my application. But I am not having administrative privileges for database. Therefore, I was not able to fire "exec jobname" query for status. Can anyone help me on this ?

    can you post what "exec jobname" query for status, actually is. then we can see what permissions you will need. You say you are the database owner, but of which database. Job Status is stored in the MSDB Database. If you cannot use the GUI to see the status. I am making the assumption, you aer trying to run a script from your application.

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • The job status is in msdb, as mentioned above. If you have rights to read those tables, then you can query for status.

    You would not start a job, or get it's status, with "exec". sp_startjob is run to start a job.

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

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