0

I have a feeling I know the answer, but could not find the actual answer anywhere.

If I have two RDS instances in a VPC, both running SQL Server, can I communicate between the two? As in reference a stored procedure from DB_123 in DB_456, or a table in DB_123, in a stored procedure in DB_456.

j-hurst
  • 289
  • 1
  • 3
  • 12
  • What do you mean by communicate? But yes - there is no networking reason why you wouldn't be able to. – WarrenG May 16 '19 at 16:13
  • @WarrenG - Good call, I tried to update my question with an example to make more sense what I am looking for. But if I have TableA in DB_123, can I reference that table in a stored procedure in DB_456? – j-hurst May 16 '19 at 18:25

1 Answers1

1

If both servers are on the same VPC, there aren't limitations on the internal communication between them.

If do you want to make queries between them through procedures, you should first link both SQL Servers and then follow the T-SQL below as stated at this topic.

SELECT * FROM [LinkedServer].[RemoteDatabase].[User].[Table]
  • Worth noting, there are some limitations related to linked servers in RDS: https://aws.amazon.com/blogs/database/implement-linked-servers-with-amazon-rds-for-microsoft-sql-server/ – Michael - sqlbot May 17 '19 at 01:34