
- Amazon RDS - Home
- Amazon RDS - Overview
- Amazon RDS - Environment
- Amazon RDS - Interfaces
- Amazon RDS - DB Instances
- Amazon RDS - DB Storages
- Amazon RDS - MS SQL features
- Amazon RDS - MS SQL creating DB
- Amazon RDS - MS SQL Connecting to DB
- Amazon RDS - MS SQL DB Export Import
- Amazon RDS - MS SQL DB with SSL
- Amazon RDS - MS SQL DBA Tasks
- Amazon RDS - Oracle Features
- Amazon RDS - Oracle Creating DB
- Amazon RDS - Oracle Connecting to DB
- Amazon RDS - Oracle DB Data Import
- Amazon RDS - Oracle DBA Tasks
- Amazon RDS - MariaDB Features
- Amazon RDS - MariaDB Creating DB
- Amazon RDS - MariaDB Connecting to DB
- Amazon RDS - MariaDB Data Import
- Amazon RDS - PostgreSQL Features
- Amazon RDS - PostgreSQL creating DB
- Amazon RDS - PostgreSQL Connecting to DB
- Amazon RDS - PostgreSQL Data Import
- Amazon RDS - MySQL Features
- Amazon RDS - MySQL Creating DB
- Amazon RDS - MySQL Connecting to DB
- Amazon RDS - MySQL DB Export Import
- Amazon RDS - MySQL DBA Tasks
- Amazon RDS - Multi-AZ Deployments
- Amazon RDS - DB Snapshots
- Amazon RDS - DB Monitoring
- Amazon RDS - Event Notifications
- Amazon RDS - DB Access Control
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Amazon RDS - MS SQL DB Export Import
Amazon RDS MSSQL provides native backup and restore as a mechanism to export and import the DB. A full backup file can be created from the on-premise database and stored in Amazon S3. Next this backup file is restored to an existing Amazon RDS DB instance running SQL server. We can follow just the similar steps to export the data from Amazon RDS MSSQL instance and restore it to an on-premise SQL Server database.
The below diagram describes the approach.

We upload the backup file created above to a pre-decided Amazon S3 bucket in the same region where the target RDS MSSQL database is present. You can follow this link to learn about how to upload.
This native backup and restore mechanism has the following advantages.
Migrate databases to Amazon RDS.
Move databases between Amazon RDS SQL Server DB instances.
Import and export data.
Migrate schemas, stored procedures, triggers and other database code.
Backup and restore single databases, instead of entire DB instances.
Create copies of databases for testing, training, and demonstrations.
Store and transfer backup files into and out of Amazon RDS through Amazon S3, giving you an added layer of protection for disaster recovery.
Backing Up a Database
To back up your database, you call the rds_backup_database stored procedure after connecting to the Amazon RDS MSSQL instance from the SSMS client software. The stored procedure is executed using following parameters.
exec msdb.dbo.rds_backup_database @source_db_name='database_name', @s3_arn_to_backup_to='arn:aws:s3:::bucket_name/file_name_and_extension', @kms_master_key_arn='arn:aws:kms:region:account-id:key/key-id', @overwrite_S3_backup_file=1, @type='FULL';
The successful completion of the above stored procedure creates a backup file and stores it in the mentioned bucket of S3.
Restoring a Database
To restore your database, you call the rds_restore_database stored procedure after connecting to the Amazon RDS MSSQL instance from the SSMS client software. The stored procedure is executed using following parameters.
exec msdb.dbo.rds_restore_database @restore_db_name='database_name', @s3_arn_to_restore_from='arn:aws:s3:::bucket_name/file_name_and_extension', @kms_master_key_arn='arn:aws:kms:region:account-id:key/key-id';