Entering content frame

 Executing DBM Commands with Java 

Use

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.

See also:

Connecting to the Database Manager with Java

Prerequisites

You can execute the majority of the DBM commands only if you have logged on as the DBM operator of the database instance that you want to administer (see Logging on to the Database Manager).

For information on whether the execution of a DBM command requires this logon, see the descriptions of the individual commands in the documentation Database Manager CLI.

Definition of the Method cmd

    public String cmd (String cmdString)

        throws

            com.sap.dbtech.rte.comm .RTEException,

            com.sap.dbtech.powertoys.DBMException;

Example

Using the method cmd to execute the DBM command user_logon (for logging on to the Database Manager) for the user DBMUSER with the password DBM:

String result = session.cmd ("user_logon DBMUSER,DBM");

 

See also:

Example for Displaying the Operational State of a Database

 

Leaving content frame