SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


grant permissions to view SQL Server agent.


grant permissions to view SQL Server agent.

Author
Message
striker-baba
striker-baba
SSC-Addicted
SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)

Group: General Forum Members
Points: 437 Visits: 540
Hi all,

I am not able to see the sql server agent.
But, when I login as a sysadmin I am able to see.

Can anyone help me on how to provide read access to sql server agent
so that when I logon as a datareader I need to be able to view SQLserver agent.

Only read or view permissions.


Thanks .
Gianluca Sartori
Gianluca Sartori
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24501 Visits: 13362
You have to be member of some fixed database roles in msdb to see sql agent.
See here:

http://msdn.microsoft.com/en-us/library/ms188283.aspx

--Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
striker-baba
striker-baba
SSC-Addicted
SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)

Group: General Forum Members
Points: 437 Visits: 540
Ok. I just need viewable permissions on the sql agent.

So, what role would be the best to grant least permissions
so that user can only be able to view the sql server agent and cannot make any changes to other jobs or schedules.
Gianluca Sartori
Gianluca Sartori
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24501 Visits: 13362
SQLAgentUserRole is the least privileged of the SQL Server Agent fixed database roles.
It still can start/stop jobs, but owned ones only.

--Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
striker-baba
striker-baba
SSC-Addicted
SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)

Group: General Forum Members
Points: 437 Visits: 540
Ok.

I configured it to SQLAgentReader Role.
and do you think we have any major difference between
SQLAgentUserRole and SQLAgentReader
Gianluca Sartori
Gianluca Sartori
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24501 Visits: 13362
It's explained in detail in the BOL page I posted.
SQLAgentReaderRole has some more privileges than SQLAgentUserRole.

--Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
jcmcgovern
jcmcgovern
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 Visits: 16
All these look great. But how can I deny users execute, update, delete.... and only have viewing of the jobs?
Gianluca Sartori
Gianluca Sartori
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24501 Visits: 13362
Grant the SQLAgentReaderRole and set the job owner to a different user.
That way, users can only see the jobs, but cannot start/stop/modify them.

--Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
jcmcgovern
jcmcgovern
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 Visits: 16
All I need now is to not allow updates to existing jobs

Any ideas?



USE msdb;
CREATE ROLE JobsViewer AUTHORIZATION db_securityadmin;
GO

use msdb
EXECUTE sp_addrolemember 'JobsViewer', 'johntest1'


DENY EXECUTE ON OBJECT::msdb.dbo.sp_add_job TO JobsViewer
DENY EXECUTE ON OBJECT::msdb.dbo.sp_add_jobserver TO JobsViewer
DENY EXECUTE ON OBJECT::msdb.dbo.sp_add_jobstep TO JobsViewer
DENY EXECUTE ON OBJECT::msdb.dbo.sp_update_job TO JobsViewer
DENY EXECUTE ON OBJECT::msdb.dbo.sp_add_jobschedule TO JobsViewer
DENY EXECUTE ON OBJECT::msdb.dbo.sp_delete_job TO JobsViewer




Welsh Corgi
Welsh Corgi
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27602 Visits: 4895
I know this is an old post but I have to Grant an individual permission to manage SQL Server Jobs.

That is Create, Modify Drop, etc.

Do I need to create a credential and a Proxy to do this?

Thanks.

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search