I need to create a role where the assigned user can access only the 'AdventureWorksDB" where he will have execute permission to all tables,views and stored procedures in the database. I wrote the below script.
USE AdventureWorks2012; GO CREATE USER test1 FOR LOGIN test1; GO CREATE ROLE db_executor GRANT EXECUTE TO db_executor EXEC sp_addrolemember 'db_executor', 'test1'
But he also needs
SQLAgentOperatorRole permission for SQL Agent. But If I am to grant this I have to give him the access to
msdb to be able to do this. But if I give the user , access to msdb user can access other databases as well. What could I do to make the user access only one database ad have full access to SQL Agent?