Create an Azure SQL Database: Quickstart Tutorial
This tutorial will guide you through the process of creating your first Azure SQL Database using the Azure portal. This is a fundamental step for anyone looking to host relational data in the cloud with Microsoft Azure.
Prerequisites
Before you begin, ensure you have:
- An active Azure account. If you don't have one, you can sign up for a free trial.
- Permissions to create resources in your Azure subscription.
Steps to Create an Azure SQL Database
Step 1: Sign in to the Azure Portal
Open your web browser and navigate to the Azure portal. Sign in with your Azure account credentials.
Step 2: Navigate to SQL Databases
In the Azure portal, click on the menu icon (☰) in the top-left corner, then select Databases. From the Databases blade, choose SQL databases.
Step 3: Create a New SQL Database
On the SQL databases page, click the + Create button. This will take you to the "Create SQL database" page.
Step 4: Configure Basic Settings
Fill in the following details:
- Subscription: Select the Azure subscription you want to use.
- Resource group: Click Create new and provide a name for your resource group (e.g.,
sql-db-rg). A resource group is a logical container for your Azure resources. - Database name: Enter a unique name for your SQL database (e.g.,
mydemoodb). - Server: Click Create new to set up a new SQL server.
- Server name: Choose a globally unique name for your SQL server (e.g.,
mydemosqlserver123). - Location: Select the Azure region closest to you or your users.
- Firewall rule: For simplicity in this tutorial, select Yes to allow Azure services and resources to access this server. You will configure more specific firewall rules later for security.
- Authentication method: Choose SQL authentication.
- Administrator login: Enter a username (e.g.,
sqladmin). - Password: Enter a strong password and confirm it. Remember these credentials; you'll need them to connect to the database.
- Click OK to create the server.
- Want to use SQL elastic pool? Select No for this tutorial.
- Workload environment: Select Development.
- Compute + storage: Click Configure database. For this quickstart, choose the Basic tier, which offers a good balance of performance and cost for development and testing. Click Apply.
Step 5: Configure Networking
Navigate to the Networking tab. For this tutorial, ensure Public endpoint is set to Enabled and Allow Azure services and resources to access this server is set to Yes.
Step 6: Review and Create
Click on the Review + create tab. Azure will validate your configuration. Once validation passes, review the summary and click the Create button.
Step 7: Access Your New Database
Once the deployment is complete, click Go to resource. You will be taken to the overview page of your newly created SQL database. Here you can find connection strings, manage security, and monitor performance.
Your database is now ready! You can connect to it using SQL Server Management Studio (SSMS), Azure Data Studio, or any application that supports SQL Server connections.
Next Steps
Consider exploring these related topics:
- Connect to your Azure SQL Database using SSMS
- Configure Firewall Rules for Azure SQL Database
- Understanding Performance Levels in Azure SQL Database