Using IP Addresses
- Last Updated: June 17, 2024
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
The drivers support Internet Protocol (IP) addresses in IPv4 and IPv6 format as described in the following tables.
| Driver | IPv4 | IPv6 |
|---|---|---|
| DB2 | All supported versions | DB2 V9.1 and higher for Linux/UNIX/Windows DB2 V9.1 for z/OS DB2 for i V5R4 and higher |
| MySQL | All supported versions | Not supported |
| Oracle | All supported versions | Oracle 11g R2 |
| Progress OpenEdge | All supported versions | Progress OpenEdge 10.1A and higher |
| Microsoft SQL Server | All supported versions | Microsoft SQL Server 2005 and higher |
| Sybase | All supported versions | Sybase 12.5.2 and higher |
| Driver | IPv4 | IPv6 |
|---|---|---|
| Driver for Apache Hive | All supported versions | Not supported |
| Salesforce | All supported versions | All supported versions |
If your network supports named servers, the server name specified in the connection URL or data source can resolve to an IPv4 or IPv6 address. For example, the server name DB2Server in the following URL can resolve to either type of address:
jdbc:datadirect:db2://DB2Server:50000;DatabaseName=jdbc;User=test;
Password=secret
Alternatively, you can specify addresses using IPv4 or IPv6 format in the server name portion of the connection URL. For example, the following connection URL specifies the server using IPv4 format:
jdbc:datadirect:db2://123.456.78.90:50000;DatabaseName=jdbc;User=test;
Password=secret
You also can specify addresses in either format using the ServerName data source property. The following example shows a data source definition that specifies the server name using IPv6 format:
DB2DataSource mds = new DB2DataSource();
mds.setDescription("My DB2DataSource");
mds.setServerName("[ABCD:EF01:2345:6789:ABCD:EF01:2345:6789]");
mds.setPortNumber(50000);
...
In addition to the normal IPv6 format, the drivers support IPv6 alternative formats for compressed and IPv4/IPv6 combination addresses. For example, the following connection URL specifies the server using IPv6 format, but uses the compressed syntax for strings of zero bits:
jdbc:datadirect:db2://[2001:DB8:0:0:8:800:200C:417A]:50000;
DatabaseName=jdbc;User=test;Password=secret
Similarly, the following connection URL specifies the server using a combination of IPv4 and IPv6:
jdbc:datadirect:db2://[0000:0000:0000:0000:0000:FFFF:123.456.78.90]:
50000;DatabaseName=jdbc;User=test;Password=secret
For complete information about IPv6, go to the following URL: