This article describes the logical server in Azure used by databases in Azure SQL Database and Azure Synapse Analytics. In the Azure portal, the logical server is named SQL server and is different to the SQL Server product.
Overview
In Azure SQL Database and Azure Synapse Analytics, a server is a logical construct that acts as a central administrative point for a collection of databases. At the logical server level, you can administer logins, firewall rules, auditing rules, threat detection policies, and failover groups. A logical server can be in a different region than its resource group. The logical server must exist before you can create a database in Azure SQL Database or a dedicated SQL pool in Azure Synapse Analytics. All databases managed by a single logical server are created within the same region as the logical server.
This logical server is distinct from a SQL Server instance that you may be familiar with in the on-premises world. Specifically, there are no guarantees regarding location of the databases or dedicated SQL pool in relation to the server that manages them. Azure SQL Database and Azure Synapse don't expose any instance-level access or features. In contrast, the instance databases in a managed instance are all physically co-located - in the same way that you are familiar with SQL Server in the on-premises or virtual machine world.
When you create a logical server, you provide a server login account and password that has administrative rights to the master database on that server and all databases created on that server. This initial account is a SQL login account. Azure SQL Database and Azure Synapse Analytics support both SQL authentication and Microsoft Entra authentication. For information about logins and authentication, see Managing Databases and Logins in Azure SQL Database. Windows Authentication is not supported.
A logical server in SQL Database and Azure Synapse Analytics:
Is created within an Azure subscription, but can be moved with its contained resources to another subscription
Is the parent resource for databases, elastic pools, and dedicated SQL pools
Provides a namespace for databases, elastic pools, and dedicated SQL pools
Is a logical container with strong lifetime semantics - delete a server and it deletes its databases, elastic pools, and SQL pools
Is a high-order element of the identity of databases, elastic pools, and dedicated SQL pools for Azure resource management purposes (see the URL scheme for databases and pools)
Collocates resources in a region
Provides a connection endpoint for database access (<serverName>.database.windows.net)
Provides access to metadata regarding contained resources via DMVs by connecting to a master database
Provides the scope for management policies that apply to its databases - logins, firewall, audit, threat detection, and such
Is restricted by a quota within the parent subscription (six servers per subscription by default, for more information, refer to subscription limits)
Provides the scope for database quota and DTU or vCore quota for the resources it contains (such as 45,000 DTU)
Is the versioning scope for capabilities enabled on contained resources
Server-level principal logins can manage all databases on a server.
The master database of a logical server contains logins similar to those in instances of SQL Server that are granted access to one or more databases on the server, and can be granted limited administrative rights. For more information, see logins.
The default collation for all databases created on a server is SQL_LATIN1_GENERAL_CP1_CI_AS, where LATIN1_GENERAL is English (United States), CP1 is code page 1252, CI is case-insensitive, and AS is accent-sensitive.
Note
Microsoft Entra ID was previously known as Azure Active Directory (Azure AD).
Manage servers, databases, and firewalls
You can manage logical servers, databases, dedicated SQL pools, and firewalls by using the Azure portal, Azure PowerShell, the Azure CLI, Transact-SQL (T-SQL) and REST API.
You can create the resource group for a logical server ahead of time or while creating the server itself. There are multiple methods for getting to a new SQL server form, either by creating a new SQL server or as part of creating a new database.
Create a blank server
To create a blank logical server (without a database, elastic pool, or dedicated SQL pool) using the Azure portal, navigate to a blank SQL server (logical SQL server) form.
Create a blank or sample database in Azure SQL Database
To create a database in SQL Database using the Azure portal, navigate to create a new SQL Database and provide the requested information. You can create the resource group and server ahead of time or while creating the database itself. You can create a blank database or create a sample database based on AdventureWorksLT.
To manage an existing server, navigate to the server using a number of methods - such as from specific database page, the SQL servers page, or the All resources page.
To manage an existing database, navigate to the SQL databases page and select the database you wish to manage.
For example, to configure a firewall rule, follow these steps:
Navigate to your database resource in the Azure portal. Select Set server firewall on the toolbar.
Set Public network access to Selected networks to reveal the virtual networks and firewall rules. When set to Disabled, virtual networks and firewall rule settings are hidden.
Choose Add a firewall rule to configure the firewall.
You can configure your database using Azure PowerShell.
Note
This article uses the Azure Az PowerShell module, which is the recommended PowerShell module for interacting with Azure. To get started with the Az PowerShell module, see Install Azure PowerShell. To learn how to migrate to the Az PowerShell module, see Migrate Azure PowerShell from AzureRM to Az.
Important
The PowerShell Azure Resource Manager module is still supported, but all future development is for the Az.Sql module. For these cmdlets, see AzureRM.Sql. The arguments for the commands in the Az module and in the AzureRm modules are substantially identical.
To create and manage servers, databases, and firewalls with Azure PowerShell, use the following PowerShell cmdlets. If you need to install or upgrade PowerShell, see Install Azure PowerShell module. For creating and managing elastic pools, see Elastic pools.
To create and manage servers, databases, and firewalls with the Azure CLI, use the following Azure CLI SQL Database commands. Use the Cloud Shell to run the CLI in your browser, or install it on macOS, Linux, or Windows. For creating and managing elastic pools, see Elastic pools.
To create and manage servers, databases, and firewalls with Transact-SQL, use the following T-SQL commands. You can issue these commands using the Azure portal, SQL Server Management Studio, Visual Studio Code, or any other program that can connect to a server and pass Transact-SQL commands. For managing elastic pools, see Elastic pools.
Important
You cannot create or delete a server using Transact-SQL.
Returns the edition (service tier), service objective (pricing tier), and elastic pool name, if any, for a database. If logged on to the master database for a server, returns information on all databases. For Azure Synapse, you must be connected to the master database.
Returns CPU, IO, and memory consumption for a database in Azure SQL Database. One row exists for every 15 seconds, even if there is no activity in the database.
Returns successful database connections and connection failures for Azure SQL Database. You can use this information to track or troubleshoot your database activity.
Creates or updates the server-level firewall settings for your server. This stored procedure is only available in the master database to the server-level principal login. A server-level firewall rule can only be created using Transact-SQL after the first server-level firewall rule has been created by a user with Azure-level permissions
Removes server-level firewall settings from a server. This stored procedure is only available in the master database to the server-level principal login.
Creates or updates the database-level firewall rules for a database in Azure SQL Database. Database firewall rules can be configured for the master database, and for user databases in SQL Database. Database firewall rules are useful when using contained database users. Database firewall rules are not supported in Azure Synapse.
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.