• Design
  • Tuning
  • Apache Derby
  • IBM DB2
  • MySQL
  • Oracle
  • SQL Server
  • "How To" Guides for IBM DB2 UDB Databases

    You are currently using a web browser that does not support HTML pages with style sheets. Please try the XHTML 1 or XHTML 1 Mobile version of this page instead.

    Using JDBC to access DB2 UDB from Java

    Types of JDBC drivers

    When using a JDBC driver to access a database from Java, the JDBC protocols must be converted to the native database protocols on either the client or the server. A Type 2 JDBC driver uses the native database software installed on the client system. A Type 4 driver can be implemented in pure Java on the client, but may require some routines (stored procedures, for example) to be installed on the server side.

    The Type 4 JDBC driver uses a number of stored procedures that in the SYSIBM schema. These routines are provided with DB2 and require DbVisualizer call these stored procedures over an RRSAF connection and therefore require Workload Manager and RSS.

    DB2 Binder

    The DB2Binder can be run in the directory containing the db2jcc.jar and db2jcc_license_cisuz.jar JAR files with the following command:

    java -classpath db2jcc.jar;db2jcc_license_cisuz.jar com.ibm.db2.jcc.DB2Binder -url jdbc:db2://hostname:port#/dblocation -user username -password password -action replace

    -collection is omitted because some applications expect to find the packages under NULLID, which is the default value. The names of the JAR files in the CLASSPATH would need to be qualified unless they are in the current directory.

    Last updated Monday October 9, 2006


    Printer-friendly PDF* format:

    How To Guides for IBM DB2 UDB Databases

    This Section

    You are currently viewing this page in XHTML 2 Style Sheet* format (* see Clicklets for more infomation). This document is also available in HTML Style Sheet*XHTML 1* XML* HTML 4*HTML 5 Style Sheet*HTML 5 XML*HTML 5 non-XML* XHTML Mobile* WML Mobile* and printer-friendly PDF* formats. This is accomplished with Single Source Publishing, a content management system that uses templates in XSLT style sheets provided by XML Styles .com to transform the source content for various content delivery channels. There is also RDF* metadata that describes the content of this document.