Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of connecting oracle rac Database with jdbc

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to connect jdbc to oracle rac database". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to connect to oracle rac database with jdbc".

How to write jdbc connection to oracle rac database:

1. One of the methods

Datasource.jdbcUrl=jdbc:oracle:thin:@//192.168.1.43:1521/orcl

Note that it is what follows the = sign. Where orcl is the service_name of rac database

192.168.1.43 is the scan-ip address of rac. If the alias of scan-ip works, use an alias.

At this point, note that your database account / password is available (don't be locked and don't know).

2. The second method

Datasource.jdbcUrl=jdbc:oracle:thin:@ (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.43) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)

Note that the reference tnsnames.ora is written after @.

3. The third method

Datasource.jdbcUrl=jdbc:oracle:thin:@ (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.1.43) (PORT=1521)) (FAILOVER=on) (LOAD_BALANCE=off)) (CONNECT_DATA= (SERVICE_NAME=orcl)

The above three kinds are available for personal testing.

Database:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

PL/SQL Release 11.2.0.4.0-Production

CORE 11.2.0.4.0 Production

TNS for Linux: Version 11.2.0.4.0-Production

NLSRTL Version 11.2.0.4.0-Production

At this point, I believe that you have a deeper understanding of the "method of jdbc connecting to oracle rac database". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report