Create your first Azure SQL Database
This article shows you how to create a sample Azure SQL Database in under five minutes. You learn how to:
- Provision a logical server by using the Azure portal.
- Create a database populated with sample data.
- Set a firewall rule for the database to configure which IP addresses can access your database.
This tutorial assumes that you have an Azure Subscription. If you do not, you can sign up for a free trial.
Step 1: Sign in
- Sign in to the Azure portal.
- Click New > Data + Storage > SQL Database.
Step 2: Create your logical server
- In the SQL Database blade, choose a Name for your database, in this example AdventureWorks.
- To create the logical server for your database, click Server, then Create a new server.
Step 3: Configure your server
- In the Server blade, enter the Server Name as a unique name that is easy for you to remember.
- Enter the Server Admin Login as AdventureAdmin.
- Enter the correct value for Password and Confirm Password.
- Select the preferred geographic Location. Typically the location should be close to where your application runs.
- Click OK.
Step 4: Create your database
- In the SQL Database blade, specify the source of the database by clicking Select Source.
- If you skip this step, an empty database is created.
- Select Sample.
- This creates a database that is a copy of the standard sample database named AdventureWorks.
- On Azure SQL Database the light schema edition of AdventureWorks is used.
- Click Create at the bottom of the blade.
Step 5: Configure the firewall
The following steps demonstrate how to specify which IP address ranges are allowed to access your database.
- In the ribbon on the left-hand side of the screen, click Browse and then SQL Servers.
- From the available options, click the SQL server that you created earlier.
- Click Settings, then Firewall.
- Click this link to get your current IP address from Bing.
- In the Firewall Settings, enter a Rule Name, and paste your public IP address from the previous step into the Start IP and End IP fields.
- When complete, click Save at the top of the page.
You are now ready to write a small client program that can connect to your database. For a quick start code sample, click one of the following links: