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.
Author |
Topic |
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2011-11-04 : 10:51:49
|
I am able to execute this query but sql_users can not. sql_users is a login account.What rights should this sql_users have to be able to execute the query below please?ThanksEXEC msdb..sp_start_job @job_name = @JobName |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-11-04 : 10:58:31
|
please refer to the Books OnLine on sp_start_job. It will state what are the permission required KH[spoiler]Time is always against us[/spoiler] |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2011-11-04 : 11:35:42
|
I have now given the SQLAgentUserRole right to the user.Now the error the user gets is:The specified @job_name ('downloady') does not exist.I can confirm that this job does exist. If I run it then there is no error but there is this error when the user runs it from the stored proc.Any thoughtst please?THanks |
|
|
vikki.seth
Yak Posting Veteran
66 Posts |
Posted - 2011-11-04 : 11:55:10
|
select * from msdb.dbo.sysjobs where name='downloady'what does this return?Check if you have space in the job name. |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2011-11-04 : 12:06:49
|
solved by setting the permission for sqlagent.Thanks |
|
|
|
|
|