Introduction
This tutorial guides you through the process of creating your first Azure SQL Database using the Azure portal. Azure SQL Database is a fully managed relational database service that supports workloads like transactional, analytical, and hybrid. Creating a database is a fundamental step to leverage its powerful features.
Prerequisites
- An active Azure account. If you don't have one, you can sign up for a free trial.
- Basic understanding of relational databases.
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 Azure SQL
Once logged in, you can find Azure SQL by typing "SQL" in the search bar at the top of the portal and selecting "Azure SQL".
Alternatively, click on "Create a resource" (the plus icon in the top-left corner), then search for "SQL" and select "Azure SQL" under the "Databases" category.
Step 3: Create an Azure SQL Database
On the Azure SQL page, click on the "Create" button.
You will be presented with a form to configure your new SQL database. Fill in the following details:
- Subscription: Choose the Azure subscription you want to use.
- Resource group: Select an existing resource group or create a new one (e.g.,
myResourceGroup
). A resource group is a logical container for your Azure resources. - Database name: Enter a name for your database (e.g.,
mySampleDatabase
). - Server:
- If you have an existing SQL server, select it from the dropdown.
- If you need to create a new server, click on "Create new".
- Server name: A globally unique name (e.g.,
mysampleserver12345
). - Location: Choose an Azure region closest to you or your users.
- Administrator username: Enter a username for server administration (e.g.,
sqladmin
). - Password: Create a strong password and confirm it.
- Click "OK" to create the new server.
- Workload environment: For this tutorial, select Development.
- Compute + storage:
- Click "Configure database".
- For development/testing purposes, the Basic service tier is usually sufficient and cost-effective. You can adjust the storage size as needed.
- Click "Apply".
Review the settings and click "Review + create".
Step 4: Deploy the Database
After validation passes, click the "Create" button. Azure will now provision your new Azure SQL Database and its associated server.
The deployment process may take a few minutes. You can monitor the progress in the notifications area (bell icon) or by navigating to the resource group.
Step 5: Connect to Your Database (Optional)
Once the deployment is complete, you can navigate to your SQL database resource. From there, you can find connection strings and information to connect using tools like SQL Server Management Studio (SSMS) or Azure Data Studio.
Note: You may need to configure firewall rules on your SQL server to allow connections from your IP address.
Conclusion
Congratulations! You have successfully created your first Azure SQL Database. This database is now ready to store and manage your data. You can continue exploring Azure SQL Database features, such as performance tuning, security configurations, and data import/export.
Next Steps
- Learn how to connect to your Azure SQL Database.
- Explore importing data into Azure SQL Database.
- Understand security best practices.