Install Oracle Database Gateway For Microsoft SQL Server
Install Oracle Database Gateway For Microsoft SQL Server
Unzip the downloaded zip file. It will create a directory named gateways
Change the directory to gateways and start installer.
-bash-3.00$ cd /software/11gR2-Gateways/gateways/
-bash-3.00$ ./runInstaller
Click Next
Select name for the Oracle Home. The Path defaults to Oracle Home. No need to change the same.
Select Oracle Database Gateway for Microsoft SQL Server and click Next
Provide any existing Microsoft SQL Server details where you are planning to connect. It actually writes
this in a config file and does not really verify.
This can be changed later also in the configuration file. Click Next
Click Install
Once it prompts with above screen, open another shell and run the script as root
root@host # /app/oracle/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root.sh script
#
# HS init parameters
#
HS_FDS_CONNECT_INFO=[SERVER127]:4076//NewCDP16
# alternate connect format is hostname/serverinstance/databasename
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
-bash-3.00$ cd $ORACLE_HOME/network/admin
Append following in existing listener.ora. Change the name, path and port as required.
LISTENER_dg4mssql=
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <oracle host or IP>) (PORT = <any unused port>))
)
)
)
SID_LIST_LISTENER_dg4mssql=
(SID_LIST=
(SID_DESC=
(SID_NAME=dg4msql)
(ORACLE_HOME=/app/oracle/product/11.2.0/dbhome_1)
(ENV=LD_LIBRARY_PATH=/app/oracle/product/11.2.0/dbhome_1/dg4msql/driver/lib:/app/oracle/pro
duct/11.2.0/dbhome_1/lib)
(PROGRAM=dg4msql)
)
dg4msql =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=< oracle hostname or IP >)(PORT=1551))
(CONNECT_DATA=(SID=dg4msql))
(HS=OK)
)
TNS Ping Utility for Solaris: Version 11.2.0.1.0 Production on 07-JAN-2014 12:30:08
Create a new database link pointing to this TNS using SQL Server login credentials. This username
must be already created in the Microsoft SQL Server database.
COUNT(1)
24592
This concludes setup steps to Read data of Microsoft SQL server table from Oracle database.