16 Updating Database Passwords using setpws.jar

This chapter describes how to use the setpws.jar tool to update database passwords in director.properties. This information is applicable to Apache Tomcat environments only.

Schema passwords are often stored in an encrypted format in the director.properties file, which can be difficult to update when schema passwords are refreshed. EDQ 12.2.1.4.3 introduces a tool called setpws.jar that you can use to update EDQ configuration with new passwords for configuration and results schemas.

Execute the following command to see the usage summary to run the tool:

$ java -jar setpws.jar -help
Updates EDQ configuration with new passwords for configuration and results schemas.

Available options:

-confdir          EDQ local configuration directory.
-setdb            Update schema passwords in database.  Current passwords must not be expired.
-setdbadmin       Update schema passwords in database using administrator account.
-adminpw          Database admin/system password.  Used if -setdbadmin is present.
-configpw         New password for configuration schema
                    Use - to leave password unchanged.
                    Use % to generate a random password.
-resultspw        New password for results schema.
                    Use - to leave password unchanged.
                    Use % to generate a random password.

Passwords not specified on the command line can be entered interactively.
The configuration directory defaults to /opt/edq/oedq.local.home on OCI systems.

Here,

  • -confdir is the location of the EDQ local configuration directory that contains director.properties and kfile. On OCI systems this defaults to /opt/edq/oedq.local.home, which is the location used in the Marketplace images.
  • -setdb updates the schema passwords in the database along with other changes to director.properties. This option can be used to refresh passwords in one step.

    Note:

    This option will not update schema passwords that have expired. To change expired passwords use -setdbadmin.
  • -setdbadmin updates the schema passwords in the database using an administrator account (system or admin for Autonomous Database instances). Use this instead of -setdb if the existing passwords have expired.
  • -adminpw lets you specify the database administrator password. Use this along with -setdbadmin. If this option is omitted, the tool prompts for the new password.
  • -configpw lets you specify the new configuration schema password. If the value is %, a random password is generated. Using random passwords with -setdb or -setdbadmin is the simplest way to update passwords. Use - to leave the password unchanged. If this option is omitted, the tool prompts for the new password.
  • -resultspw lets you specify the new results schema password. If this option is omitted, the tool prompts for the new password.

For EDQ instances that are created from the Oracle Cloud Infrastructure, this tool also refreshes wallets for Autonomous Database schemas. On such instances, run the tool using the following command:

$ sudo -u tomcat /opt/java/bin/java -jar /opt/edq/edq/oracle.edq/setpws.jar ...