| title | Aliases (SQL Server Configuration Manager) | |
|---|---|---|
| description | Learn how to create an alias in SQL Server Configuration Manager so that you can use an alternate name when connecting to an instance of SQL Server. | |
| author | rwestMSFT | |
| ms.author | randolphwest | |
| ms.date | 12/15/2025 | |
| ms.service | sql | |
| ms.subservice | tools-other | |
| ms.topic | concept-article | |
| ms.collection |
|
|
| monikerRange | >=sql-server-2016 |
[!INCLUDE SQL Server Windows Only]
An alias is an alternate name that can be used to make a connection. The alias encapsulates the required elements of a connection string, and exposes them with a name chosen by the user. To create an alias for the [!INCLUDE ssNoVersion] clients on this computer, right-click Aliases in the console pane, and then select New Alias. To configure an existing alias for the [!INCLUDE ssNoVersion] clients on this computer, select Aliases in the console pane, right-click the desired existing alias in the details pane, and then select Properties.
Note
Aliases for SQL Server are a client side configuration. Each client computer that uses the alias must have an identical alias configuration, and SQL Server Configuration Manager isn't the only tool that can be used to create or manage aliases.
[!INCLUDE sssql22-md] and later versions don't support creating aliases using SQL Server Configuration Manager. To create an alias for SQL Server 2022 and later versions, use the SQL Server Client Network Utility tool.
By default, [!INCLUDE ssNoVersion] connects to a local instance of [!INCLUDE ssNoVersion] using the Shared Memory protocol, and to an instance of [!INCLUDE ssNoVersion] on another computer using either TCP/IP or Named Pipes. Create an alias when you're using TCP/IP or named pipes, and you want to provide a customized connection string, or when you want to use a name other than the server name for the connection.
-
[!INCLUDE ssNoVersion] isn't listening on the default TCP/IP port of 1433 so you want to provide a connection string with a different port number.
-
[!INCLUDE ssNoVersion] isn't listening on the default named pipe so you want to provide a connection string with a different pipe name.
-
An application expects to connect to a database on the server named
ACCT, but that database has been consolidated as an instance namedACCTon a server namedCENTRAL. The application can't easily be changed. Create an alias namedACCT, with a connection string pointing toCENTRAL\ACCT.
The name (alias) that you want to use to refer to this connection.
Additional elements of the connection string. The name of this box varies with the selected protocol.
The protocol used for the connection.
The name of the [!INCLUDE ssNoVersion] instance being connected to.
Connections to [!INCLUDE ssNoVersion] from a client running on the same computer use the shared memory and named pipes protocols. Shared memory has no configurable properties. Shared memory is always tried first, and can't be moved from the top position of the Enabled Protocols list in the Client Protocols Properties list. The Shared Memory protocol can be disabled, which is useful when troubleshooting one of the other protocols.
You can't create an alias using the shared memory protocol, but if shared memory is enabled, then connecting to the [!INCLUDE ssDE] by name, creates a shared memory connection. A shared memory connection string uses the format lpc:<servername>[\instancename].
When connecting to [!INCLUDE ssNoVersion] running on the same computer as the client, you can use (local) as the server name. This value isn't encouraged as it leads to ambiguity, however it can be useful when the client is known to be running on the intended computer. For instance, when creating an application for mobile disconnected users, where [!INCLUDE ssNoVersion] runs on laptop computers and stores project data, a client connecting to (local) would always connect to the [!INCLUDE ssNoVersion] running on the laptop. The word localhost or a period (.) can be used in place of (local).
The following names connect to the local computer with the shared memory protocol if it's enabled:
<servername><servername>\<instancename>(local)localhost
You can't create an alias for a shared memory connection.
Note
Depending on the configuration of the server, specifying an IP address in the Server box will result in a named pipes or TCP/IP connection.
To connect to the SQL Server using an alias with TCP/IP, you must:
-
Specify an Alias Name.
-
For the Server, enter either a server name to which you can connect using the ping utility, or an IP address to which you can connect using the ping utility. For a named instance, append the instance name.
-
Specify TCP/IP for the Protocol.
-
Optionally, enter a port number for the Port No. The default is
1433, which is the port number of the default instance of the [!INCLUDE ssDE] on a server. To connect to a named instance or a default instance that isn't listening on port 1433, you must provide the port number, or start the [!INCLUDE ssNoVersion] Browser service. For information on configuring the [!INCLUDE ssNoVersion] Browser service, see SQL Server Browser service (Database Engine and SSAS).
At the time of connection, the [!INCLUDE ssNoVersion] Native Client component reads the server, protocol, and port values from the registry for the specified alias name, and creates a connection string in the format tcp:<servername>[\<instancename>],<port> or tcp:<IPAddress>[\<instancename>],<port>.
Note
The Windows Firewall closes port 1433 by default. Because [!INCLUDE ssNoVersion] communicates over port 1433, you must reopen the port if [!INCLUDE ssNoVersion] is configured to listen for incoming client connections using TCP/IP. For information on configuring a firewall, see Configure the Windows Firewall to allow SQL Server access, or review your firewall documentation.
[!INCLUDE ssNoVersion] and [!INCLUDE ssNoVersion] Native Client fully support both Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). [!INCLUDE ssNoVersion] Configuration Manager accepts both IPv4 and IPv6 formats for IP addresses.
- Alias Name:
<serveralias> - Port No:
<blank> - Protocol:
TCP/IP - Server:
<servername>
- Alias Name:
<serveralias> - Port No:
<blank> - Protocol:
TCP/IP - Server:
<servername>\<instancename>
- Alias Name:
<serveralias> - Port No:
<port number> - Protocol:
TCP/IP - Server:
<servername>
- Alias Name:
<serveralias> - Port No:
<blank> - Protocol:
TCP/IP - Server:
<IPAddress>
Note
For information on specifying the network protocol as a sqlcmd parameter, see sqlcmd - Connect to the database engine.
Unless changed by the user, when the default instance of Microsoft SQL Server listens on the named pipes protocol, it uses \\.\pipe\sql\query as the pipe name. The period indicates that the computer is the local computer. The pipe indicates that the connection is a named pipe, and sql\query is the name of the pipe. To connect to the default pipe, the alias must have \\<computer_name>\pipe\sql\query as the pipe name. If SQL Server has been configured to listen on a different pipe, the pipe name must use that pipe. For instance, if SQL Server is using \\.\pipe\unit\app as the pipe, the alias must use \\<computer_name>\pipe\unit\app as the pipe name.
To connect to the SQL Server using an alias with named pipes, you must:
-
Specify an Alias Name.
-
Select Named Pipes as the Protocol
-
Enter the Pipe Name. Alternatively, you can leave Pipe Name blank and SQL Server Configuration Manager will complete the appropriate pipe name after you specify the Protocol and Server.
-
Specify a Server. For a named instance you can provide a server name and instance name.
At the time of connection, the SQL Server Native Client component reads the server, protocol, and pipe name values from the registry for the specified alias name, and creates a pipe name in the format np:\\<computer_name>\pipe\<pipename> or np:\\<IPAddress>\pipe\<pipename>. For a named instance, the default pipe name is \\<computer_name>\pipe\MSSQL$<instance_name>\sql\query.
Note
The Microsoft Windows Firewall closes port 445 by default. Because Microsoft SQL Server communicates over port 445, you must reopen the port if SQL Server is configured to listen for incoming client connections using named pipes.
- Alias Name:
<serveralias> - Pipe Name:
<blank> - Protocol:
Named Pipes - Server:
<servername>
- Alias Name:
<serveralias> - Pipe Name:
<blank> - Protocol:
Named Pipes - Server:
<IPAddress>
- Alias Name:
<serveralias> - Pipe Name:
\\<servername>\pipe\unit\app - Protocol:
Named Pipes - Server:
<servername>
- Alias Name:
<serveralias> - Pipe Name:
\\<servername>\pipe\MSSQL$<instancename>\SQL\query - Protocol:
Named Pipes - Server:
<servername>
The following query returns the protocol used for the current connection.
SELECT net_transport
FROM sys.dm_exec_connections
WHERE session_id = @@SPID;