---
title: IPv6 Formatting for JDBC and SQLPlus
description: Does IPv6 for JDBC and SQLPlus seem new to you well, it's been available since 11gR2.
---

[Blog | Pythian ](https://www.pythian.com/blog)

# [IPv6 Formatting for JDBC and SQLPlus](https://www.pythian.com/blog/ipv6-formatting-for-jdbc-and-sqlplus)

 Written by [Matheus Boesing](https://www.pythian.com/blog/author/matheus-boesing) | Apr 26, 2020 4:00:00 AM

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](https://en.wikipedia.org/wiki/IPv6). 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](https://community.oracle.com/thread/2391637), 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?

 

[View full post](https://www.pythian.com/blog/ipv6-formatting-for-jdbc-and-sqlplus)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Matheus Boesing"
  },
  "dateModified" : "2026-04-15T01:40:32.826Z",
  "datePublished" : "2020-04-26T04:00:00Z",
  "headline" : "IPv6 Formatting for JDBC and SQLPlus",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://www.pythian.com/blog/ipv6-formatting-for-jdbc-and-sqlplus",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Pythian Blog"
  }
}
```