How to grant permissions to run a specific sql agent job

  • Is there a way to only give permisson to a certain user to run A sql agent job on our production server without abling to see or run other sql agent jobs?

    Thank,

  • As per BOL:"Members of SQLAgentUserRole have permissions on only local jobs and job schedules that they own."

    Therefore: 1) add User to SqlAgentUserRole 2) make User the owner of job

  • But we have 3 peoples may take turn to run the job.

    And I don't want give them rights to view or run other jobs because this is a production server

  • sqlfriends (2/22/2012)


    But we have 3 peoples may take turn to run the job.

    And I don't want give them rights to view or run other jobs because this is a production server

    can't you simply create a procedure which executes the job, and give the end users EXECUTE permission on the procedure itself, but nothing related to jobs?

    I've done exactly that for creating databases...end users don't have permissions, but the proc creates it on their behalf.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • just my 2ct in addition to Lowells reply which serves exactly your question.

    Here's another way to avoid having to grant higher privileges ...

    Have a look at help to tighten use of cmdshell or sp_start_job[/url]

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • The job is running a SSIS package.

    Is there a way excute ssis in a stored procedure?

    Thanks

  • Everything is possible....

    If you want to be able to have execution control, use a sqlagent job.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

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

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