Connecting SQL server from Oracle 11g

Hello,
I know there are several threads available to this post but please help me in
*step by step process to follow in connecting 2 servers.
I tried everything in internet but got Connection closed error after tnsping of DNS name. Do i need to run any instance sort of thing in SQL server?
I dont have any access on SQL server.Whatever i have to do that has to be only in Oracle server.I got all those information and created ODBC (using SQL server driver) and tested the connection successfully in Oracle server. Altered INIT*.ORA,TNSNAMES.ORA and LISTENER.ORA but when pinging TNS awfully getting the afore said error.
My environment : Oracle 11g server - SQL server 2008 ( both in windows platform).
My
TNS names entry
GSIS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.1)(PORT = 63455))
(CONNECT_DATA = (SID=GSIS)
(SERVER = DEDICATED)
(HS=OK)
Listener entry
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = COB417147.cob.apac.bosch.com)(PORT = 1522))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\bin\oraclr11.dll")
(SID_DESC =
(SID_NAME = GSIS)
(ORACLE_HOME = C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1)
(PROGRAM = hsodbc)
and
initGSIS
entry
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO = GSIS
HS_FDS_TRACE_LEVEL = OFF
# Environment variables required for the non-Oracle system
#set
when tnsping i am getting
TNS connection closed.
I am awfully stuck here.
Please guide..

Status
C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\BIN>lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 11-MAY-2012 17:48
:14
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1522)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date 11-MAY-2012 17:36:30
Uptime 0 days 0 hr. 11 min. 48 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\network\
admin\listener.ora
Listener Log File c:\oracle\app\amk1cob\diag\tnslsnr\COB417147\listener\
alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1522ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=COB417147.cob.apac.bosch.com)(PORT=1
522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=COB417147.cob.apac.bosch.com)(PORT=8
080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "GSIS" has 1 instance(s).
Instance "GSIS", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl.cob.apac.bosch.com" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.cob.apac.bosch.com" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
TNS ping
C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\BIN>tnsping GSIS
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 11-MAY-2
012 18:21:55
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.
1.1)(PORT = 63455)) (CONNECT_DATA = (SID=GSIS)) (HS=OK))
TNS-12537: TNS:connection closed
C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\BIN>
BTW it is 32-bit machine.
Edited by: 933729 on May 11, 2012 5:57 AM

Similar Messages

  • Connect SQL Server From Oracle

    Hi Experts,
    I want's to made connection from Oracle 10g to Ms SQL Server 2000. I made necessary entries in receptive file, but still getting an error...
    Setting info .....
    */hs/initMYSQLSERVERDSN.ora*
    HS_FDS_CONNECT_INFO = MYSQLSERVERDSN
    HS_FDS_TRACE_LEVEL = OFF
    LISTENER.ORA
    LISTENERMYSQLSERVERDSN =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)(queuesize=80)))
    SID_LIST_LISTENERMYSQLSERVERDSN=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=MYSQLSERVERDSN)
    (ORACLE_HOME = E:\oracle\product\10.1.0\db_1)
    (PROGRAM=hsodbc)
    TNSNAME.ORA
    MYSQLSERVERDSN =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    (CONNECT_DATA=(SID=MYSQLSERVERDSN))
    (HS=OK)
    LISTENER start successfully, and tnsping working fine.
    But after createing db link , when i execute query desc spt_datatype_info@mysqlserverdsn;
    I am geting an error message in listenermysqlserverdsn.log file
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    Please help me out from this issue.
    Thanks in Advance
    Mani

    You OS ?
    I have also done the same.
    I did install SQL Server & Oracle on another machine with Windows.
    For more pls visit.
    http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
    Aqeel Nawaz

  • Connect Sql Server From Oracle Both on Windows

    I want to connect my SQL Server running on Windows2003 with my oracle database 10g which is also on windows through some odbc which i have also created on my machine running oracle 10g. Can some one guide me with simple steps.

    Generally most folks use OLEDB rather than ODBC for that.
    If you have Metalink access, check out the following note:
    Note.191368.1 Ext/Pub How to Create a Sql Server Linked Server With The Oracle Provider for OLE DB:
    Hope it helps,
    Greg

  • How to connect to a Sql server from Oracle using db link

    Hi All,
    Does anybody have any idea about how to connect to a sql server from oracle database using db link to syncronize the data? I need to pull the data from Sql server table to Oracle tables and relay messages back to the sql server.
    Thank you,
    Praveen.

    we have 2 products - DG4MSQL and DG4ODBC.
    DG4ODBC is for free and requires a 3rd party ODBC driver and it can connect to any 3rd party database as long as you use a suitable ODBC driver
    DG4MSQL is more powerfull as it is designed for MS SQL Server databases and it supports many functions it can directly map to SQL Server equivalents - it can also call remote procedures or participtae in distributed transactions. Please be aware DG4MSQL requires a license - it is not for free.
    Check out Metalink and you'll find notes how to configure both products.
    For a generic overview:
    Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
    And the setup notes:
    DG4ODBC
    Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) :
    Note.466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit RDBMS.HS-3-2 :
    Note.109730.1 How to setup generic connectivity (HSODBC) for 32 bit Windows (Windows NT, Windows 2000, Windows XP, Windows 2003) V817:
    Note.466228.1 How to Setup DG4ODBC on Linux x86 32bit
    DG4MSQL
    Note.466267.1 How to Setup DG4MSQL (Database Gateway for MS SQL Server) on Windows 32bit
    Note.562509.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX)
    Note.437374.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) Release 11 on Linux

  • Regarding the tns-12541 error in connecting to sql server from oracle

    i need to create a database link from oracle on windows box to sql server.I configured everything but when i am trying to tnsping the sqlserver
    it throws me an TNS12541 no listener error.
    The listner status is up and the listener works

    little confusion here, are you trying to tnsping sql server? tnsping is an Oracle utulity.
    To acces sql server from Oracle you may use Transparent Gateway for Microsoft SQL - http://download.oracle.com/docs/cd/B19306_01/gateways.102/b14270/ch3.htm#sthref66 and Heterogeneous Connectivity - http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/intro.htm#sthref33
    Best regards.

  • Connect to DB2 from oracle 11g on windows 2008 server

    Hi Folks,
    I want to conenct to DB2 from oracle 11g using DB link.
    DB2 :
    user : db2user
    pwd : db2pwd
    database : db2database (OSBLDEV)
    able to connect to db2 server (installed on machine M1) using db2 client with above details from machine M2 (where oracle is installed).
    Oracle :
    user : orauser
    pwd : orapwd
    host : orahost
    port : 1521
    service : oraservice
    able to connect to oracle server using oracle sql developer with above details on Machine M2 (windows 2008 server)
    when i execute the query with database link
    select row_id from siebel.s_org_ext@OSBLDEV;
    I get the message : ORA-12154: TNS:could not resolve the connect identifier specified.
    could you pls check and let me know whether the below enteries are correct or not.
    Pls share if you have step by step connectivity from DB2 to oracle using DB link.
    1. I have created the Data source for DB2 - test successful
    create database link OSBLDEV
    connect to "db2user"
    identified by "ldb2pwd"
    using 'OSBLDEV';
    1. I have made the following entry in E:\oracle\product\11.1.0\db_1\hs\admin\initosbldev.ora
    HS_FDS_CONNECT_INFO = OSBLDEV
    HS_FDS_TRACE_LEVEL = 0
    2. I have made the following entry in E:\oracle\product\11.1.0\db_1\NETWORK\ADMIN\tnsnames.ora
    OSBLDEV =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=orahost)(PORT=1521))
    (CONNECT_DATA=(SID=OSBLDEV))
    (HS=OK)
    3. I have made the following entry in E:\oracle\product\11.1.0\db_1\NETWORK\ADMIN\listener.ora and releoaded the listner (lsnrctl reload)
    LISTENER =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=orahost)(PORT=1521))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
    SID_LIST_LISTENER=
    (SID_LIST=
         (SID_DESC = # this is the entry for HSODBC
         (SID_NAME = OSBLDEV)
         (ORACLE_HOME = e:\oracle\product\11.1.0\db_1)
         (PROGRAM = hsodbc)
    Thanks in advance.

    1. My listener.ora is placed at the below location:
    E:\oracle\product\11.1.0\db_1\NETWORK\ADMIN
    2. I have modifed the listener and removed the entry - hsodbc
    3. stop and start the listener.
    still can't see the service entry in listener status.
    C:\>lsnrctl status
    LSNRCTL for 64-bit Windows: Version 11.1.0.7.0 - Production on 19-JUL-2010 02:27
    :08
    Copyright (c) 1991, 2008, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 64-bit Windows: Version 11.1.0.7.0 - Produ
    ction
    Start Date 19-JUL-2010 02:21:17
    Uptime 0 days 0 hr. 5 min. 52 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Log File e:\oracle\diag\tnslsnr\DALDEVDBCRM1\listener\alert\log
    .xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=daldevdbcrm1.corp.nai.org)(PORT=1521
    Services Summary...
    Service "+ASM" has 1 instance(s).
    Instance "+asm1", status READY, has 1 handler(s) for this service...
    Service "+ASM_XPT" has 1 instance(s).
    Instance "+asm1", status READY, has 1 handler(s) for this service...
    Service "ARIBADEV" has 1 instance(s).
    Instance "ariba", status READY, has 1 handler(s) for this service...
    Service "ARIBADEV_XPT" has 1 instance(s).
    Instance "ariba", status READY, has 1 handler(s) for this service...
    Service "ARIBAXDB" has 1 instance(s).
    Instance "ariba", status READY, has 1 handler(s) for this service...
    Service "aiad.corp.nai.org" has 2 instance(s).
    Instance "aiad1", status READY, has 2 handler(s) for this service...
    Instance "aiad2", status READY, has 1 handler(s) for this service...
    Service "aiadXDB.corp.nai.org" has 2 instance(s).
    Instance "aiad1", status READY, has 1 handler(s) for this service...
    Instance "aiad2", status READY, has 1 handler(s) for this service...
    Service "aiad_XPT.corp.nai.org" has 2 instance(s).
    Instance "aiad1", status READY, has 2 handler(s) for this service...
    Instance "aiad2", status READY, has 1 handler(s) for this service...
    Service "aianew" has 1 instance(s).
    Instance "aianew", status READY, has 1 handler(s) for this service...
    Service "aianewXDB" has 1 instance(s).
    Instance "aianew", status READY, has 1 handler(s) for this service...
    Service "aianew_XPT" has 1 instance(s).
    Instance "aianew", status READY, has 1 handler(s) for this service...
    The command completed successfully
    C:\>

  • Connect to SQL Server from Oracle

    Does Oracle offer any connectivity to NON-Oracle databases such as SQL Server from within the Oracle database itself, similar to a database link ?

    Yes, it's called Heterogeneous Connectivity. Basically how it works is you set up an ODBC data source on the Oracle server
    and need to modify the tnsnames.ora and listener.ora files. Once you get it set up it works exactly like a dblink. You should be
    able to find information on it in the Oracle manuals or from Metalink. There's also a Heterogenous Connectivity forum on OTN. If
    you can't find anything let me know and I can send you some documents on how to set it up. I think the hardest part for you might
    be finding a SQL Server ODBC driver for HP-UX.

  • How to connect sql server using oracle Client

    Hi,
    I am working in oracle9i and windows os 32 bit.
    I need to connect SQL server 2000 from my oracle client..
    I heard about heterogeneous connectivity ...
    Please expalin me the steps what to add and how to connect the sql server...
    Regs....

    Are you trying to connect to SQL Server from your Oracle database (i.e. create a database link in Oracle to SQL Server)? Or are you trying to connect to SQL Server using your Oracle client software (i.e. SQL*Plus)?
    The former just requires Heterogeneous Services with Generic Connectivity. The latter is functionality that has been depricated and probably no longer works in your environment.
    Justin

  • Connecting SQL server from Adobe forms

    Hi Experts,
    I want to know, whether it is possible to connect SQL Server database from Adobe Form directly at runtime without WAS/ADS. If it is possible, please provide any material to proceed further.
    Please help.
    Thanks,
    Rajee

    Have a look at the following document, it explains how to use a MS Access database but it should also work when using a ODBC Data source configured for a MS SQL database.
    [Providing interactive database lookup from forms|http://www.adobe.com/devnet/livecycle/articles/lc_designer_db_lookup_tip.pdf]
    I hope I could help you.

  • Connecting ms sql server from oracle using db link

    Hi,
    Source : Oracle 11g on linux
    destination : ms sql server 2005
    i need to create the db link from oracle to ms sql server to view the tables , is it posibble without configuring the gateways( as looks like it is licenced product)
    Please let me know any alternative to achive this
    Thanks
    PGR

    There are 2 gateway - the commercial Database Gateway for Ms SQl Server which requires a license and the Database Gateway for ODBC which is for free. The license for DG4ODBC is included in your database license. You only need to install a suitable ODBC driver on your Linux box (for example use the MS SQl Server ODBC driver for Linux - details can be found here: http://www.microsoft.com/en-gb/download/details.aspx?id=36437 ). and then configure the gateway using the My Oracle Support Note:
    How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install  
    [Article ID 561033.1]
    - Klaus

  • New To Oracle.. Needs Help:: Conversion from SQL Server to Oracle 11g

    I am new to Oracle 11g and badly need the conversion of SQL Server Functions to Oracle.. Sample Pasted Code not working .. end with error.. pls help
    Create Table TempT (ID1 Varchar (10),
    ID2 Varchar (10)
    CREATE OR REPLACE PACKAGE GLOBALPKG
    AS
    TYPE RCT1 IS REF CURSOR;
    TRANCOUNT INTEGER := 0;
    IDENTITY INTEGER;
    END;
    CREATE OR REPLACE FUNCTION fTempT
    i IN VARCHAR2 DEFAULT NULL
    RETURN GLOBALPKG.RCT1
    IS
    REFCURSOR GLOBALPKG.RCT1;
    BEGIN
    OPEN REFCURSOR FOR
    SELECT TT.*
    FROM TempT TT
    WHERE (fTempT.i = ''
    OR TT.ID1 = fTempT.i)
    RETURN REFCURSOR;
    END;
    CREATE OR REPLACE FUNCTION fTempTF
    i IN VARCHAR2 DEFAULT NULL
    RETURN GLOBALPKG.RCT1
    IS
    REFCURSOR GLOBALPKG.RCT1;
    BEGIN
    OPEN REFCURSOR FOR
    SELECT *
    FROM TABLE(fTempT(i))
    RETURN REFCURSOR;
    END;
    LAST FUNCTION ENDs WITH ERROR
    Error(13,7): PL/SQL: ORA-22905: cannot access rows from a non-nested table item

    2. The major purpose is to get a simplest way to create a parameterized function who can return a table like output. 2nd function has no use instead i was testing the result of First Function like thisIf you just want to select from a select, you should use a view not a function.
    1. which program is more help ful for writing and executing queries bcoz after using Query Analyzer of Microsoft It seems difficult to work on SQL Developer.
    sqlplus? If you are having difficulty learning new tools because of an old one you used, probably best to forget the old one and concentrate on learning the new one because it will be different. This goes for the database itself also.
    2. Can DMLs be used within a Function.Yes, you just can't execute the function in another SQL statement if it modifies data and this is a good thing.
    3. Can temporary tables be used within a function.Unfortunately yes, but they shouldn't be unless you are in a slowest application competition.
    5. Each Function which is a Table Function must be accompanied with Type Definitions?? its a bit longer way of doing the things than SQL ServerThat is why it is better to use views instead, is there any reason you want a select that you can select from inside a function?
    SQL Server for last 9 years thats why i refer this toolThat is not in itself a problem, if you try and do what you did in SQLServer in Oracle, that will be a problem though.

  • How to Migrate from SQL server to oracle 11g

    Hi,
    i have many tables in sql server and i want to link them in oracle

    Welcome to the forum,
    Hi,
    To link Oracle with SQL Server follow this steps:
    1-Install Oracle ODBC drivers on the server (your local Oracle database) that will access the remote SQL Server database using the database link.
    2. Setup the ODBC connection on the local Oracle database using the Windows ODBC Data Source Administrator
    3. Test the ODBC drivers to ensure that connectivity is made to the SQL Server database.
    4. Ensure that your global_names parameter is set to False.
    5. Configure the Oracle Heterogeneous services by creating an initodbc.ora file within the Oracle database.
    7. Modify the Listener.ora file.
    SID_NAME is the DSN for the remote database.
    ORACLE_HOME is the actual Oracle home file path.
    PROGRAM tells Oracle to use heterogeneous services.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=Cas30C) -- Enter the DSN on this line
    (ORACLE_HOME = c:\oracle10gdb) -- Enter your Oracle home on this line
    (PROGRAM = hsodbc) ) )
    8. Modify the Tnsnames.ora file. This is the Oracle database installation accessed by the users to connect to the ODBC drivers
    (DESCRIPTION=
    (ADDRESS_LIST=
    (Address=(PROTOCOL=TCP)
    (HOST=
    -- (Server x)
    (PORT=1521))) -- Enter the port on which the server x Oracle installation
    -- is listening
    (CONNECT_DATA=(SID=Cas30c)) - Enter the DSN name
    (HS=OK) -- Enter this value. It tells Oracle to use hetergeneous services
    9. Reload the listener on local Oracle database
    10. Create a database link on the local Oracle installation that accesses the heterogeneous connection, which, in turn, connect to SQL Server.
    11. Run a SQL Server Select statement from the Oracle installation using the database link
    Thanks
    BelMan :)

  • Connect to MS SQL SERVER FROM ORACLE 10G(OS- WIN XP)

    HI
    I NEED TO ACCESS MS SQL SERVER DATABASE FROM ORALCE 10G(OS -WIN XP)
    SOLUTION PLZ?
    Edited by: X7C7 on Nov 26, 2008 11:47 AM

    http://download.oracle.com/docs/cd/B19306_01/gateways.102/b14270/ch2.htm#sthref35
    HTH...

  • Steps to connect SQL Server to Oracle works but WHY ??

    The following steps is what I have to do in order to get SQL Server to talk to an Oracle database.
    These steps, for me, work 100% of the time. Any deviation from the following steps will result in failure.
    Rebooting the machine didn't make any difference between each of the steps.
    My question is why I have to install the client a second time?
    All the documentation that I have found at Oracle, Microsoft, or elsewhere state that I only need the InstantClient.
    =========================================
    Some server I don't have access to
    with Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit installed
    Windows XP SP3 - 32bit
    with Microsoft SQL Server 2005 SP3 installed
    The following steps are done on the Windows XP machine.
    1) install win32_11gR2_client
    Select: InstantClient (174.0MB)
    Path: C:\Oracle
    2) install ODTwithODAC112021
    Select: Oracle Data Access Components for Oracle Client
    Oracle Base: C:\Oracle
    Name: OraClient11g_home1
    Path: C:\Oracle\product\11.2.0\client_1
    3) Add entries for tnsnames.ora and sqlnet.ora
    4) Ensure environmental variable ORACLE_HOME is set to C:\Oracle\product\11.2.0\client_1
    5) SQL Server Management Studio
    Check "Allow Inprocess" for Oracle Provider OraOLEDB.Oracle
    Restart SQL Server
    Try to add link to Oracle - fails to connect
    "The test connection to the linked server failed."
    Additional information:
    An exception occurred while executing a Transact-SQL statement or batch.
    (Microsoft.SqlServer.ConnectionInfo)
    Cannot initialize the data source object of OLE DB Provider "OraOLEDB.Oracle" for linked server "ORACLEDB".
    OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLEDB" returned message "".
    (Microsoft SQL Server, Error: 7303)
    6) install win32_11gR2_client
    Select: Administrator (1.02GB)
    Oracle Base: C:\Oracle
    Software Location: C:\Oracle\product\11.2.0\client_1
    7) Ensure environmental variable ORACLE_HOME is set to C:\Oracle\product\11.2.0\client_1
    8) Ensure tnsnames.ora and sqlnet.ora still exist and are unchanged.
    9) SQL Server Management Studio
    Restart SQL Server
    Add link to Oracle - Successful

    You actually installed the client *3* times there.
    I'm fairly sure install Instant client via win32_11gR2_client will not give you oraoledb. ODAC and administrator/runtime will though.
    You should only need install ODTwithODAC112021 OR win32_11gR2_client (with runtime or administrator option) and be able to connect using SQLServer.
    Greg

  • Linking to SQL Server from Oracle 10g on 64bit Linux

    I have this working, so I thought I would post my steps.
    In versions 8 to 10 of Oracle, the software for making these connections was known as Heterogeneous Services. It was 32bit only software and the actual binary file that was executed when querying a non oracle database was $ORACLE_HOME/bin/hsodbc. When a query was made to the linked database, a process was started on the machine with the name of hsodbcXXX (where XXX is the name of the DSN).
    In version 11g of Oracle this software is now referred to as Database Gateways and there is a 64bit version as well as a 32bit version. The binary file that is executed in this case is $ORACLE_HOME/bin/dg4odbc.
    Fortunately the 64bit Database Gateway software can also be used with Oracle 10g databases as long as it is up to version 10.2.03 and has the odbc compatibility patch installed. (5965763).
    To make use of this, we need to install the 11g ODBC Gateway into a separate ORACLE_HOME and start a listener from that environment. We can then make use of that listener from the 10g environment.
    So here is what I did to get this working: (Note: DSN = MyDSN)
    1.     Download and install 64bit ODBC driver with support for 64-bit ULEN from Easysoft. The file is named odbc-sqlserver-1.1.4-linux-x86-64-ul64.tar. You'll need to email Easysoft support for the URL. Create the DSN entry as part of the install. At the end of the process it can test the DSN. The query should come back with info about the SQL Server. Test the connection using isql from the /opt/easysoft/unixODBC/bin directory to verify that it works as well (/opt/easysoft/unixODBC/bin/isql –v MyDSN). Note, I installed easysoft driver under /opt rather than the /usr/local which is the default. /usr/local/easysoft is a symlink to /opt/easysoft.
    2.     Install ODBC gateway via the 11g Gateways installer. You can do a custom install and deselect all but the ODBC Gateway component. (http://download.oracle.com/otn/linux/oracle11g/linux.x64_11gR1_gateways.zip)
    3.     Create a /home/oracle/11g_environment.sh script that sets 11g ORACLE_HOME, PATH, and LD_LIBRARY_PATH variables. It should look something like this:
    #set ORACLE ENV vars for 11g
    ORACLE_HOME=/u01/app/oracle/product/11.1.0/tg_1 # (assuming that is where ODBC Gateway was installed)
    PATH=/bin:/usr/bin:/u01/app/oracle/product/11.1.0/tg_1/bin:/opt/easysoft/bin:/opt/easysoft/unixODBC/bin
    LD_LIBRARY_PATH=/opt/easysoft/lib:/opt/easysoft/unixODBC/lib:/u01/app/oracle/product/11.1.0/tg_1/lib
    export ORACLE_HOME
    export PATH
    export LD_LIBRARY_PATH
    4.     Create $ORACLE_HOME/hs/admin/initMyDSN.ora, $ORACLE_HOME/network/admin/listener.ora, and $ORACLE_HOME/network/admin/tnsnames.ora under 11g structure. They are as follows:
    initMyDSN.ora:
    # This is a sample agent init file that contains the HS parameters that are
    # needed for an ODBC Agent.
    # HS init parameters
    HS_FDS_CONNECT_INFO=MyDSN
    HS_FDS_TRACE_LEVEL=0
    HS_FDS_TRACE_FILE_NAME=MyDSN.trc
    HS_FDS_SHAREABLE_NAME=/opt/easysoft/unixODBC/lib/libodbc.so
    HS_FDS_SUPPORT_STATISTICS=FALSE
    # ODBC specific environment variables
    #set ODBCINI=/etc/odbc.ini
    #set ODBCINSTINI=/etc/odbcinst.ini
    #set LD_LIBRARY_PATH=/opt/easysoft/lib:/opt/easysoft/unixODBC/lib:/u01/app/oracle/product/11.1.0/lib
    #set PATH=$PATH:/opt/easysoft/unixODBC/bin:/opt/easysoft/bin/
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    listener.ora
    MyDSN =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
    SID_LIST_MyDSN =
    (SID_LIST =
    (SID_DESC=
    (SID_NAME=MyDSN)
    (ORACLE_HOME = /u01/app/oracle/product/11.1.0/tg_1)
    (PROGRAM=dg4odbc)
    (ENVS=LD_LIBRARY_PATH=/opt/easysoft/lib:/opt/easysoft/unixODBC/lib:/u01/app/oracle/product/11.1.0/tg_1/lib)
    tnsnames.ora
    # tnsnames.ora Network Configuration File:
    # Generated by Oracle configuration tools.
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    MyDSN =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST=localhost)(PORT=1522))
    (CONNECT_DATA=(SID=MyDSN))
    (HS=OK)
    5.     Add another entry for MyDSN in /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora so tnsping works in 10g environment as well.
    MyDSN =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST=localhost)(PORT=1522))
    (CONNECT_DATA=(SID=MyDSN))
    (HS=OK)
    *** Notice that the MyDSN listener runs on a different port (1522) as it is a separate listener.
    6.     Login to machine as user oracle and source the 11g environment script. “source ~/11g_environment.sh”. Now start the listener. “cd $ORACLE_HOME/bin”. “./lsnrctl start MyDSN”.
    7.     Login to a new shell as user oracle with a 10g environment.
    8.     Run sqlplus and create the database link. “CREATE PUBLIC DATABASE LINK SQLSERVER connect to “<someuser>” IDENTIFIED BY “<somepass>” USING ‘MyDSN’;”
    9.     test the link. “select * from information_schema.tables@SQLSERVER;”
    If it is successfull, you should see a system process named "dg4odbcMyDSN".

    So what have you found out for yourself so far (considering the solution to this is easily found on the web)?
    Have you looked up Heterogeneous Services?

Maybe you are looking for