Oracle Links To MySQL & SQL-Server Using ODBC
Oracle Links To MySQL & SQL-Server Using ODBC
3) In Control Panel > Administrative Tools > Data Sources (ODBC) create a System DSN for MySQL Database as shown below:
[Please note that the name given in Data Source Name, will be used as Oracle SID in TNSNAMES.ORA and LISTENER.ORA] 4) In ORACLE_HOME/hs/admin folder need to create a file init<SID>.ORA file. In this case it will be initworld.ORA with following content:
# This is a sample agent init file that contains the HS parameters that are # needed for the Database Gateway for ODBC # # HS init parameters # HS_FDS_CONNECT_INFO = world This has to be the SID/DNS name given HS_FDS_TRACE_LEVEL = 0 # # Environment variables required for the non-Oracle system # #set <envvar>=<value>
(ORACLE_HOME=D:\11g_app\db\product\11.2.0\dbhome_1) (PROGRAM=dg4odbc) ) )
MySQL and Oracle Hosted in Different Machine 1) Install MySQL Database Driver if not installed. 2) In MySQL execute the following statement:
grant all on <MySQL DB Name>.* to <user_name>@<Host/IP address where Oracle DB is Hosted> identified by <Password>;
3) In Control Panel > Administrative Tools > Data Sources (ODBC) create a System DSN for MySQL Database as shown below:
[Please note that the name given in Data Source Name, will be used as Oracle SID in TNSNAMES.ORA and LISTENER.ORA] 4) In ORACLE_HOME/hs/admin folder need to create a file init<SID>.ORA file. In this case it will be initsakila_kris.ORA with following content:
# This is a sample agent init file that contains the HS parameters that are # needed for the Database Gateway for ODBC # # HS init parameters # HS_FDS_CONNECT_INFO = sakila_kris This has to be the SID/DNS name given HS_FDS_TRACE_LEVEL = 0 # # Environment variables required for the non-Oracle system # #set <envvar>=<value>
(ORACLE_HOME=D:\11g_app\db\product\11.2.0\dbhome_1) (PROGRAM=dg4odbc) ) )
(HS = OK) )
1) In Control Panel > Administrative Tools > Data Sources (ODBC) create a System DSN for SQLServer:
[Please note that the name given in Data Source Name, will be used as Oracle SID in TNSNAMES.ORA and LISTENER.ORA] 2) In ORACLE_HOME/hs/admin folder need to create a file init<SID>.ORA file. In this case it will be initSQL-Server.ORA with following content:
# This is a sample agent init file that contains the HS parameters that are # needed for the Database Gateway for ODBC # # HS init parameters # HS_FDS_CONNECT_INFO = SQL-Server This has to be the SID/DNS name given HS_FDS_TRACE_LEVEL = 0 # # Environment variables required for the non-Oracle system
# #set <envvar>=<value>
(ORACLE_HOME=D:\11g_app\db\product\11.2.0\dbhome_1) (PROGRAM=dg4odbc) ) )