Skip to content
Advertisement

SQL Server – Add a linked server to AWS RDS instance

From this AWS link it explains how to add a linked server: https://aws.amazon.com/blogs/database/implement-linked-servers-with-amazon-rds-for-microsoft-sql-server/

Specifically these commands

The main problem is it seems to be a mix of ‘, `, and “

I get syntax errors, and I assume that’s why. Plus, I don’t know why it has the N before a bunch of them. It looks to me like they copy and pasted the commands, but the characters changed. I’m not sure how to fix these syntax errors.

I ran it as is without changing anything. I knew it would error because the connection variables weren’t changed, but I wanted to see the syntax errors:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ‘’’.

Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ‘’’.

Msg 105, Level 15, State 1, Line 2
Unclosed quotation mark after the character string ‘’,@rmtpassword=‘’; ‘.

Advertisement

Answer

I got it working, but want to leave the question in case others run into the same problem. Below is the corrected syntax.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement