A first peek at the new released SQL Server 2014 CTP1 shows us the ability to use the Azure cloud. In the current version, SQL Server 2012, we already have the feature to deploy to a SQL Database within Windows Azure. A cool new thing is the “Deploy Database to a Windows Azure VM” feature. With this wizard you are able to publish your database to a Azure VM, all with some easy clicking work. In this blog i will show you how.
To use this new feature you have to make sure you have the following things ready
– A Windows Azure subscription
– A Windows Azure storage account
– A Windows Azure Cloud Service
– Publish settings for you Azure account
– Some spare time to play around
So, we will need a Windows Azure subscription. Makes sense if you want to deploy to the cloud you have a subscription. If you don’t have one, there are plenty ways of getting one, in some cases you are able to have 90-days free subscription, which is limited in resources. Or, if you are confident enough (which you should, since we are talking about Azure and SQL Server, duh) go with a payed account. Just sign up, use your credit card to validate and start playing around (and keep an eye on your bill 😉 ).
Withtin Azure you have to create a storage account. I can tell you how to do it, but if there is a change at that level within Windows Azure, i have to edit this blog post, so just go and visit http://www.windowsazure.com/en-us/manage/services/storage/how-to-create-a-storage-account/ to learn how to make a storage account.
When you have your storage account ready, we have to create a Cloud Service. Again, i can tell you how, but at http://www.windowsazure.com/en-us/manage/services/cloud-services/how-to-create-and-deploy-a-cloud-service/#header-4 you can read exactly how to do this.
When you have created those two things, you have to get yourself some publish settings. We have to use them later on in the wizard of SQL Server 2014’s “Deploy Database to a Windows Azure VM”. I downloaded my publish file right here : https://windows.azure.com/download/publishprofile.aspx?wa=wsignin1.0. Ofcourse you have to be signed in to do that!
And now we are all set to go and Deploy a Database to a Windows Azure VM.
The “Deploy Database to a Windows Azure VM” wizard
Yes mister Wizard sir, bring me to the cloud!
Like all wizards that Microsoft uses in their products, this one too is fair and simple. Just click through it. And make sure you have some spare time, since it can be a little time consuming.
Like all wizards we will see a start-up screen which will tell us what we have to do. This one isn’t really different. It will tell you that you need your Windows Azure credentials, a publish file, etcetera. Just read through it and press next.
On the next screen you have to specify your source server. There is a connect button at the left side, if you can’t see it (like i couldn’t the first time), just re-size your window. Pressing the connect button will give you the very known “Connect to Server” window, where you have to give the credentials, server name, and what not. After you have connected to the source server, you will go back to the wizard, where the connection’s instance name will be shown. In the drop down you are able to select your database that you want to deploy, and the last thing you have to enter is a location to put the backup files into. After you have done all that, press next.
This next screen will give you the opportunity to connect to your Windows Azure subscription. Like i stated above, you have to make sure you have a subscription, made a storage account, made a cloud service and downloaded your publish settings file. You can either select a certificate, which is the first possibility. The next possibility is with the use of a publish settings file (which we will use), the third one to sign in at Windows Azure. That option didn’t really worked for me, but that has more to do with me (and my standard Windows Server 2012 setup) then with something else (i presume). So, we just use the browse button here, select our publish file, and we can see that everything will come in its place. When you press next you will see that the wizard will connect to Windows Azure and verifies the options.
At this moment you will see the names of the Cloud Service and the Storage Account, as well as a empty Virtual Machine Name. Just press the settings button and you will see a nice dialog that gives you the several Windows Azure VM settings. I have selected the brand new SQL Server 2014 CTP1 Evalution Edition, entered a save password, made a small instance (just for trying this out you wont need anything bigger) and i made sure i used the right location. Just press the Accept tickbox, and we are good to go! Press next, where you will see an overview of all you have done. After that you press next…
..And that is also the moment you have to get yourself some coffee. Several things will happen at this point. Beside some validation of your settings and such, the virtual machine will be created here. And yeah, that can take some time. I waited for 10 minutes or so, so don’t expect hours or days or weeks or whatever. After that is done, we have Deployed ourselfs a database within a IaaS solution within Azure! How easy was that?
Right after you have finished that wizard you must be able to see the Virtual Machine in your management window of Windows Azure. When you click that option you will see your freshly deployed VM together with the DNS of it. When you RDP to that one, just log in with the “Administrator” account and the password you have provided in the “New Windows Azure Virtual Machine Settings” dialog. When you are logged in, go and start SQL Server Management Studio, and you will see your database right there!
So, there is cloud database made easy!!