Skip to content
Advertisement

Tag: openquery

DELETE FROM Openquery

I’m doing a project at work regarding linked servers. As we need to pass the name of the linked server I came up with this approach: DECLARE @OPENQUERY nvarchar(4000), @TSQL nvarchar(4000), @…

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