Adventure Works for Azure SQL Database
This post will show how to create the Adventure Works sample in an Azure SQL Database using the new Azure portal.
Every once in awhile, I will need a sample database to test something out. Such was the case today, I wanted to use the Adventure Works database sample in Azure SQL Database. However, I remembered that there were a few modifications required to make it work in Azure SQL Database, so I kept searching to find a blog post somewhere that said how to do this. I kept running into a download page:
I am lazy in my old age, and I wanted something easier.
I’ll also admit that I don’t use the new Azure portal very often, I prefer the old blue portal. I decided to check to see if there is a link or quickstart… even better, they added Adventure Works directly into the blade!
This may be old news to some of you, but I couldn’t find this anywhere and it’s worth mentioning.
Create the Database
Click the New button and choose New / Data + Storage / SQL Database.
The blade asks you to create a server. Provide a name, location, and choose if you want to use the latest version (if your region supports it).
On the “Select Source” option, choose Sample.
Now the samples are shown, and you can choose which one. I am using a V12 server, so I’ll choose the V12 database.
Choose your pricing tier. This is just a quick demo of Azure Search and I don’t need active geo-replication for this solution, so I can get away with the $4.99US per month option.
Review all of your settings and create the database.
Yes, it’s that easy. In about 10 minutes, my shiny new Adventure Works database is ready.
Playing Around With Azure SQL Database
I now go into Visual Studio 2013 and refresh the SQL Databases node, and the AdventureWorks database is there.
Right-click and open in SQL Server Object Explorer.
You are prompted to add a firewall rule.
Provide credentials, and you are now logged in and can easily query the database.
Like I said, probably old information for some, but I was happy to see that I didn’t have to go edit indexes in SQL scripts anymore just to get a sample database going.
Notably missing: Northwind. Gotta get Northwind up there
For More Information
Adventure Works for Azure SQL Database – download the database and install from command line instead of using the portal integration shown above.