JDBC connection to Oracle RAC Server

Source: Internet
Author: User

Xuzhou needs to connect to a third-party database. The original database uses a Windows Cluster and is recently changed to the RAC mode, leading to frequent JDBC connection errors. Solution:

1. connection string Configuration:

JDBC: oracle: thin: @ (description = (address_list = (address = (host = IP address 1) (Protocol = TCP) (Port = 1521 )) (address = (host = IP address 2) (Protocol = TCP) (Port = 1521) (load_balance = yes) (Failover = yes )) (CONNECT_DATA = (SERVICE_NAME = Database Service name )))

 

2. Modify the host file and add the Server IP address and name.

Host file address c: \ windows \ system32 \ drivers \ etc \ hosts

 

After the preceding two steps, you can connect to the Oracle database in RAC mode.

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.