Very Very Urgent......Select data

  • Hi folks,

    I have two servers

    ServerA,

    ServerB

    Now I want to run the query like this from serverB

    select * from ServerA.master.dbo.sysdatabases

    But It gives error.....Can anyone help me with this....

    Thanks in Advance

  • Have you build a link server between ServerA and ServerB? If not, you could not query the other server.

  • If you don't have linked server, you can still query the other server but you need to use OPENROWSET or OPENDATASOURCE.

  • And, why do you think this is very very "urgent"?... It's been 9 hours since you've posted and 7 hours since the first response... yet, you've not replied to that post. I'm thinking... not so urgent. 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Can you post the error message?

    Q

    Please take a number. Now serving emergency 1,203,894

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply