SQL Server Performance

Selecting server variables from linked server

Discussion in 'General DBA Questions' started by Chappy, Dec 4, 2002.

  1. Chappy New Member

    I have several servers linked together which I want to peform the same queries on and bundle into a report.
    Is there any way I can select sql variables from a linked server ?

    A simple example would be to get a list of all versions of the servers..

    I can do

    but Id like to do
    select * from CAPPUB.@@version

    or something similar. Is this possible ?

  2. royv New Member

    Wrap your code in a stored procedure and then call the stored procedure on the linked server. So you would have a procedure that would get the server variable value for you, and then you would call this procedure from your other server:


    "How do you expect to beat me when I am forever?"
  3. mpazir New Member

    Also take a look at Partitioned View in the SQL Server Books Online
  4. Chappy New Member

    partitioned views are very interesting!
    the sp idea i didnt think of, but thats the best solution for me.
    Thanks !

Share This Page