RDS microsoft SQL admin user permission to run msdb.dbo.rds_restore_database restore command

0

created a RDS and default user is admin backup is in s3 and added option group for SQLSERVER_BACKUP_RESTORE ,iam role also but when i run the restore command i.e exec msdb.dbo.rds_restore_database @restore_db_name='backupdb', @s3_arn_to_restore_from='arn:aws:s3:::Bucketname/backupfile27022023.bak';

its showing an error as The EXECUTE permission was denied on the object 'rds_restore_database', database 'msdb', schema 'dbo'.

admin is master user but it doesn't have the execute permission. How to solve it

1개 답변
0

Hello,

The Master user should be able to perform the restore database without any issues or additional grants. Please check for any syntax issues in the restore command or would it be possible to post the IAM role & policy created hiding the sensitive info.

Whether the master user is AD authenticated or sqlserver authenticated ?

If still doesn't works, then please create new login as below and try the restore

USE master

GO

CREATE LOGIN rds_backup_operator WITH Password = 'complexpassword', DEFAULT_DATABASE=master, CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF

GO

USE msdb

GO

CREATE USER rds_backup_operator FROM LOGIN rds_backup_operator

GO

GRANT EXECUTE ON msdb.dbo.rds_backup_database TO rds_backup_operator

GO

GRANT EXECUTE ON msdb.dbo.rds_restore_database TO rds_backup_operator

GO

GRANT EXECUTE ON msdb.dbo.rds_task_status TO rds_backup_operator

GO

GRANT EXECUTE ON msdb.dbo.rds_cancel_task TO rds_backup_operator

GO

AWS
답변함 일 년 전

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

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

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