Skip to content
Advertisement

Is there a way to obtain linked server query information?

I’m trying to query information on a linked server. The code works fine when run on the machine but doesn’t when connected via a linked server:

The error I get is:

Purpose behind it is to keep a track of queries run across an estate of servers into 1 central so we can monitor impacts (basically building an in-house server monitoring tool). Is there a setting I need to change on the linked server?

Advertisement

Answer

As per this question, you can either try adding a WITH (NOLOCK), or use OPENQUERY.

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