Skip to main content
Formatting
Source Link
Paul White
  • 95.8k
  • 30
  • 442
  • 691

@Jkay, hereHere are the steps you should follow:

  1. Get familiar with the material about "SQL Server Agent Fixed Database Roles"in , that @gbn has providedSQL Server Agent Fixed Database Roles.

  2. Decide which one is good for you

  3. Use a script similar to the following one (but first choose specific msdb role) to achieve what you ask for:

    USE [master]

    GO

    CREATE LOGIN [DOMAIN\user] FROM WINDOWS

    GO

    USE [msdb]

    GO CREATE USER [DOMAIN\user] FOR LOGIN [DOMAIN\user] GO

    USE [msdb]

    GO

    EXEC sp_addrolemember N'SQLAgentOperatorRole', N'DOMAIN\user'

    GO

     USE [master] GO CREATE LOGIN [DOMAIN\user] FROM WINDOWS GO USE [msdb] GO CREATE USER [DOMAIN\user] FOR LOGIN [DOMAIN\user] GO USE [msdb] GO EXEC sp_addrolemember N'SQLAgentOperatorRole', N'DOMAIN\user' GO 

@Jkay, here are the steps you should follow:

  1. Get familiar with the material about "SQL Server Agent Fixed Database Roles" , that @gbn has provided.

  2. Decide which one is good for you

  3. Use a script similar to the following one (but first choose specific msdb role) to achieve what you ask for:

    USE [master]

    GO

    CREATE LOGIN [DOMAIN\user] FROM WINDOWS

    GO

    USE [msdb]

    GO CREATE USER [DOMAIN\user] FOR LOGIN [DOMAIN\user] GO

    USE [msdb]

    GO

    EXEC sp_addrolemember N'SQLAgentOperatorRole', N'DOMAIN\user'

    GO

Here are the steps you should follow:

  1. Get familiar with the material in SQL Server Agent Fixed Database Roles.

  2. Decide which one is good for you

  3. Use a script similar to the following one (but first choose specific msdb role) to achieve what you ask for:

     USE [master] GO CREATE LOGIN [DOMAIN\user] FROM WINDOWS GO USE [msdb] GO CREATE USER [DOMAIN\user] FOR LOGIN [DOMAIN\user] GO USE [msdb] GO EXEC sp_addrolemember N'SQLAgentOperatorRole', N'DOMAIN\user' GO 
Source Link
George K
  • 2.3k
  • 1
  • 17
  • 33

@Jkay, here are the steps you should follow:

  1. Get familiar with the material about "SQL Server Agent Fixed Database Roles" , that @gbn has provided.

  2. Decide which one is good for you

  3. Use a script similar to the following one (but first choose specific msdb role) to achieve what you ask for:

    USE [master]

    GO

    CREATE LOGIN [DOMAIN\user] FROM WINDOWS

    GO

    USE [msdb]

    GO CREATE USER [DOMAIN\user] FOR LOGIN [DOMAIN\user] GO

    USE [msdb]

    GO

    EXEC sp_addrolemember N'SQLAgentOperatorRole', N'DOMAIN\user'

    GO