EasyManuals Logo

IBM DB2 User Manual

IBM DB2
585 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #218 background imageLoading...
Page #218 background image
v In a java.util.Properties value in the info parameter of a
DriverManager.getConnection call.
v In a java.lang.String value in the url parameter of a
DriverManager.getConnection call.
Some properties with an int data type have predefined constant field values. You
must resolve constant field values to their integer values before you can use
those values in the url parameter. For example, you cannot use
com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL in a url parameter. However,
you can build a URL string that includes
com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL, and assign the URL string to
a String variable. Then you can use the String variable in the url parameter:
String url =
"jdbc:db2://sysmvs1.stl.ibm.com:5021" +
"user=dbadm;password=dbadm;" +
"traceLevel=" +
(com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL) + ";";
Connection con =
java.sql.DriverManager.getConnection(url);
Related concepts
“How to determine which type of IBM Data Server Driver for JDBC and SQLJ
connectivity to use” on page 17
“LOBs in JDBC applications with the IBM Data Server Driver for JDBC and
SQLJ” on page 49
IBM Data Server Driver for JDBC and SQLJ client reroute support” on page
84
“Memory use for IBM Data Server Driver for IBM Data Server Driver for JDBC
and SQLJ type 2 connectivity on DB2 for z/OS” on page 98
“LOBs in SQLJ applications with the IBM Data Server Driver for JDBC and
SQLJ” on page 136
“IBM Data Server Driver for JDBC and SQLJ support for SSL” on page 458
Chapter 14, “JDBC connection concentrator and workload balancing,” on page
475
Chapter 10, “Security under the IBM Data Server Driver for JDBC and SQLJ,”
on page 447
“User ID and password security under the IBM Data Server Driver for JDBC
and SQLJ” on page 448
“User ID-only security under the IBM Data Server Driver for JDBC and SQLJ”
on page 450
“Encrypted password, user ID, or user ID and password security under the
IBM Data Server Driver for JDBC and SQLJ” on page 451
“Kerberos security under the IBM Data Server Driver for JDBC and SQLJ” on
page 453
“IBM Data Server Driver for JDBC and SQLJ trusted context support” on page
456
Related tasks
“Creating and deploying DataSource objects” on page 19
“Connecting to a data source using the DataSource interface” on page 15
“Connecting to a data source using the DriverManager interface with the IBM
Data Server Driver for JDBC and SQLJ” on page 11
Keeping prepared statements after commit points (DB2 Application
Programming and SQL Guide)
202 Application Programming Guide and Reference for Java

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM DB2 and is the answer not in the manual?

IBM DB2 Specifications

General IconGeneral
DeveloperIBM
Initial Release1983
LicenseProprietary
Written inC, C++
CategoryDatabase Management System (RDBMS)
Operating SystemLinux, Windows
Programming LanguagesC, C++
Data ModelsRelational
EditionsCommunity, Standard, Advanced
Key Featureshigh availability, scalability