pw dbconfig



The pw dbconfig commands allow you to modify database-related configuration information.

pw dbconfig list

The pw dbconfig list command lists the existing database server configuration.

Syntax for pw dbconfig list command

pw dbconfig list

pw dbconfig set

After using the pw dbconfig set or pw dbconfig setall commands to change the database password, update the new password in the Administration Console.

  1. From the Administration Console Administration tab, expand Device > Server.
  2. Depending on the monitors you have configured, you will find the Sybase Query, Sybase ASA Intelliscope, Oracle Query, and Oracle Intelliscope folders.
  3. Expand each folder, right-click the database query and select Edit.
  4. Enter and confirm the new password for the Infrastructure Management main user and click OK.

You can use the pw dbconfig set command to configure Infrastructure Management in a new database environment. For example, you can use the command to change the database connection from a standalone Oracle to Oracle RAC, to change the existing Oracle database to a new Oracle database, or to change the SAP SQL Anywhere database credentials in disaster recovery.

Instructions for running dbconfig in an Application HA environment

If have configured an Infrastructure Management (Application HA only) HA environment, perform the following steps for the corresponding database on both Primary and Secondary nodes:

  1. Stop the Infrastructure Management server.
  2. Back up the db configuration.
  3. Start the database.
  4. Run the pw dbconfig set command (see the command set for the corresponding database below).
  5. Start the Infrastructure Management server.

For information on starting and stopping Infrastructure Management, Oracle DB and Oracle RAC, see Starting and stopping the TrueSight Operations Management components. Open link


SAP SQL Anywhere database:

pw dbconfig set -database sybase -host <New_Sybase_hostname>:<Port number> -username <user name> -password <password> -repusername <report user name> -reppassword <report user password>

Oracle database:

pw dbconfig set -database oracle -type <type> -host <New_Oracle_hostname>:<Port number> -sid <SID> -username <user name> -password <password> -repusername <report user name> -reppassword <report user password>

Oracle RAC:

Recommended (SCAN IP):

pw dbconfig set -database oracle -type rac -servicename <New service name> -rachosts <NEW RAC_SCANIP>:<Port number> -username <user name> -password <password> -repusername <report user name> -reppassword <report user password>

Optional:

pw dbconfig set -database oracle -type rac -servicename <New service name> -rachosts <NEW RAC_NODE1>:<Port number>, <NEW RAC_NODE2>:<Port number>, -username <user name> -password <password> -repusername <report user name> -reppassword <report user password>

Note

-After successfully changing the database configuration by using the pw dbconfig set command, you must restart the BMC TrueSight Infrastructure Management Server.

-BMC supports only one SCAN IP address in Oracle RAC configuration. For a disaster recovery setup, BMC recommends the use of Oracle Data Guard.

-If you are not using Oracle RAC with one SCAN IP, then it is possible to configure TrueSight Infrastructure Management in Oracle two node cluster. If you run the pw sys status command, multiple entries of host and port appears as comma separated values in a cluster configuration.

pw dbconfig setall command

The pw dbconfig setall command enables you to change both the Infrastructure Management password and the Infrastructure Management database password at the same time for both main and report users.

Syntax:

CommandDescription
pw dbconfig setall <configuration>Updates both the Infrastructure Management and the Infrastructure Management database related password configuration information.

pw dbconfig setall -username username -password newpass -oldpassword oldpass

Updates the Infrastructure Management user name and password.

pw dbconfig setall -repusername repusername -reppassword repnewpass -repoldpassword repoldpass

Updates the Infrastructure Management report user name and password.

pw dbconfig setall -username username -password newpass -oldpassword oldpass -repusername repuser -reppassword repnewpass -repoldpassword repoldpass

Updates both the Infrastructure Management user name and password as well as the report user name and password.

pw dbconfig set configuration command options

Note

 All the options in the table below are mandatory.

Option

Description

-database Oracle | Sybase

Defines the database as either an Oracle database or a SAP SQL Anywhere database.

-type Standalone | RAC

Configures the database to be either a standalone database or an Oracle RAC configuration. The RAC option is supported only for an Oracle database.

-host [databaseHostName | IPaddress]:listeningPort

Defines the host name or host IP address and the port where the database server is running.
Default port for Oracle is 1521.
Default port for SAP SQL Anywhere is 2638.

-sid sid

Defines the database name.
This option is required only for Oracle standalone installations.

-servicename service

Defines the Oracle service name.
This option is required only for Oracle RAC installations.

-username userName

Defines the username for the database account.

-password password

Specifies the password for the database account.

-rachosts [hostName:port],[hostName:port], ...

The host names and port numbers for each of the Oracle RAC hosts.
This option is required only for Oracle RAC installations.

-repusername [OracleReportUserName]Name of the Oracle report user.
-reppassword [OracleReportUserPassword]Password of the Oracle report user.

Example

The following command allows you to change the username and password for an existing database:

pw dbconfig set -username <new_user> -password <new_password>

Example

The following command allows you to set up an environment with Oracle as a single, standalone database:

pw dbconfig set -database oracle -type standalone -host solo-ora.domain.com:1521 -sid bppmsid -username user1 -password pass1 -repusername reportuser -reppassword reportpassword

Example

The following command allows you to set up an Oracle RAC environment:

pw dbconfig set -database oracle -type rac -servicename bppmsrvc -rachosts racnode01.domain.com:1521,racnode02.domain.com:1521 -username user1 -password pass1 -repusername reportuser -reppassword reportpassword

Managing password with wild characters

If you want to consider adding the wild characters % and $ while changing the database password, you need to specify _percent_ for % and _dollar_ for $. 

Examples:

  • pw dbconfig set -username <user name> -password per_percent__dollar_cent. The password is set to per%$cent in the config.
  • pw dbconfig set -repusername <user name> -reppassword x_percent_y. This sets the report user password to x%y in the config.
  • pw dbconfig setall -username <user name> -password x_dollar_y -oldpassword per_percent__dollar_cent. The main user password is changed from per%$cent to x$y in both db and config.
  • pw dbconfig setall -repusername <user name> -reppassword x_percent_y -repoldpassword x_dollar_y. The report user password is changed from x$y to x%y in both db and config.


Updating the dbuser encryption when the database is not reachable

If the pw dbconfig set command fails to connect to the database, then by default the command does not make any changes to the TrueSight Infrastructure Management server files.

To update the dbuser encryption when the database cannot be reached, run the pw dbconfig set  command with -force 1 added to the end of the command line. This is applicable to both Oracle and SAP SQL Anywhere databases.

This configures the TrueSight Infrastructure Management server to use the values and updates the dbuser file without verifying that it can connect to the database first.

Example

The following command allows you to update the dbuser encryption in the Oracle database:

pw dbconfig set -database oracle -type <type> -host <Oracle_hostname>:<Port number> -sid <SID> -username <user name> -password <password> -repusername <report user name> -reppassword <report user password> -force 1
Was this page helpful? Yes No Submitting... Thank you

Comments