Tutorial: Create an Azure SQL Database
This tutorial guides you through the process of creating a new Azure SQL Database instance using the Azure portal.
Prerequisites
- An Azure subscription.
- Web browser with access to the Azure portal.
Steps
1. Sign in to the Azure Portal
Open your web browser and navigate to the Azure portal. Sign in with your Azure account credentials.
2. Create a New Resource
In the Azure portal, select Create a resource from the left-hand menu. You can also search for "Create a resource" in the search bar at the top.

3. Search for SQL Database
In the "Search the Marketplace" box, type "SQL Database" and press Enter. Select SQL Database from the search results under the Databases category.
4. Configure Basic Settings
On the "SQL Database" page, click Create.
Fill out the following fields in the Basics tab:
- Subscription: Select the Azure subscription you want to use.
- Resource group: Click Create new and enter a name for your resource group (e.g.,
MySqlResourceGroup
), or select an existing one from the dropdown. - Database name: Enter a unique name for your SQL database (e.g.,
MySampleDatabase
). - Server:
- If you don't have a SQL server, click Create new.
- In the "New SQL server" dialog, enter a globally unique server name, select the Location (Azure region), and configure Server admin login and Password. Click OK.
- If you have an existing server, select it from the dropdown.
- Want to use SQL elastic pool?: For this tutorial, select No.
- Compute + storage: Click Configure database.
- Choose a Service tier (e.g., Basic, Standard, Premium). For a basic tutorial, Basic is often sufficient.
- Adjust the Max data size as needed.
- Click Apply.
5. Configure Networking
Navigate to the Networking tab.
- Connectivity method: Select Public endpoint.
- Firewall rules:
- Under "Allow Azure services and resources to access this server", select Yes.
- Under "Add current client IP address to firewall rules", select Yes. This allows you to connect to the database from your current machine.
6. Configure Additional Settings (Optional)
Navigate to the Additional settings tab. You can configure options like data encryption, collation, and sample data. For this tutorial, the defaults are usually fine, but you can choose to Use existing data or select Sample to pre-populate the database with some data.
7. Review and Create
Navigate to the Review + create tab. Azure will validate your configuration. If validation passes, review the details and click Create.
8. Access Your Database
Once the deployment is complete, you can click Go to resource to navigate to your newly created Azure SQL Database. From here, you can manage your database, view its properties, and connect to it using tools like SQL Server Management Studio (SSMS) or Azure Data Studio.
Next Steps
- Learn how to connect to your Azure SQL Database.
- Explore querying your database.