How to Create a SQL Azure Database

How to Create a SQL Azure Database

This article walks you through the steps for creating a SQL Azure database using the Windows Azure Platform Management Portal. Before you can create a SQL Azure database, you must create and activate your Windows Azure Subscription, and create a SQL Azure Server. For more information, see Getting Started with SQL Azure. You can also create SQL Azure database using SQL Server Management Studio.

Once you have created your SQL Azure server, you can create your SQL Azure databases by using the Windows Azure Platform Management Portal or connecting to the master database and running the CREATE DATABASE statement. A master database is created automatically with the SQL Azure server. You must be connected to the master database whenever you use the CREATE DATABASE, ALTER DATABASE, or DROP DATABASE statements. If you do not specify a database in the connection string, you will be connected to the master database by default. An example connection string is provided in this section.

To create a SQL Azure database

  1. Sign in at the Windows Azure Platform Management Portal using a Windows Live ID account associated with the Windows Azure Platform subscription.

  2. In the left pane, click Database.

  3. In the left pane, expand Subscriptions, expand the subscription that the SQL Azure server will be associate with, and then click the SQL Azure server where you want the database created.

  4. Click Create as highlighted in the following screenshot.

  5. Enter the Database name, Edition, and Maximum size for the new database and then click OK. For more information on different database sizes and editions, see Accounts and Billing in SQL Azure .

  6. SQL Azure creates the new database according to your specifications as shown in the following screenshot.

    Each SQL Azure server has a fully qualified unique domain name, such as servername.database.windows.net. The servername refers to the name of your SQL Azure server. You can use the fully qualified DNS name to build connections strings for your database. The following are two example connection strings based on this example database...

    ADO.NET:

    	Server=tcp:b8fiitc6yr.database.windows.net;Database=TestDB;User 
    	ID=MyAdmin@b8fiitc6yr;Password=myPassword;Trusted_Connection=False;Encrypt=True;
    	
    ODBC:
    	Driver={SQL Server Native Client 
    	10.0};Server=tcp:b8fiitc6yr.database.windows.net;Database=TestDB;Uid=MyAdmin@b8fiitc6yr;Pwd=myPassword;Encrypt=yes;
    	
  7. To test connectivity for a login, click the new database under the subscription or in the database list, and then click the Test Connectivity button to test connectivity using a login you created.

  8. On the Test Connectivity dialog, enter the login name and password that you want to test connectivity with. The click Connect

    Note: You must enable the Allow other Windows Azure services to access this server firewall rule to use the test connectivity feature.

After you have created your SQL Azure server, databases, and set the firewall rules, you can connect to your SQL Azure database by using the sqlcmd utility and the SQL Server 2008 R2 Management Studio. For more information, see Developing and Deploying with SQL Azure.

An online database management tool is available on the Windows Azure Platform Management Portal . It can be accessed by clicking a database and then clicking the Manage button on the Windows Azure Platform Management Portal

Just like SQL Server, SQL Azure allows you to create additional logins and users. For more information, see Managing Databases and Logins in SQL Azure .

SQL Azure also allows you to use a subset of the Transact-SQL query language to query a database and to insert, update, and delete data in tables in a database. For more information, see Transact-SQL Reference .

When you write applications for SQL Azure, you can use one of the .NET Framework programming languages, which come with Visual Studio 2008 or later: Microsoft Visual Basic, Microsoft Visual C#, or Microsoft Visual C++. You can also use the ADO.NET data provider for SQL Server, the SQL Server 2008 Native Client ODBC driver, and the SQL Server 2008 Driver for PHP version 1.1. For more information, see Development Guide .

See Also

Sort by: Published Date | Most Recent | Most Useful
Comments
  • Great info, I am fan of sql azure but there are many other players out there like amazon RDS so If you want to know more about azure so please browse the site and for Amazon RD is a RDBMS services managed and designed by Amazon to manage oracle databases on cloud please read about <a href="www.sqlservermanagementstudio.net/.../oracle-cloud-databse.html"> oracle cloud database</a>

    Thanks

Page 1 of 1 (1 items)