By using AWS re:Post, you agree to the Terms of Use

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

0

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 
@rmtsrvname=N'x.x.x.x\InstanceName',@useself=N'False',@locallogin=NULL,@rmtuser=N'username',@rmtpassword='password';

GO

Error being returned:

TITLE: Microsoft SQL Server Management Studio
------------------------------

The test connection to the linked server failed.

------------------------------
ADDITIONAL INFORMATION:

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
asked 25 days ago57 views
1 Answers
0

Hello,

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 https://console.aws.amazon.com/support/home#/case/create or by following steps in link https://docs.aws.amazon.com/awssupport/latest/user/case-management.html and provide details of the DB Instance endpoint, if used, on-premises source IP.

SUPPORT ENGINEER
answered 18 days 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