PART I : Setting up ODBC driver
# rpm –ivh mysql-connector-odbc-3.51.12-linux-i686.rpm
# /etc/init.d/mysqld start
# ODBCConfig
# vi /etc/odbc.ini
[trans]
Driver = MySQL ODBC 3.51 Driver
DATABASE = kampus
DESCRIPTION = punya_kampus
PWD = password
PORT = 3306
SERVER = localhost
UID = root
isql DSN [UID [PWD]] [options]
# isql -v trans root password
+—————————————+
| Connected!
|
| sql-statement
| help [tablename]
| quit
|
+—————————————+
PART II : How 2 Configure HSODBC
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = trans)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0)
(PROGRAM = hsodbc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = OraHost)(PORT = 1521))
)
)
$ lsnrctl reload
$ lsnrctl status
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 12-NOV-2006 22:42:34
Uptime 0 days 0 hr. 7 min. 54 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=OraHost)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "prod" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...
Service "prod_XPT" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...
Service "trans" has 1 instance(s).
Instance "trans", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
# Generated by Oracle configuration tools.
PROD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = OraHost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = prod)
)
)
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
trans =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = OraHost)(PORT = 1521))
)
(CONNECT_DATA =
(SID = trans))
(HS = OK)
)
# needed for an ODBC Agent.
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = trans
HS_FDS_TRACE_LEVEL = off
HS_FDS_SHAREABLE_NAME = /usr/lib/libmyodbc3.so
#
# ODBC specific environment variables
#
set ODBCINI=/etc/odbc.ini
#
# Environment variables required for the non-Oracle system
#
# set <envvar>=<value>
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
# Henri Configure
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_SID=prod
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
export PATH=$PATH:$ORACLE_HOME/bin:/sbin:.
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ODBCINI=/etc/odbc.ini
$ tnsping trans
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 12-NOV-2006 23:21:43
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/10.2.0/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = OraHost)(PORT = 1521))) (CONNECT_DATA = (SID = trans)) (HS = OK))
OK (10 msec)
SQL> conn kadal/kadal
SQL> C REATE DATABASE LINK trans CONNECT TO “root” IDENTIFIED BY “password” USING 'trans';
SQL> SELECT * FROM MHS@TRANS;
Note : Case Sensitive
Popularity: 68% [?]
You Should Also Check Out This Post:
- set hostname without reboot
- ssh[23593]: [ID 530472 user.error] Kerberos mechanism library initialization error:
- Tracking Down "Last Reboot" on windows
- Backup Listener log
- Comparison Kernel parameter Solaris9 and Solaris10


An ordinary people, participants, contributor who share their own experiences, their knowledge, their informations, task, a few tips and tricks, their problem with solving tools..
No User Responded In This Article
Leave Your Comment Below