首页 >> 文档 >> DB2专题

jdbc 连接 db2 数据库

发布日期:2008-07-21最近更新:2008-07-21来源:BHCODE作者:

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.

本周推荐
MORE
热点关注
MORE