Introduction to SQL Azure
Exercise 1: Preparing Your SQL Azure Account

Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: Visual Basic Language Filter: C#

Visual Basic Usage
C#

In this exercise, you will connect to your SQL Azure account and create a database server, add a new user and then reconnect to SQL Azure so that you can begin working with your new database.

Task 1 – Retrieving your SQL Azure Server Name

In this exercise, you will log into the SQL Azure portal to obtain the name of the SQL Azure server assigned to your account.

1. Open Internet Explorer and navigate to the Windows Azure Platform portal at https://windows.azure.com.
2. Log in to your Windows Live account.

   Figure 1
   Logging into the Azure Services Portal

3. At the Windows Azure Platform portal home page, click New Database Server on the ribbon.

   Figure 2
   Creating a new SQL Azure database server

4. If you have not previously created a server, you will need to do so now; otherwise, you may skip this exercise.
5. To create a server, select your subscription on the left pane. Click on Create on the Server ribbon.

   Figure 3
   Creating a new SQL Azure database server

6. Select a region from the Region drop down list, and then click Next. The location determines which datacenter the database will reside in.

   Figure 4
   Choosing region

7. Enter an administrator account name and password and click Next.

   Figure 5
   Entering administrator login and password

   Note:
   An administrator account is a master account used to manage the new server. You should avoid using this account in connection strings where the username and password may be exposed. The password policy requires that the password follow certain rules.

8. Click Finish to create the new server. You will configure firewall rules later on this exercise.

   Figure 6
   Firewall rules dialog

9. Finally, the new server information, including Fully Qualified Server Name, is shown.

   Figure 7
   SQL Azure projects list

   Note:
   The fully qualified domain name of the server uses the following format: <ServerName>.database.windows.net where <ServerName> identifies the server, for example, a9ixtp7pux.database.windows.net.

10. Expand the subscription node located on the left pane and click on the server name you have created. The Server Information page allows you to perform basic administration of the database server.

    Figure 8
    SQL Azure server information page

11. The Firewall Rules allows you to specify a list of IP addresses that can access your SQL Azure Server. The firewall will deny all connections by default, so be sure to configure your allow list so that existing clients can connect to the server.

    Figure 9
    Configuring the firewall settings for SQL Azure

    Note:
    Changes to your firewall settings can take some time to become effective.

    You now have a database server created and ready for the next steps in this lab. This database can be connected to from anywhere in the world.