Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Location
    Penang, Malaysia
    Posts
    212

    Unanswered: Can I link 2 tables from 2 different SQL Servers ?

    I know that 2 tables from 2 databases can be join together. But how about 2 tables from 2 databases which are store separately on 2 different SQL servers . Can this be done ?

  2. #2
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    You can create a linked server and join the tables using the 4 part sytax

    select *
    from svr1.db1.owner1.tbl1 tbl1
    join svr2.db2.owner2.tbl2 tbl2
    on tbl1.fld1 = tbl2.fld2

    Be careful though as the data will have to be sent to one of the servers to do the join.
    Setting collation compatability for the linked server will also affect this.

  3. #3
    Join Date
    Jul 2003
    Location
    Penang, Malaysia
    Posts
    212
    Will this effect the performance of the servers ?

    Will joining 2 SQL servers improve the performance of a query that was previously having performance problems ?

  4. #4
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    >> Be careful though as the data will have to be sent to one of the servers to do the join.

    It will probably be very slow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •