You can use the Java method cmd to execute DBM commands. The parameter cmdString must contain a valid DBM command.
The return code of the method contains the return code of the DBM command.
Most DBM commands can only be executed when you are logged on to the database instance (see Connecting to the Database Manager with Java). For information on whether the execution of a DBM command requires this logon, see the descriptions of the commands in the documentation Database Manager CLI.
You use method cmd.
public String cmd (String cmdString)
throws
com.sap.dbtech.rte.comm .RTEException,
com.sap.dbtech.powertoys.DBMException;
Using the method cmd to execute the DBM command user_logon (for logging on to the Database Manager) for the DBM user OLEG with the password MONDAY:
String result = session.cmd ("user_logon OLEG,MONDAY");
See also:
Example for Displaying the Operational State of a Database Instance