728x90

Question

How can I connect to archived data using DG4ODBC in a UNIX environment?

Answer

DG4ODBC is used in UNIX environments to access archived data. This facility requires the use of Optim Connect (Attunity) 5.3.2 or above, and the Optim Connect ODBC 3.5 driver.

DG4ODBC requires that unixODBC Manager be installed on the UNIX server where Optim Connect daemon is running.

unixODBC Manager 

The example below is set up and configured using the unixODBC Manager from unixODBC, which can be downloaded from: ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.1.tar.gz

Once you download the file you will need to follow the steps outlined to install and configure the Manager on the Unix server where the Optim Connect daemon is installed. 

Note: If the DB is a 64-bit Database you must install and configure the unixODBC Manager as 64-bit, and load the 64-bit ODBC driver from Optim Connect. This can be found under the installation directory of Optim eg: \path\odm\thin clients\

Before connecting to the datasource you will need to define an environment variable called ODBCINI.ini. For example: 

export ODBCINI.ini=/path/odbc.ini

This can be added to the Optim rtsetenv script, which sets up the Optim environment prior to starting the Optim Server and the Optim Connect daemon.

Below are sample entries for files that need to be defined on the DB Server, namely, tnsnames.ora, listener.ora and the file initDG4.ora (which points to the Datasource (Archive File or Archive Collection) that you have defined in Optim Connect). 

Note: There is an ENVS parameter defined in the listener.ora file which points to the ODBC.ini file. This is the environment variable containing the parms for the unixODBC Manager. Also, this variable contains the path to the Optim Connect driver which is used to connect to the Archive File or Collection.

tnsnames.ora entry:

DG4 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = tcp)(HOST = localhost)(PORT = 1522))
)
(CONNECT_DATA =
(PRESENTATION=RO)
(SERVICE_NAME = DG4)
)
(HS=Ok)
)

listener.ora entry:

(SID_DESC =
(SID_NAME = DG4)
(ORACLE_HOME = /export/opt1/users/oracle/ora11/product/11.1.0/db_1)
(PROGRAM=dg4odbc)
(ENVS="ODBCINI=/export/opt1/users/oracle/unixodbc64/etc/odbc.ini,LD_LIBRARY_PATH=/export /opt1/users/oracle/Attunity/odbc35_64bit,LIBPATH=/export/opt1/users/oracle/Attunity/odbc35_64bit")
)

initDG4.ora entry:

# 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=REMOTE
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_CONNECT_STRING=DG4 (This is the datasource name defined in the Optim Connect binding) 

odbc.ini entry:

[DG4]
Driver=/export/opt1/users/oracle/Attunity/odbc35_64bit/thinapi3.so
BindUrl=localhost:2551/Navigator
DefTDPName=DG4
#Debug/generalTrace=TRUE
#Debug/logFile=/export/opt1/users/oracle/tmp/sqllinkserver.log
#Debug/apiTrace=TRUE


http://www-01.ibm.com/support/docview.wss?uid=swg21577580&myns=swgimgmt&mynp=OCSSGMCR&mync=E

728x90

+ Recent posts