Connect oracle database link to mssql

Source: Internet
Author: User


Oracle database link connects to different database platforms in mssql, which is generally called a heterogeneous database service. Different vendors have different implementation technologies: in SQL SERVER, it is called a LINKED SERVER, use ODBC to interconnect with other databases. The technology for implementing heterogeneous services in ORACLE is called Transparent Gateway ). Currently, ORACLE uses transparent gateways to connect with SQL SERVER, SYBASE, DB2, and other databases. The Oracle transparent gateway software needs to be purchased separately for Oracle 8i at about $10 thousand. It was released as a database component for free at Oracle 9i. Select the component type during installation. (It is not installed by default .) Step 1: Install the oracle component Transparent Gateway; select "Custom" in the installation type; select "oracle Transparent Gateway for Microsoft SQL server" on the components page; Step 2: after installing the transparent gateway for SQL server software, you can view the tg4msql directory under $ ORACLE_HOME and edit $ ORACLE_HOME/tg4msql/admin/inittg4msql. there is a row in the SQL file: HS_FDS_CONNECT_INFO = "SERVER = 192.168.1.46; DATABASE = pubs" where: SERVER = 192.168.1.46 is the name of the SQL SERVER and the DATABASE is the name of the DATABASE. Step 3: Modify the listener in the D: \ oracle \ ora92 \ network \ admin path. add the following to the SID_LIST file: (SID_DESC = (SID_NAME = tg4msql) -- you can name it yourself (ORACLE_HOME = d: \ oracle \ ora92) (PROGRAM = tg4msql) Step 4: modify tnsnames in the d: \ oracle \ ora92 \ network \ admin path. add the following to the ora file: mssql = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.46) (PORT = 1521 ))) (CONNECT_DATA = (SID = tg4msql) (HS = OK) Step 5: Create a database link in oracle; Log On With dba in sqlplus; create database link mssql connect to sa identified by password using 'mssql'; then select * from tablename @ mssql; can be used to access the mssql database!
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.