Skip to content
Advertisement

Tag: linked-server

Iterate through a list of servers in SQL Server

I have a script similar to below and get: Could not find server ‘@CURSERVER’ in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers. I am trying to get SQL Server Agent jobs from all linked servers. I don’t think there is a problem with my linked

SQL Server 2014 slow remote insert

I have several linked servers and I want insert a value into each of those linked servers. On first try executing, I’ve waited too long for the INSERT using CURSOR. It’s done for about 17 hours. But I’m curious for those INSERT queries, and I checked a single line of my INSERT query using Display Estimated Execution Plan, it showed

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

How to test linkedserver’s connectivity in TSQL

I need to write a procedure to collect data from several remote servers, I use linkedservers and OPENQUERY to gather data from servers, but sometimes I lose connection to some servers or I simply can’t connect them (e.g. remote server is offline)- and OPENQUERY results in time-outs in these cases. So I wanted to check linkedservers connectivity first and then

Advertisement