Welcome to MSSQL Forum!
MSSQL Forum - Discussions about Microsoft SQL Server

You are currently viewing our community forums as a guest user. Sign up or
Having an account grants you additional privileges, such as creating and participating in discussions.

SQL Azure - Creating a database

Discussion in 'SQL Azure General Discussion' started by Peter Schmitz, Oct 1, 2012.

  1. Peter Schmitz

    Peter Schmitz Administrator Staff Member

    Creating a SQL Azure database couldn't be easier. If you have not already done so, follow our guide which details on how sign up for a Windows Azure account. Once that is done, you can continue to the Windows Azure Management portal. Alternatively, you can always head over to http://www.microsoft.com/windowsazure/, and then use the "Sign in to the Management Portal" link in the upper right to accomplish the same goal:

    WindowsAzureHome_SignInHighlighted.png

    Once there, use the "Create Database Server" in the Common Tasks menu at the top to create a new database server which will host your SQL Azure database:

    WindowsAzureManagementPortal_NewDatabaseServerHighlighted.png

    This will take you to a new screen, where you can create a new subscription if you would want to use a different subscription, create a new server, or create a new database. In our case, we want to create a server first, so select the middle option labelled "Create a new SQL Azure Server":

    SQL Azure 01.png

    This will initiate the "Create Database" wizard. First, yuo will have to pick which subscription you want to use, and which server. In case you do not have a server yet, you will be able to create a new server. This is what we want, so click "Next":

    SQL Azure 02.png

    The wizard will now prompt you to pick where you physically want your database to be stored. I would advise you to not automatically click the region you happen to be in, but to consider where the majority of your target audience will be coming from, and select whichever region is closest to them. Doing this will reduce latency for your audience. When you are done, click "Next".

    SQL Azure 03.png

    You will now have to fill in a Administrator Login name as well as a password. Pick a strong password, and be sure to store it somewhere safe.Then click "Next".

    SQL Azure 04.png

    As part of the SQL Azure security, you will have to create FireWall rules on the SQL Azure server in order to be able to access or manage databases on the server. You can supply a single IP address, or a range of IP addresses. This feature will ensure that no unauthorized parties can access the databases unless they are connecting from the specified addresses.

    To create a new firewall rule, click the "Add" button:

    SQL Azure 05.png

    Using the "Add Firewall Rule" screen, you can give the rule a name, and enter the IP addresses it applies to. You can select to enter a start- and end of the range, or simply enter a single IP address twice. Below the text-boxes where you fill in the information for the rule, the wizard will helpfully display the current IP address you are connected to the Internet with:

    SQL Azure 06.png

    Click "Ok" to set up the rule. If you need to add more rules, repeat the last step. Otherwise, click "Next". You are now ready to create a database. Enter a name for it, and pick the edition and size for it. See the table below for a brief comparison.

    EditionDescriptionSize options
    WebBest suited for small applications.* 1 GB
    * 5 GB
    BusinessBest suited for larger projects, or enterprise applications.* 10 GB
    * 20 GB
    * 30 GB
    * 40 GB
    * 50 GB


    Keep in mind that there are different costs involved with different database sizes, and that all editions allow for a certain amount of bandwith and transactions. Exceeding the allowed limits will lead to additional costs. For an oversight of the exact details, and offers and specials, check out http://www.microsoft.com/windowsazure/pricing/.

    In my case, I want to set up a Web Edition database, sized at 1 GB:

    SQL Azure 07.png

    You're done, and now the proud owner of a new shiny SQL Azure database. As you can see by expanding your subscription, a server with a randomly generated name has been created for you. If you expand the server, you will see it contains a master database, and the database you just created, and that's it:

    SQL Azure 08.png

    On the right-hand side, there's a properties screen which gives you some additonal information on whichever node you have selected in the left-size tree-menu.Select the database you created, and you will see the name, edition, max size in bytes, the current size in bytes, and another very useful feature; a button that will bring up a new window detailing a connectionstring for you to use in applications that need to connect to your SQL Azure databas:

    SQL Azure 09.png

    Click on the Elipsis (...) button to bring up the connection string window:

    SQL Azure 10.png

    That concludes this guide on how to create a SQL Azure database. Should you require more databases, you can follow the same procedure again. When you do, you will also be able to select to use the existing server we created in this guide.

Share This Page