Entering content frame

Function documentation Method cmd Locate the document in the library structure

Use

cmd is a method of the class DBM.

With this method you send a DBM command to the DBM server (see Database Manager CLI, Structure linkOverview of all DBM Commands).

Features

cmd (cmd_string)

 

cmd_string

DBM command

 

Result:

     Successful execution: result of the DBM command

     Error: exception of the class DBMServError

Example

     You query the operational state of the database instance with the DBM command db_state:

result = session.cmd ('db_state')

print repr (result)

'State\nOFFLINE\n'

     You enter an invalid DBM command:

result = session.cmd ('invalid command')

print repr (result)

Traceback (most recent call last):

[...]

dbm.DBMServError: [-24977] Unknown DBM command "invalid"

     Executing a DBM Command

 

Leaving content frame