4 DB2 Driver : Connection URL

Connection URL
The connection URL format for the DB2 driver is:
DB2 for Linux/UNIX/Windows:
jdbc:datadirect:db2://hostname:port;DatabaseName=value[;property=value[;...]]
DB2 for z/OS and iSeries:
jdbc:datadirect:db2://hostname:port;LocationName=value[;property=value[;...]]
where:
hostname is the IP address or TCP/IP host name of the server to which you are connecting. See “Using IP Addresses” for details on using IP addresses.
NOTE: Untrusted applets cannot open a socket to a machine other than the originating host.
port is the number of the TCP/IP port.
property=value specifies connection properties. For a list of connection properties and their valid values, see “Connection Properties”.
For example:
DB2 for Linux, UNIX, and Windows1
jdbc:datadirect:db2://server1:50000;DatabaseName=jdbc;User=test;Password=secret
DB2 for z/OS and iSeries1
jdbc:datadirect:db2://server1:446;LocationName=Sample;User=test;Password=secret

1
See “DB2 Packages” for information about creating DB2 packages