To execute DBM commands in your Java application, use the com.sap.dbtech.powertoys.DBM.cmd method.
● You are connected to the database instance, see Method com.sap.dbtech.powertoys.DBM.dbDBM.
● You can only execute most DBM commands when you are logged on to the database instance. To log on to the database instance, use the DBM command user_logon (see Database Manager CLI, user_logon).
public String cmd(String dbm_command)
throws
com.sap.dbtech.rte.comm.RTEException,
com.sap.dbtech.powertoys.DBMException;
Parameters
Parameter |
Description |
dbm_command |
DBM command see Database Manager CLI, Overview of all DBM Commands |
Return Value
The return code of the method contains the return code of the DBM command.
Exceptions
Classes |
Description |
com.sap.dbtech.rte.comm.RTEException com.sap.dbtech.powertoys.DBMException |
The return code of the method contains the return code of the DBM command.
In the cmd method, you use the DBM command user_logon to log DBM operator OLEG with the password MONDAY on to the database instance:
String result = session.cmd ("user_logon OLEG,MONDAY");
See also:
Example: Displaying the Operational State of the Database Instance
Troubleshooting (Database Manager)