Sunday, May 8, 2016

SQL Azure: Finding the Server Name for SQL Azure Instance


Migrating from an on premise version of SQL Server to SQL Azure utilizes standard tools such as SQL Server Management Studio. To access any database whether SQL Azure or on premise SQL Server, a server name is required. The server name is simply the name of the computer on which the database resides. 

For an Azure instance that contains at least one SQL Azure instance, a server name already exists for the SQL Azure Instance. Finding the server name is demonstrated in the section below entitled, "Finding an Existing Server Name." For an Azure instance that has never had a SQL Azure instance created, there is no server name. How create and find the server name associated with SQL Azure is demonstrated in the secton below entitle, "Find the Server Name of a New SQL Azure Instance."

Finding an Existing Server Name

First log into the Azure management portal, Once logged in click on the "SQL databases" tab header which displays a list of SQL Azure instances. Click on the instance name for which the server name is needed (see below). An example of the information shown when clicking on a SQL Azure instance is show below:

On the far right blade the server name is show. For instance in the previous screenshot the server name is

Find the Server Name of a New SQL Azure Instance

There is no server name associated associated with a SQL Azure if there is no SQL Azure database instance. To create a server and hence a server name, a SQL Azure database must be created. This is achieved by first logging into the Azure management portal,

Once logged into the Azure Portal the tab selector for managing SQL Azure instances is found on the left but then again the tab selectors for managing all Azure components (App Services, Virtual Machines, Cloud Services, etc.) are found on the left side of the portal page:

Clicking on "SQL databases" tab selector displays the following (note this is a virgin instance of Azure so there are no SQL Azure instances and no server name associated with the Azure instance):

To create a SQL Azure instance click on the "Add" button from the "SQL Databases" blade. This displays a form that allows a SQL Azure database to be created:

When creating a SQL Azure instance a "Database name" and a "resource group name." The database name is self explanatory. The concept of a resource group is documented here "Azure Resource Manager overview" but simply put a resource group is a way to bind all resources associated with an application. The resource group allows all components of an application to be tracked by the unifying resource group name. The components associated with an application (hence a resource group) include virtual machines, storage, networks, web apps, databases and database servers.

The Configure required settings must be clicked on to complete the creation of the SQL Azure database. Clicking on the aforementioned link shows a blade containing a "Create new Server" button. Recall that this is a new instance of Azure so there are new existing servers to select. Clicking on the "Create new Server"  button displays the "New server" blade:

In order to create a server name both a server name and an administrative user for the server must be specified. With regards to server name and the administrative username, the usual suspects will be specified namely server name, KeyserSoeze, and administrative username, Verbal Kint. A password is also required for the administrative user. Looking  at the previous screenshot it should be clear that the fully qualified server name is

Once the required values have been specified for the "New Server" the "Select" button should be created in order to complete the creation of the new server. 

This action closes the "New Server" blade and fills in the server name under "Server" value associated with the SQL Azure database being created (see the following):

Click on "Create" to complete the creation of the SQL Azure instance and its corresponding server name name called

No comments :

Post a Comment