Server 1
OS: AIX 5.3
Ip: 192.168.0.1
Db: Oracle 11gR2
Server 2:
OS: AIX
IP: 192.168.0.5
Db: DB2 v9.7
Main purpose:
By building a transparent gateway in Server 1, you can connect to the DB2 database in Server 2 in the oracle database.
Oracle ---> dg4odbc driver -- à unixODBC driver manager -- à db2 dedicated odbc driver
Recommended reading:
DB2 database performance adjustment and optimization (1st and 2) PDF
DB2 database performance optimization
Implementation steps:
1. Install the unixODBC driver in Server 1.
A) download the unixODBC driver source code package from the official website: http: // www.unixodbc.org.
B) Import several necessary environment variables:
Export OBJECT_MODE = 64 (ensure that the compiled unixODBC program is a 64-bit executable program. If the database is 32, replace 64 with 32)
Export PATH = $ PATH:/usr/vacpp/bin (this is the compiler installation address)
Export CC = xlc_r
Export CCC = xlC_r
C) enter the unzipped unixODBC directory, as shown in the following figure:
./Configure -- prefix =/usr/local/unixODBC
./Make
./Makeinstall
D) Add the following lines to oracle. profile:
Export ODBCHOME =/usr/local/unixODBC/etc
Export ODBCINI = $ ODBCHOME/odbc. ini
Export PATH = $ PATH:/usr/local/unixODBC/bin
Export LD_LIBRARY_PATH =/usr/local/unixODBC/lib
E) Go to the/usr/local/unixODBC/lib directory and execute the following commands:
Ar-x-X any libodbc.
Ar-x-X any libodbcr.
Ar-x-X any libodbcinst.
Ln-slibodbc. so.2 libodbc. so
Ln-slibodbcr. so.2 libodbcr. so
Ln-slibodbcinst. so.2 libodbcinst. so
For more details, please continue to read the highlights on the next page: