How to access a table on another database that located on a different server

  • Hello;

    I'm a SQL Server newbie. I'm trying to write a stored procedure for a Crystal Report extracting records from two different databases each located on a different server. I found that I can use OPENROWSET.

    Can someone show me how to use OPENROWSET?

    Thanks,

    David Lee

  • check Books Online

  • or use linked server also in BOL

  • Personally, I don't prefer using OPENROWSET, because it has some securities issues. I recommend you to use Linked Servers, as they are really easy to use. You just need to create a linked server using procedure sp_addlinkedserver & then create a remote server login mapping using the procedure sp_addlinkedsrvlogin. Books Online has an example on it....

    --Ramesh


  • Thank you.

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

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