You need to setup an HS connection from oracle to ms sql

1. From sys run $Oracle_Home/rdbms/admin/caths.sql

2. edit init.ora & set Global_Names = false
this will allow you to set db link names to anything you like

3. Setup your ODBC connections using Microsoft ODBC Administrator (or
other)

4. edit $Oracle_Home/network/ADMIN/sqlnet.ora set NAMES.DEFAULT_DOMAIN
= world
You may skip this step but remove all '.world' from examples below. If
you choose this step however you will need to edit $Oracle_Home/
network/ADMIN/tnsnames.ora and add '.world' to all your entries.

5. add entries in $Oracle_Home/network/ADMIN/tnsnames.ora e.g.
REDRING.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myOracleDB-01)(PORT = 1521))
)
(CONNECT_DATA =
(SID = redring)
)
(HS = OK)
)

6. add entries in $Oracle_Home/network/ADMIN/listener.ora e.g.
SID_LIST_LISTENER =
(SID_LIST =
.
.
.
(SID_DESC =
(SID_NAME = mssqldb)
(ORACLE_HOME = c:\oracle\ora81)
(PROGRAM = hsodbc)
)
)

7. create file in $Oracle_Home/hs/ADMIN e.g. initMSSQL.ora
HS_FDS_CONNECT_INFO = mssqldb
HS_FDS_TRACE_LEVEL = OFF

set odbcini=C:\WINNT\odbc.ini

8. Restart Listener (and I like to restart DB as well)

9. From db user create db link e.g.
create database link mssqldb.world connect to username identified by
password using 'MSSQLDB.WORLD'

10. to test: select * from all_tab...@mssqldb.world


PS if you already have a domain setup then obviously use your existing
one and dont create .world.

James

On Aug 26, 4:20 pm, Mouhammed Iyad <iya...@gmail.com> wrote:
> Hello My Friends,
>
> Is it possible to create a db link from sql server to oracle,
>
> I want to handle sql server tables in oracle,
>
> Best Regards,
> Iyad

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to