Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2003
    Posts
    7

    Unanswered: Proc to Connect to 2 diff DBs on different platform

    Hi,
    I want to know the procedure of
    1) how to connect to 2 different database
    2) Fetch some tables from one DB to another DB.
    3) Get the data from one DB and import it to another DB
    Eg:- MS SQL server & Oracle

    I want to basically fetch some of fields from Oracle & import it to SQL server.
    Is it possible to do the above task. If yes how do we do it?

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Singapore
    Posts
    4

    Re: Proc to Connect to 2 diff DBs on different platform

    You can use Linked Server to connect to your Oracle database from your SQL server. The steps will be:

    1. Create a linked server via Enterprise Manager or use command sp_addlinkedserver. You can choose to connect to few sources, through OLE DB, including Oracle or MSAccess mdb file.

    2. You can then refer to the external tables by: <name_of_linkedserver>.<database>.<userID>.<tablen ame>

    ex. SELECT * FROM MyLinkSvr.Northwind2.dbo.Customers

    Best Regards.

  3. #3
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    You will probably need to install the Oracle client on your SQL server before you can establish a linked server connection.

    Also you might want to check out OPENQUERY as this will prevent the movment of unneeded data from Oracle to SQL.

    Both topics can be found in Books Online.
    Paul Young
    (Knowledge is power! Get some!)

  4. #4
    Join Date
    Jun 2003
    Posts
    7
    Originally posted by Paul Young
    You will probably need to install the Oracle client on your SQL server before you can establish a linked server connection.

    Also you might want to check out OPENQUERY as this will prevent the movment of unneeded data from Oracle to SQL.

    Both topics can be found in Books Online.
    Thanks a lot, will try out this option
    SJ

Posting Permissions

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