Connection Oracle to SQL Server

From: Jim (jim_esti_at_hotmail.com)
Date: 04/06/04


Date: Tue, 6 Apr 2004 14:55:56 -0700

I have a large group of people using the SQL server. I
have another group of people that use Oracle - mainly for
payroll and such. Now the people using oracle want real
time access to the data that is on the SQL server.

I tried to create an Oracle database link to a SQL Server
database with no luck (see below). Has anyone had any
experince with this task? Or maybe a way that the SQL
server can update the oracle tables? I was working on a
Data Transformation Services package but realized that I
was looking at a few hundred tables. I really did not
want to create over a hundred Transfrom data tasks. Also
this would only fire on a scheduled bases and did not seem
to update the oracle tables rather it just seemed to
insert all the rows again. I need a real time way to
access the SQL server data from an oracle instance.

I am using Oracle8i Enterprise Edition Release 8.1.6.0.0
I am Using SQL Server (MSSQL7).

The Oracle server is one location, the SQL server is
another location and I am in a third location. I able to
login to the Oracle and SQL server from my location.

Here is what I have done so far:
1) From the Start menu, I clicked Settings > Control Panel
> Administrative Tools and select the Data Sources (ODBC)
icon.
2) Select the System DSN tab to display the system data
sources.
3) Click Add.
4) From the list of installed ODBC drivers, selected the
name of the driver that the data source will use - SQL
Server.
5) Click Finish.
6) Enter a name for the DSN, 'oracle_to_sql' and SQL
Server machine (MYSqlServer).
7) Continue clicking Next and answering the prompts until
I reached the end (click Finish).
8) I tested the connection and it was good.
9) added to the "network/admin/tnsnames.ora"
and "network/admin/listener.ora" files (on my local drive):

   Tnsnames.ora
   ------------
       hsodbc=
         (description=
           (address=(protocol=tcp)(host=MYSqlServer)
(port=1521))
           (connect_data=(sid=hsodbc))
           (hs=ok)
     )

   Listener.ora
   ------------
       sid_list_listener=
         (sid_list=
           (sid_desc=
             (sid_name=hsodbc)
             (ORACLE_HOME = c:\orant)
             (program= hsodbc)
           )
         )

10) Stopped/Started the Oracle listener
    lsnrctl stop
    lsnrctl start

11) In $ORACLE_HOME/hs/admin/inithsodbc.ora made sure I
added the statement below:
    #
    # HS init parameters
    #
    HS_FDS_CONNECT_INFO = oracle_to_sql
12) Connect to the Oracle database and create a database
link to access the target database.
    SQL> create database link hsodbc
    SQL> connect to scott identified by tiger
    SQL> using 'hsodbc';

--- Here I get a connection failed message.

So I tried to great a database link by:
      create database link sqlserver connect to scott
identified by tiger
      using 'ODBC:oracle_to_sql';

This appears to work but when I do the query:

select * from mytable@sqlserver;

I get the error message:
"ORA-06401: NetCMN: invalid driver designator"

I then edited the INIT.ORA file
and Set the global_names = false

But still get the "ORA-06401: NetCMN" error.

Any ideas on how I could accomplish my goal?



Relevant Pages

  • Re: Why not Access...?
    ... Next, I DID NOT SAY Oracle was considered a "best choice," only a sufficient ... It is a desktop application and the database in also on the same machine. ... I also want to know why Oracle is considered a best choice as compared to SQL Server. ... > Also, you need to answer the question regarding whether or not each client> will be using an individual database, and individual copy of a central> organization database, or making straight calls to a centralized ...
    (microsoft.public.sqlserver.server)
  • Re: Merge/Replication or Syncing with Oracle
    ... You can't directly access an Access database on the desktop from a WM 5 app, but you can sync between SQL Compact on the WM device and Access using the Access Syncronizer: ... As for the Oracle issue ... ... Where SQL Compact Edition easily does merge/replication to SQL Server using IIS ... ...
    (microsoft.public.sqlserver.ce)
  • Re: Oracle vs SQL Server as a back end for Access?
    ... post -- comparing back end database engines or replacing the front end ... say that Oracle 10g is better than SQL Server 2000 without determining ... whether or not the total cost of ownership of 10g over SQL Server ... developer than Oracle 10g, in spite of its new web interface. ...
    (comp.databases.ms-access)
  • Re: Oracle licence question
    ... And no - it does not freeze anything, the backups DO NOT affect connections ... SQL Server MVP ... freeze the database and send it to the target. ... What I really wanted is something that lists features I get in Oracle ...
    (comp.databases.oracle.server)
  • Re: IOT, memory and transaction time
    ... easily generate it with DBMS_METADATA.GET_DDL if your verison of Oracle ... were pretty consistent no matter how big the table (this transaction ... FOREIGN KEY (versionNo) REFERENCES T_TRANSACTIONS, ... Oracle provides read consistency and SQL Server ...
    (comp.databases.oracle.misc)