How to access data from TWO (2) different SQL Server.

  • Hello,

     

    I know you can use Linked Server and Open Query to access data between two different SQL server or any type of data source.

     

    My Question is there any other way beside OpenQuery to access data on two SQL Server.

     

    SQL Server 1: SERVER1

    Tables : TAB1, TAB2

    SQL Server 2: SERVER2

    Tables: TABA, TABB

     

    So from SERVER1 can I write a query to access table on SERVER2..TABA

     

     

    Select * from <Server Name>..<database Name>.<Table Name> ????

  • Like you said....Linked Server will work. Link the two servers and then in your script use the four-part naming convention as.....

    servername.database.owner.table

     

    -SQLBill

  • Thanks SQLBill for the fast reply... it worked.... I just have forgot the DBO.

Viewing 3 posts - 1 through 2 (of 2 total)

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