Function documentationcom.sap.dbtech.powertoys.DBM.cmd Method Locate this document in the navigation structure

 

This method of the com.sap.dbtech.powertoys.DBM class is used for executing DBM commands for managing databases in your Java application.

Prerequisites

  • You are connected to the database.

    More information: com.sap.dbtech.powertoys.DBM.dbDBM Method.

  • Most DBM commands require that you are logged on to the database. To log on to the database, use the user_logon DBM command.

    More information: Database Manager CLI, user_logon

Features

Syntax Syntax

  1. public String cmd(String dbm_command)
    	throws
    		com.sap.dbtech.rte.comm.RTEException,
    		com.sap.dbtech.powertoys.DBMException;
    
End of the code.
com.sap.dbtech.powertoys.DBM.cmd Method: Parameters

Parameter

Description

dbm_command

DBM Command

More information: 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

See Error Handling (DBM Java Classes)

Example

In the cmd method, you use the user_logon DBM command to log DBM operator OLEG with password MONDAY on to the database:

Syntax Syntax

  1. String result = session.cmd ("user_logon OLEG,MONDAY");
End of the code.