Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Analytics Platform System (PDW)
This article describes how to connect to a registered server using SQL Server Management Studio (SSMS). If the server isn't running or can't be found on the network, the Registered Servers feature displays an error.
If the Registered Servers tool window isn't visible in SSMS, select View > Registered Servers, or type Ctrl + Alt + G.
Open Object Explorer for a registered server
- Within the Local Server Groups or Central Management Servers, find the registered server you want to view in Object Explorer.
- Right-click on the registered server and select Object Explorer.
- The tree structure for the server displays in the Object Explorer pane.
Query a registered server
- Within the Local Server Groups or Central Management Servers, find the registered server you want to query.
- Right-click on the registered server and select New Query.
- A new query editor window opens and is connected to the server.
Connect to a registered server in a Central Management Server (CMS)
When a user connects to a registered server in a CMS, they must enter the appropriate authentication and login information in the connection dialog. Connection information for individual registered servers isn't persisted within the CMS.
The Microsoft.Data.SqlClient
(MDS) driver was updated to version 5.x with SSMS 20, which defaults to use Mandatory (True) for encryption, instead of Optional (False). For more information, see Connect with SQL Server Management Studio.
If there's no trusted certificate installed for the registered server to which you're trying to connect, you see the error:
Cannot connect to <server>
A connection was successfully established with the server, but then an error occurred during the login process.
(provider: SSL Provider, error: 0 - > The certificate chain was issued by an authority that is not trusted.)
(Microsoft SQL Server, Error: -2146893019)
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver--2146893019-database-engine-error
The certificate chain was issued by an authority that is not trusted
Note
You should install trusted certificates for your server when using Mandatory encryption.
To bypass this message for future connections to a registered server in a CMS, you can either:
- Connect to the registered server with Trust server certificate enabled for the connection.
- Enable the Trust server certificate option for the CMS.
Note
Starting with SSMS 21.4.8, when you connect to a registered server the connection information for that server is added to the Most Recently Used (MRU) list of connections, if it doesn't already exist. You don't need to modify the connection, for example enable Trust Server Certificate for subsequent connections, even after you restart SSMS. The MRU is available in the connection dialog, whether you connect to Object Explorer or a query editor.
To enable the Trust server certificate option for the CMS:
Go to the top level CMS.
Right-click on the CMS and select Central Management Server Actions > Properties. Check the box for Trust server certificate.
Select Save.
Go to Tools > Options > SQL Server Object Explorer > Commands, and under Connection security, for Trust server certificate for imported connections, select Always, then Ok.
Multiserver queries
The Query Editor window in SQL Server Management Studio can connect to and query multiple instances of SQL Server at the same time. For more information about how to execute Transact-SQL statements on the servers in a server group at the same time, see Execute statements against multiple servers simultaneously in SQL Server Management Studio.