linked oracle server

  • I want to create a linked server to access an Oracle database instance.

    I must Create an SQL*Net alias name on the server running SQL Server that points to an Oracle database instance. I don't know exactly how to do this.

    And the second question is the following:

    how can I make a but file that will generate a database and it's objects. There are some sql files and these files must be open in a setup that will create the database and all their objects.

    Thanks'

  • Firstly the SQL Server box must have the Oracle CLIENT installed.Then add the oracle alias in the tnsnames.ora file in the ADMIN dir of the oracle installation. Then read up on BOL on linked servers to set up the link on SQL.

    You can generate a script by right clicking on the Database in Enterprize Manager choosing All Tasks then Generate SQL Script....

     


    Andy.

  • /*

    May need to make some registry changes after installing Oracle client - check the following keys

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Transaction Server\Microsoft\MSDTC\MTxOCI]\Local Computer\My Computer]    

     "OracleXaLib"="oraclient8.dll"  

     "OracleSqlLib"="orasql8.dll" 

     "OracleOciLib"="oci.dll"

    -- Adding linked server (from SQL Server Books Online):

    sp_addlinkedserver [@server =] 'server'

     [, [@srvproduct =] 'product_name']

     [, [@provider =] 'provider_name']

     [, [@datasrc =] 'data_source']  ALIAS SET UP IN ORACLE CLIENT

     [, [@location =] 'location'] [, [@provstr =] 'provider_string']

     [, [@catalog =] 'catalog']

    -- Adding linked server login:

    sp_addlinkedsrvlogin [@rmtsrvname =] 'rmtsrvname'

     [,[@useself =] 'useself']

     [,[@locallogin =] 'locallogin']

     [,[@rmtuser =] 'rmtuser']

     [,[@rmtpassword =] 'rmtpassword']

    Stephen Marais
    Integration Architect
    Digiata Technologies
    www.digiata.com

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

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