Server Side
Now Reading
Amazon SQL Server RDS Cheat Sheet
0

Amazon SQL Server RDS Cheat Sheet

by Adrian RandallDecember 14, 2015

I’ve worked with AWS for a long time now but it always slips my mind on how to do some of the simplest things. I hope this saves everyone else as much time as it saves me

Connect To Amazon SQL Server RDS Database

When you first create a SQL Server RDS you’ll get an endpoint such as:

arcadianmssql.ceyqa4mvqwxt.ap-southeast-2.rds.amazonaws.com:1433

Use this as the server name and then use the admin username and password you setup on creation to login. If it doesn’t work at first you may need to set the security settings to allow external connections.

Create a Amazon SQL Server RDS Database

This can be done in Microsoft SQL Server Management Studio by simple right clicking and selecting New Database.

Delete a Amazon SQL Server RDS Database

This can be done in Microsoft SQL Server Management Studio by simple right clicking and selecting Delete Database and be sure to select Close Open Connections otherwise you’ll be unable to delete it.

Take Amazon SQL Server RDS Database Offline

This can be done in Microsoft SQL Server Management Studio by simple right clicking and selecting Tasks->Take Offline

Bring Amazon SQL Server RDS Database Online

EXEC rdsadmin.dbo.rds_set_database_online <DBNAME>

Restore a Database to Amazon SQL Server RDS

Since we can’t just restore a .bak file we need to script the database (basically run the CREATE DATABASE script) from one SQL Server instance to RDS. To Do this we use SQL Azure Migration Tool

http://sqlazuremw.codeplex.com/

If you’re trying to do it from a .sdf file then you can do it with WebMatrix (Yes it is good for something)

About The Author
Adrian Randall
I'm a digital marketing specialist, love working on digital business and coding on just about anything. I'm the founder of Arcadian Digital and this site shares some of our knowledge and practices.

Leave a Response