Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    7

    Unanswered: how to query 2 databases on diff servers

    Hello dB gurus,
    Can anyone let me know how to query 2 diffrent dBs sitting on 2 diff servers?
    I had ORDERS dB(DB2) on one server and Dept dB(DB2) on a different server.I am using MS-Query to query these databases.My question is can I write a single SQL statement to select the data from diff tables from these two diff dBs on diff servers.If so any kind of DSN set up?
    Does this query work?
    SELECT ORDERS_dB.ORDERS_TABLE.ORDERS_FIELD,DEPT_dB.DEPT_T ABLE.DEPT_FIELD
    WHERE
    ORDERS_dB.ORDERS_TABLE.ORDERS_SomeKEY=DEPT_dB.DEPT _TABLE.DEPT_SomeKey
    Thanks in advance,
    Shiva

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: how to query 2 databases on diff servers

    Federated Databases

    Cheers
    Sathyaram

    Originally posted by rama_ttu
    Hello dB gurus,
    Can anyone let me know how to query 2 diffrent dBs sitting on 2 diff servers?
    I had ORDERS dB(DB2) on one server and Dept dB(DB2) on a different server.I am using MS-Query to query these databases.My question is can I write a single SQL statement to select the data from diff tables from these two diff dBs on diff servers.If so any kind of DSN set up?
    Does this query work?
    SELECT ORDERS_dB.ORDERS_TABLE.ORDERS_FIELD,DEPT_dB.DEPT_T ABLE.DEPT_FIELD
    WHERE
    ORDERS_dB.ORDERS_TABLE.ORDERS_SomeKEY=DEPT_dB.DEPT _TABLE.DEPT_SomeKey
    Thanks in advance,
    Shiva
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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