If an error occurs in the Database Manager, an exception of the class com.sap.dbtech.powertoys.DBMException is raised.
If you cannot connect to the Database Manager, or if an existing connection is broken, an exception of the class com.sap.dbtech.rte.comm.RTEException is raised.
Using the method cmd to execute the DBM command for displaying the operational state of the database instance. An error message is sent if an exception of the class RTEException or DBMException is raised.
try {
String result = session.cmd ("db_state");
}
catch (RTEException RTEExc) {
System.out.println ("connection broken: " + rteExc.toString ());
}
catch (DBMException DBMExc) {
System.out.println ("command failed: " + dbmExc.toString ());
}