Steps-By-Step - Connecting To Microsoft SQL ServerfromOra
Steps-By-Step - Connecting To Microsoft SQL ServerfromOra
Log in
Ora Training This is a personal blog for non-profit educational purpose only.
It has no affiliation with Oracle or any company and any views expressed here are of
Blog the author himself only.
Home
About
Disclaimer
New Book – “Pro Oracle Fusion Applications”
RSS feed
Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for
SQL Server
Starting with 11g Oracle now provides a Database Gateway for MS SQL Server and various other databases.
The gateway is certified with Oracle database release 10.1.0.5, 10.2.0.3 after applying the gateway compatibility patch bug or you
can directly use it with Oracle RDBMS 10.2.0.4, 10.2.0.5, 11.1 and 11.2
Following steps are involved. Please note that this steps are shown for Linux/Unix platform but for Windows also similar steps are
to be followed.
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 1/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
Unzip the downloaded zip file. It will create a directory named “gateways”
-bash-3.00$ cd /software/11gR2-Gateways/gateways/
-bash-3.00$ ./runInstaller
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 2/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
Click Next
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 3/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
Select name for the Oracle Home. The Path defaults to Oracle Home. No need to change the same.
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 4/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
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.
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 5/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
This can be changed later also in the configuration file. Click Next
Click Install
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 6/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
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
ORACLE_OWNER= ora11g
ORACLE_HOME= /app/oracle/product/11.2.0/dbhome_1
The file “dbhome” already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
The file “oraenv” already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
The file “coraenv” already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 7/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
Make sure that the MS SQL database details are correct in the dg4msql parameter file.
# that are needed for the Database Gateway for Microsoft SQL Server
# HS init parameters
HS_FDS_CONNECT_INFO=[SERVER127]:4076//NewCDP16
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 8/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
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/product/11.2.0/dbhome_1/lib”)
(PROGRAM=dg4msql)
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 9/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
Services Summary…
dg4msql =
(DESCRIPTION=
(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
/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
OK (0 msec)
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.
SQL> CREATE DATABASE LINK sqlserver CONNECT TO “SQLUser” IDENTIFIED BY “SQLPass” USING
‘dg4msql’;
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 10/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
COUNT(1)
———-
24592
This concludes setup steps to Read data of Microsoft SQL server table from Oracle database.
Leave a comment
| Trackback
Jan 7th, 2014 | Posted by Tushar Thakker | In Uncategorized
« First Look at Oracle e-Business Suite 12.2.3 new user interface
Coming soon: Step by step guide for Oracle Fusion Applications
11.1.8 installation »
1.
Oracle DBA
Reply | Quote
Aug 3rd, 2020 at 20:27 | #1
2.
Md. Rakibul Huq
Reply | Quote
Feb 11th, 2018 at 10:27 | #2
3.
jerry
Reply | Quote
Sep 7th, 2017 at 16:00 | #3
If I already have a gateway installed for 1 MSSQLSERVER instance and I want to connect to another MSSQLSERVER
instance, do I need to create a 2nd gateway home and configure it?
4.
Yogesh
Reply | Quote
Jan 21st, 2017 at 06:33 | #4
Hi All,
I have already oracle XE database(Oracle 11g express edition) install in my windows 7 machine and and i want to access sql
server 2008 database through my Oracle XE database. Sql server database and Oracle database installed on same machine.
Kindly guide me step by step configuration process. Thanks in advance.
5.
Arthur
Reply | Quote
Aug 26th, 2016 at 10:38 | #5
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 11/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
after installing gateway and folowing through the configs. am getting this error.
Link : “MSSQLSERVER”
6.
aryan
Reply | Quote
Jul 25th, 2016 at 12:27 | #6
excellent !!!
7.
Kumar AV
Reply | Quote
May 9th, 2016 at 08:03 | #7
Thanks for the explanation . Please some one help me to create a database link from Oracle RAC ( 3 node RAC ) database to
SQL .
8.
rajkishore
Reply | Quote
Jul 14th, 2015 at 15:47 | #8
9.
Eugen
Reply | Quote
Apr 8th, 2015 at 09:37 | #9
Show
1 trackbacks
Leave a comment
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite>
<code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Name *
Website
Submit Comment
RSS for comments on this post
Search
Search this blog
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 12/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
Hot topics
Categories
Recent Posts
Recent Comments
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 13/14
10/10/22, 8:34 AM Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL Server | Ora Trainin…
Arnaldo on Fix for “We were unable to return you to the page you were viewing” error in IE
saran on Fix for “We were unable to return you to the page you were viewing” error in IE
sd on Fix for “We were unable to return you to the page you were viewing” error in IE
James on Provision an Applications Environment
Oracle DBA on Steps-by-step: Connecting to Microsoft SQL Server database from Oracle using Database Gateway for SQL
Server
Archives
September 2015
April 2015
March 2015
February 2015
December 2014
September 2014
June 2014
April 2014
March 2014
January 2014
December 2013
November 2013
October 2013
August 2013
July 2013
May 2013
April 2013
March 2013
January 2013
December 2012
November 2012
September 2012
August 2012
April 2012
March 2012
February 2012
August 2010
May 2010
April 2010
December 2009
June 2009
April 2009
March 2009
Powered by WordPress | Theme by NeoEase | Valid XHTML 1.1 and CSS 3 Top
www.oratraining.com/blog/2014/01/steps-by-step-connecting-to-microsoft-sql-database-from-oracle-database-using-database-gateway-for-sql-server/ 14/14