The pw dbconfig commands allow you to modify database-related configuration information.
The pw dbconfig list command lists the existing database server configuration.
Syntax for pw dbconfig list command
After using the pw dbconfig set or pw dbconfig setall commands to change the database password, update the new password in the Administration Console.
- From the Administration Console Administration tab, expand Device > Server.
- Depending on the monitors you have configured, you will find the Sybase Query, Sybase ASA Intelliscope, Oracle Query, and Oracle Intelliscope folders.
- Expand each folder, right-click the database query and select Edit.
- 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.
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.
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:
| |
---|
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.
| |
---|
-database Oracle | Sybase | Defines the database as either an Oracle database or a SAP SQL Anywhere database. |
| 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. |
| Defines the database name. This option is required only for Oracle standalone installations. |
| Defines the Oracle service name. This option is required only for Oracle RAC installations. |
| Defines the username for the database account. |
| 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. |
Note
When the pw dbconfig set command is used to define a new primary node on the BMC TrueSight Infrastructure Management Server after an Oracle Data Guard failover or switchover, the pw dbconfig set command uses the MO_META table to validate that the new node is part of the same Data Guard setup and to determine whether the database has the same data as the previous primary node.
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