IPv6 Formatting for JDBC and SQLPlus
Does IPv6 formatting for JDBC and SQLPlus seem new to you well, it's been available since 11gR2. You're familiar with IPv6, right? If not, click here. Basically, the only thing you need to do is enclose the IPv6 address in square brackets, like this:
Connect on IPV4:
SQL> connect user/pass@172.23.10.40:1521/PYTHIANDB Connected.
Connect on IPV6:
SQL> connect user/pass@[1:95e05a:g0d:da7a:2020]:1521/PYTHIANDB Connected.JDBC (thin) IPV4:
url="jdbc:oracle:thin:@(DESCRIPTION= (LOAD_BALANCE=on) (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=172.23.10.40) (PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=172.23.10.41)(PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=PYTHIANDB)))"JDBC (OCI) IPV4:
url="jdbc:oracle:oci:@(DESCRIPTION= (ADDRESS= (PROTOCOL=TCP)(HOST=172.23.10.40)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=PYTHIANDB)))"JDBC (thin) IPV6:
url="jdbc:oracle:thin:@(DESCRIPTION= (LOAD_BALANCE=on) (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=[1:95e05a:g0d:da7a:2020]) (PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=[1:95e05a:g0d:da7a:2021])(PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=PYTHIANDB)))"JDBC (OCI) IPV6:
url="jdbc:oracle:oci:@(DESCRIPTION= (ADDRESS= (PROTOCOL=TCP)(HOST=[1:95e05a:g0d:da7a:2020])(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=PYTHIANDB)))"As you might suspect, the same thing applies to your TNSNAMES entries. Also, according to this, you even use it for your LISTENER:
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = [1:95e05a:g0d:da7a:2020])(PORT =1521)) ) )
Hope this helps!
Oracle Database Consulting Services
Ready to optimize your Oracle Database for the future?
On this page
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
Setting up Virtual Hosts for Database and Applications Tiers in 11i
Setting up Virtual Hosts for Database and Applications Tiers in 11i
May 19, 2009 12:00:00 AM
3
min read
Management and Troubleshooting Features: Data Guard Command-Line Interface (DGMGRL) 19c
Management and Troubleshooting Features: Data Guard Command-Line Interface (DGMGRL) 19c
Oct 1, 2020 12:00:00 AM
7
min read
Fixing Windows RAC listener to listen on IP address of Hostname
Fixing Windows RAC listener to listen on IP address of Hostname
Sep 3, 2014 12:00:00 AM
2
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.