Skip to content

Microsoft

Getting Started with Microsoft Azure SQL Database

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:

  • Manageability
  • Low-Friction Provisioning
  • High Availability
  • Scalability
  • 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.

SQL Azure

Click on CUSTOM CREATE. In Server drop-down list you can select new Server or select from existing servers (you may have created earlier).

3

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.

5

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.

Useful-Azure-Links

Manage Azure

The connection string looks like the following image. Note the account details in a notepad.

ConnString

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.

SSMS

In this screen click Connect. A DialogBox will appear as shown below. Fill the details.

Connect-to-Server

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.

13

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.

CodingThisDB

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.

AzureDB from browser

 

Once you are successfully logged in you can create Tables, Stored-Procedures etc from this browser accessible tool. Check the below screenshot.

20

Hope this tutorial has enough information to make you familiar with almost every basic aspect of SQL Azure.

 

Be Sociable, Share!
    The following two tabs change content below.

    Basant Singh

    Basant is a talented software developer who is very engaged in web & cloud platforms on a daily basis. He is a contributor to codingthis.com reporting on various news and troubleshooting on various platforms. Basant is very strong in SQL and a great asset to the CodingThis community.

    Latest posts by Basant Singh (see all)