Sql-server – Import a sample database into SQL Server on AWS RDS free tier

amazon ec2amazon-rdsimportsql server

I asked this on stack overflow but someone there suggested I try here as I might get better answers. So here goes…

I'm signed up to Amazon Web Service (AWS) free tier, which allows you to run some very limited instances of EC2 and RDS for free.

I've created an RDS instance running SQL Server 2012 Express – this does not allow remote desktop access, so I also have an EC2 instance running Windows Server 2012 base, and I have installed SQL Server Management Studio and I'm able to connect.

I would like to import some kind of sample database – for example, Northwind, AdventureWorks, or anything that has at least a handful of tables and relationships. The reason is I want to just experiment and practice on a few things (for example, I want to try out the EXPLAIN feature to get to learn how the relational algebra works and how SQL plans out various test queries).

My problem is that Amazon's RDS does not allow me to restore a .BAK file, as local disk access is not allowed, and neither is FILESTREAM, so I can't just download a sample database backup and restore it.

Amazon documents its workaround here, which involves creating a local instance of SQL Server on the EC2 instance (my machine with SQL Server Management Studio installed, which I have RDP access to), and use the Generate and Publish Scripts Wizard to import data from the EC2 to the RDS. My problem here is that I don't have enough disk space to install a local database instance – as I'm on the free tier I'm limited to 30GB total disk space for the server, so the OS + SQL Server Management Studio leaves just a couple of gigs. So I'm totally stuck.

Does anyone have any genius ideas here? Maybe someone has a simple bulk insert script with some data + schema I can use (I can't find any) or some other solution? The database doesn't have to be big, just something to work with. Of course I could always pay to increase my disk space, and go through the whole tedious process outlined by Amazon, but I'd rather not! Also, someone has suggested (on stack overflow) that I create a DB on my home PC and create some kind of remote database connection, but I'm trying to avoid installing tons of heavy software on my home PC, it's the whole reason I'm experimenting with AWS. I'm aiming to have almost nothing installed at home, cloud all the way!

Best Answer

Use this version of NW instead. Its very light (2.6 MB in disk) and you can download the scripted version. Should be just fine.