AWS RDS SQL Server Agent Tables

0

Hello, I'm trying to migrate an SQL Server database to RDS which uses the SQL Server agent and has a store procedure that selects from the SQL Server Agent Table dbo.sysjobsteps as per https://learn.microsoft.com/en-us/sql/relational-databases/system-tables/dbo-sysjobsteps-transact-sql?view=sql-server-ver15. I've tried assigning permissions as per https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.CommonDBATasks.Agent.html but I keep getting the error: The SELECT permission was denied on the object 'sysjobsteps', database 'msdb', schema 'dbo'. (even with the master user). On the other hand, other tables like dbo.sysjobs do return the expected results.

Is this expected and does anyone know a workaround?

1개 답변
0

If anyone encounters the same issue, I've changed the SELECT calls to the tables to use instead the available store procedures which any user with the SQLAgentUserRole is allowed to execute. For example, instead of selecting rows from dbo.sysjobsteps table, calling the msdb.dbo.sp_help_jobstep store procedure returns the necessary information.

ArianaH
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠