Manage Azure SQL Database in the Azure Portal
The Azure portal is a powerful, web-based tool that provides a unified management experience for your Azure resources. This tutorial will guide you through common tasks for managing your Azure SQL databases directly within the Azure portal.
Getting Started
Before you begin, ensure you have an Azure subscription and an existing Azure SQL Database. If not, you can create one through the portal.
Tip:
Familiarize yourself with the Azure portal's global search and notification areas for quick navigation and status updates.
Navigating to Your Azure SQL Database
Once you are logged into the Azure portal:
- In the search bar at the top of the portal, type "SQL databases" and select it from the results.
- On the SQL databases page, you will see a list of all your Azure SQL databases. Click on the name of the database you wish to manage.
Key Management Areas in the Azure Portal
1. Overview Blade
The Overview blade is the first screen you see when you select your database. It provides a summary of your database's status, performance metrics, and key properties.
- Resource Health: Monitor the health and availability of your database.
- Activity Log: View recent operations performed on your database.
- Properties: See connection strings, server name, firewall settings, and more.
2. Firewall Rules
Azure SQL Database has a firewall that protects your data by preventing unauthorized access. You can configure server-level and database-level firewall rules.
- Navigate to your SQL server (from the database overview, click on the server name).
- Under 'Security', select 'Firewalls and virtual networks'.
- Click 'Add client IP' to add a rule for your current IP address, or manually enter IP address ranges.
3. Query Performance Insight
This tool helps you identify and resolve performance bottlenecks in your queries. It provides insights into your top resource-consuming queries.
- From your database's overview page, scroll down to 'Intelligent Performance' and select 'Query Performance Insight'.
- Analyze the charts and lists to understand query execution times and resource usage.
4. Monitoring and Performance
The 'Monitoring' section offers various metrics to track your database's performance over time. You can view CPU usage, data IO, log IO, and storage utilization.
- Metrics: Visualize performance data with customizable charts.
- Alerts: Set up alerts based on performance thresholds to be notified of potential issues.
5. Security
The Security section is crucial for protecting your data. Here you can configure:
- Auditing: Enable auditing to track database events.
- Threat Detection: Configure advanced threat protection to detect anomalous activities.
- Data Masking: Implement dynamic data masking to obscure sensitive data from non-privileged users.
Common Management Tasks
a) Scaling Your Database
You can easily scale your database's performance by changing its service tier (e.g., Basic, Standard, Premium, General Purpose, Business Critical) or compute size (DTUs or vCores).
- From your database's overview, select 'Compute + storage'.
- Adjust the performance level and click 'Apply'.
Note:
Scaling operations can sometimes incur a brief service interruption. Plan these changes during low-traffic periods.
b) Creating Backups and Restoring
Azure SQL Database automatically creates backups. You can configure backup retention policies and perform point-in-time restores.
- From your database's overview, select 'Backups'.
- Choose 'Restore' to restore to a specific point in time.
c) Managing Access
Control who can access your database by managing user accounts and permissions, typically done at the SQL server level.
- Navigate to your SQL server.
- Under 'Settings', select 'Login'.
- Add or manage SQL logins.
Conclusion
The Azure portal provides a comprehensive and intuitive interface for managing your Azure SQL databases. By leveraging its features for monitoring, security, and scaling, you can ensure your database is performant, secure, and available.