To use an DB2 database with an DODS application
1. In the application configuration file <appName>/output/conf/<appName>.conf (or better, in <appName>/input/conf/<appName>.conf.in ) set the following line:
DatabaseManager.DB.<database_id>.Connection.Url = “<url>”
The <url> argument represents a data source, and indicates what type of JDBC connectivity you are using.
For DB2 Universal JDBC Type 4 Connectivity, specify a URL of the following form:
Syntax for a URL for Universal Type 4 Connectivity:
>>-+-jdbc:db2:------+-//server--+-------+--/database------------> +-jdbc:db2j:net:-+ '-:port-' '-jdbc:db2j:-----' >--+-----------------------------+----------------------------->< | .-,---------------------. | | V | | '-:---property--=--value--;-+-'
For DB2 Universal JDBC Type 2 Connectivity, specify a URL of the following form:
Syntax for a URL for Universal Type 2 Connectivity:
>>-jdbc:db2:database--+-----------------------------+---------->< | .-,---------------------. | | V | | '-:---property--=--value--;-+-'
The parts of the URL have the following meanings:
jdbc:db2: indicates that the connection is to a server in the DB2 UDB family.
jdbc:db2j: indicates that the connection is to a for local Cloudscape access.
jdbc:db2j:net: indicates that the connection is to a remote IBM(R) Cloudscape server.
The domain name or IP address of the database server.
The TCP/IP server port number that is assigned to the database server. This is an integer between 0 and 65535. The default is 446.
The name of the database server. For a connection to a DB2 UDB for Linux, UNIX(R) and Windows(R) server, the name is the database name.
For a connection to an IBM Cloudscape server, the name is the fully-qualified name of the file that contains the database. This name must be enclosed in double quotation marks ("). For example:
"c:/databases/testdb"
A property for the JDBC connection. For the definitions of these properties, see
http://www-3.ibm.com/software/data/db2/udb/ad/v8/java/ad/rjvdsprp.htm
2 In the same configuration file, identify the JDBC driver with the line:
DatabaseManager.DB.<database_id>.JdbcDriver = ” com.ibm.db2.jcc.DB2Driver "
This is the link where you can find all needed information and downloads for DB2 database: