Tuesday, 8 April 2014

Step by step to configure Oracle Heterogeneous Connectivity with 10g and DB2

Step by step to configure Oracle Heterogeneous Connectivity with 10g and DB2



1. Create a ODBC named DB2_ODBC [Note: The DSN must be system not user]

Go to start-->Settings-->Control Panel-->Administrative Tools
Then Double click on Data Sources (ODBC) and create System DSN.


 

 

-----------------------------------------------------------------------------
2. Modify C:\Oracle\product\10.2.0\db_1\hs\admin\initDB2_ODBC.ORA as follows:

# 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 =DB2_ODBC
HS_FDS_TRACE_LEVEL = off
set ODBCINI= C:\WINDOWS\odbc.ini
#
# Environment variables required for the non-Oracle system
#
#set =

---------------------------------------------------------------------------------
3. Modify C:\Oracle\product\10.2.0\db_1\network\admin\LISTENER.ORA as follows:

SID_LIST_LISTENER_HS =
  (SID_LIST =
       (SID_DESC=
       (SID_NAME = db2_odbc)
       (ORACLE_HOME = C:\Oracle\product\10.2.0\db_1)
       (PROGRAM = hsodbc)
    )
  )

LISTENER_HS =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.1.129)(PORT = 1522))
  )


---------------------------------------------------------------------------------
4. Modify C:\Oracle\product\10.2.0\db_1\network\admin\tnsnames.ora as follows:

# TNSNAMES.ORA Network Configuration File: C:\Oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

#hsagent  =
#  (DESCRIPTION=
#    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
#    (CONNECT_DATA=(SID=hsagent))
#    (HS=)
#  )

DB2_ODBC.BD.BRACBANK.COM =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = tcp)(HOST = 10.100.1.129)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SID = DB2_ODBC)
    )
    (HS = OK)
  )

-----------------------------------------------------------------------------
5. Create Database Link  as follows:

create public Database link DB2_ODBC
connect to "db2admin" identified by "db2admin" using 'DB2_ODBC';


select * from db2admin.SAID@DB2_ODBC
where rownum<7 o:p="">

create table test as select * from db2admin.SAID@DB2_ODBC;


---------------------------------------------------------------------------------
Do not forget to restart the listener services
---------------------------------------------------------------------------------




2 comments:

  1. Jadwal Daftar Sabung Ayam SV388 26 Februari 2019 - Selasa, 26 Februari 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.

    Situs Judi Sabung Ayam Online SV388 Merupakan Situs Judi Asal Thailand Yang Sangat Terkenal Dengan Permainan Sabung Ayam Yang Fair dan Menghibur Para Penonton Judi Sabung Ayam.

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995
    BBM: BOLAVITA

    ReplyDelete
  2. Hello Everybody,
    My name is Mrs Sharon Sim. I live in Singapore and i am a happy woman today? and i told my self that any lender that rescue my family from our poor situation, i will refer any person that is looking for loan to him, he gave me happiness to me and my family, i was in need of a loan of $250,000.00 to start my life all over as i am a single mother with 3 kids I met this honest and GOD fearing man loan lender that help me with a loan of $250,000.00 SG. Dollar, he is a GOD fearing man, if you are in need of loan and you will pay back the loan please contact him tell him that is Mrs Sharon, that refer you to him. contact Dr Purva Pius, call/whats-App Contact Number +918929509036 via email:(urgentloan22@gmail.com) Thank you.

    ReplyDelete