db2的jdbc连接用法:
1. 将 db2jcc.jar 和 db2jcc_license_cu.jar 配置在环境变量classpath下。
2. 将 db2jcc.jar 和 db2jcc_license_cu.jar复制在你所用的应用服务器中工程下的WEB-INF/lib包下
3. JDBC URL :jdbc:db2://tdurden:50000/SAMPLE
( where tdurden is the machine the DB2 database server resides on and where SAMPLE is the database instance - 50000 is the default DB2 port to connect to )
4. Driver Class field: com.ibm.db2.jcc.DB2Driver
5. Add a valid username and password in the username and password fields.