A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Hi @Anonymous ,
Thank you so much for posting here.
You could counter-sign a few more stored procedures within msdb. Once done then your user is able to execute the proc, which kicks off the job.
ADD COUNTER SIGNATURE TO sp_start_job BY CERTIFICATE JOBNAME
WITH PASSWORD = 'password'
ADD COUNTER SIGNATURE TO sp_verify_job_identifiers BY CERTIFICATE JOBNAME
WITH PASSWORD = 'password'
ADD COUNTER SIGNATURE TO sp_sqlagent_notify BY CERTIFICATE JOBNAME
WITH PASSWORD = 'password'
go
You also need to register the certificate in master db to be able to create a login. Use this login to map to your user at db level (yourdb and msdb).
Besides, you could also use a combination of [SQLAgentOperatorRole] and your own procedure. Meaning: Make the user member of that role and then deny execute on sp_startjob (and other procs). This way you can grant the execute via your own proc and circumvent the hard-coded check by giving him the [SQLAgentOperatorRole].
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hot issues October--Users always get connection timeout problem when using multi subnet AG via listener. Especially after failover to another subnet