Oracle creates a dblink with MySQL

Source: Internet
Author: User
Tags odbc connection mysql odbc driver

1. First introduction to the Environment Operating system: Windows R2 (64bits) Oracle database: 10GR2 10.2.0.3.0 (32bits) MySQL database: 5.1 (32bits) 2. Download MySQL ODBC driver, I use the Mysql-connector-odbc-5.3.4-win32 and Installation Note: Be sure to 32bits,oracle because it is 32bits all that use 32bits, truthfully 64bit please use 64bit 3. Configure an ODBC data source, Configure it in the Control Panel, use the System DSN (be sure to use), named MySQL Note: Because I am in the 64bits system, you should use 32bits ODBC files,%windir%/syswow64/odbcad32.exe 4. In%oracle _home%/hs/admin build Initmysql.ora File input:
hs_fds_connect_info = mysql # mysql   is the ODBC connection name
 
hs_fds_trace_level = 0

  

5. Modified under%oracle_home%/network/admin Listener.ora attached to: sid_list content
(Sid_desc = (sid_name = mysql)    # mysql is in HS with Initmysql.ora counterpart
 
    (oracle_home = corresponding ORACLE directory)    
 
  (program = HSODBC) 
    #10g使用的是hsodbc驱动
 
  )
 

  

6. Modify the Tnsnames.ora input:
MySQL=    
 
= = = = =     1521))       
 
      =             (SID= mysql)) = OK)          
 
      

7. Create Dblink
Create  Public Database Link Mysqllink
 
    to "Scott"
 
   by "Tiger"   'mysql';

 8. Access tables in MySQL library user, note case.
Select"username"from  "user"@mysqllink

The tests were executed successfully. Because of the use of dblink, each operation requires commit or rollback, otherwise the session will be long, the ORA error session is terminated.

Oracle creates a dblink with MySQL

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.