Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC Ipv6 address, what is the port number?

843854Dec 5 2003 — edited Dec 5 2003
I believe there might an ambiguity when using IPv6 IP address
format with JDBC connection address.

A common format for the connection url is:

jdbc:subprotocol:subname

Where:

subprotocol = <some name>

subname = //<{IP Address|Machine Name}[:port]>/<database name>

Example:
jdbc:sql:t9://130.168.200.30:1433/database1

An IPv6 has the format

x:x:x:x:x:x:x:x

where the 'x's are the hexadecimal values of the
eight 16-bit pieces of the address. This is the
full form. For example,

1:2:0:0:5:6

The IPv6 format also allows an abbreviation version where 0's are
replaced with "::". So, the above address could also be written
as:

1:2::5:6

An optional port number can be added. For example,

1:2:0:0:5:6:8888

or as the following if using the abbreviation version of IPv6

1:2::5:6:8888

While decoding this version of the address, an ambiguity arises.
Does the address expand to

1:2:0:5:6:8888 // no optional port number

or

1:2:0:0:5:6:8888 // contains the optional port number.

Is this correct? If so, how are vendors dealing with this?

Thanks,

.........Ken

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2004
Added on Dec 5 2003
1 comment
196 views