Honey Yadav
Honey Yadav

Reputation: 186

Restore database in amazon web services RDS in SQL Server

I have created a new database instance of SQL Server in Amazon Web Services RDS. I have connected to it using SQL Server Management Studio from my computer.

Now I want to restore adventureworks.bak database which is present on my computer. But the problem is that I cannot select the file (adventure.bak) from my computer as it only allows me to select file paths where the database is stored on the AWS instance.

I have also tried the option restore from S3, but is only showing option to restore amazon aurora and mysql database but not SQL Server database.

Is there any way to restore the database from that file? Please help me.

Thanks in advance.

Upvotes: 2

Views: 468

Answers (1)

Adil B
Adil B

Reputation: 16806

If you want to restore a database backup to an MS SQL Server hosted on RDS, you need to follow the steps detailed in the RDS Native Backup and Restore docs:

  1. Upload your adventure.bak file to an S3 bucket
  2. Create an IAM Role that grants your RDS database access to that S3 bucket
  3. Call the rds_restore_database stored procedure from within SQL Server Management Studio and provide the parameters @restore_db_name (the database name to restore to) and @s3_arn_to_restore_from, the S3 ARN of the adventure.bak file.

See the documentation for step-by-step instructions.

Upvotes: 3

Related Questions