Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permissions need for sp_start_job

Status
Not open for further replies.

RRinTetons

IS-IT--Management
Jul 4, 2001
333
US
I've got a user who needs to be able to run a job periodically. I created a cmd file using SQLCMD that runs fine for me, but won't work for the user who needs it. It also works on her computer if I log in there, so I'm guessing it's not a problem on the machine, either.

Here's the script from he cmd:
Code:
SQLCMD -S SERVERName -Q "USE MSDB EXEC sp_start_job @job_name = 'MyJobName'"

The sp_start_job lives in MSDB, so I was wondering if there's an issue with execute permissions there? How should would a user need to be set up to be able to run sp_start_job?

-
Richard Ray
Jackson Hole Mountain Resort
 
You'll need to put the user into the SQLAgentOperators role within the msdb database.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top