Amazon RDS for SQL Server Linked Servers with named instances connects fail


We are having an issue with Amazon RDS for SQL Server Linked Servers with named instances connections failing with our on-premise SQL Server instance. We know it is not a networking issue since we are able to created a linked server connection to the main database at the same IP address. Are there any other additional parameters that need to be passed for them to work or are they not supported?

Code used to add linked server, source Implement Linked Servers with Amazon RDS for Microsoft SQL Server

EXEC master.dbo.sp_addlinkedserver @server = N'x.x.x.x\InstanceName', @srvproduct=N'', @provider=N'SQLNCLI', @datasrc=N'x.x.x.x\InstanceName';

EXEC master.dbo.sp_addlinkedsrvlogin 


Error being returned:

TITLE: Microsoft SQL Server Management Studio

The test connection to the linked server failed.


An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. 
OLE DB provider "MSOLEDBSQL" for linked server "x.x.x.x\InstanceName" returned message "Login timeout expired".
OLE DB provider "MSOLEDBSQL" for linked server "x.x.x.x\InstanceName" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.". (Microsoft SQL Server, Error: -1)
profile picture
Shawn E
asked 2 years ago683 views
1 Answer


Based on my understanding of the stored procedure called, a linked server was created for SQL Server (on-premises) to RDS SQL Server. The error messages could indicate :

  • Issue with network configuration between the RDS SQL Server Instance and the SQL Server ( on-premises). Please be sure you are allowing traffic from the IP address of the On-premises , as well as on the port that SQL Server is using to listen for database.

  • Or, issue with calling the stored procedure sp_addlinkedserver and sp_addlinkedserverlogin.

I reviewed both called stored procedure and there are no issue detected. Compared to the documentation, the stored procedure you provided is accurate. Therefore, please make sure you are allowing network traffic by using the TCP port through the security group for each inbound instance of SQL Server.

To further look into the DB Instance network configuration, please open a support case with AWS using the following or by following steps in link and provide details of the DB Instance endpoint, if used, on-premises source IP.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions