DB2 10.5 for Linux, UNIX, and Windows

DB2Driver class

The com.ibm.db2.jcc.DB2Driver class extends the java.sql.Driver interface.

DB2Driver methods

The following methods are defined only for the IBM® Data Server Driver for JDBC and SQLJ.
changeDB2Password
Format:
public static void changeDB2Password (String url,
 String userid,
 String oldPassword,
 String newPassword)
 throws java.sql.SQLException

Changes the password for accessing a data server that is specified by the url parameter, for the user that is specified by the userid parameter. This method can change an unexpired or expired password.

changeDB2Password is supported for IBM Data Server Driver for JDBC and SQLJ type 4 connectivity only.

changeDB2Password is not supported for connections to IBM Informix®.

Parameter descriptions:
url
The URL for the data server for which a user's password is being changed. The url value uses the syntax for a URL for IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
userid
The user whose password is being changed.
oldPassword
The original password for the user.
newPassword
The new password for the user.