Objective of this article
- Sharing a brief of the 2 best options available in MS Azure for SQL Server deployment.
- Deployment via SQL Server Management Studio (SSMS, using SQL Server 2012)
- Accessing SQL Azure from SSMS and through browser.
Prerequisites for this article
- MS Azure subscription. You can Sign-up for a free trial account here. Earlier they used to ask for Credit Card details for verification purpose, not sure if this is still continued.
- SSMS (SQL Server Management Studio) – SQL Server 2012 or higher
Note: Prior to March 25, 2014 Microsoft Azure was known as Windows Azure.
Options available in MS Azure for SQL Server deployment
I’ve been following Azure since its inception almost 4 years back. So, before you quick-start, let me share an interesting insight about MS Azure. Microsoft was a bit late in joining the cloud bandwagon. MS started Azure specially as a Cloud PaaS (Platform as a Service) when Amazon was already an established IaaS player (EC2) attracting loads of attention. It seems gradually MS started to add IaaS like features (virtual machine etc.) to Azure and it became a PaaS+IaaS offering. Similarly, Amazon added PaaS capabilities namely Elastic Beanstalk to their IaaS offering!
Now for those developers who want a lot of control over their deployment environment, Azure’s IaaS flavor i.e. SQL Server deployed on Virtual Machines is a good place to start with. If you’ve an existing SQL Server license you can make use of it on Azure and pay only for compute and storage. Here, in your VM (virtual machine) configuration, you can choose the desired edition/image of SQL Server supported with full functionality.
The PaaS flavor is known as SQL Azure is a cloud based relational database which has the following advantages as per MS:
- Low-Friction Provisioning
- High Availability
- Global Scalability
- Proven Relational Data Model
- Synchronization and Support for Offline Scenarios
It supports T-SQL and is almost same as the SQL Server editions you are already familiar with; of course with a little limitations.
To give you a feel of this new Cloud based RDBMS let me share you a step wise tutorial:
1. Yes, the first thing you’ll notice about Azure is its neat and intuitive UI. To deploy your first database on SQL Azure you need to create a database. See below image, the section encircled in red.
Click on CUSTOM CREATE. In Server drop-down list you can select new Server or select from existing servers (you may have created earlier).
If you have selected New SQL database server option you’ve the following screen where you need to provide the details of your new server. Fill the details.
The Azure environment is ready. Before we proceed to the next steps, let us note SQL Azure account information. You can find this information when you click the database name, it is displayed towards the right side. You can also get it from the ‘Show connection strings‘ option. For this step you can ignore the other red rectangles.
The connection string looks like the following image. Note the account details in a notepad.
Deploying your database from SSMS (SQL Server 2012)
Right click on database name > Tasks > Deploy Database to SQL Azure. You’ve the following screen. Click Next.
In this screen click Connect. A DialogBox will appear as shown below. Fill the details.
Here at this step you might need to add Firewall rules for your current IP to manage your database. This can be done from the manage button available at the bottom of your Azure dashboard webpage or from the Manage Allowed IP Addresses link as shown in image captioned Manage Azure [4th image from the top]. Once your IP is allowed you can see the following image on your screen.
With all green in the above dialog-box your database is deployed on the Azure. Now let us check if we can connect the just-now-deployed database from SSMS. Yes, it’s same as connecting to any database deployed on any other server through SSMS, see the below screenshot.
Accessing your just-deployed DB from Browser.
Type your server name in the following format, shown in red rectangle in the following image. Share your account credentials.
Once you are successfully logged in you can create Tables, Stored-Procedures etc from this browser accessible tool. Check the below screenshot.
Hope this tutorial has enough information to make you familiar with almost every basic aspect of SQL Azure.