Use this command to log on to the Database Manager program.
Besides the logon, a DBM server session with the database you want to administer needs to be opened. You can open this session and log on at the same time (one step logon) or first open the session and then log on to Database Manager in a second step (two step logon).
To be able to access a database, connect to the DBM server that is installed on the computer of the database to be administered: If the database is on your local computer, you only need to specify the database name. If the database is located on a remote computer, also specify the name of the database computer when opening the DBM server session.
You can first open the session with the DBM server and then log on to Database Manager.
Open a DBM server session:
>dbmcli –d <database_name> [-n <database_computer>]
dbmcli on DEMODB>
Log on to Database Manager:
dbmcli on DEMODB>user_logon <dbm_operator>,<dbm_operator_password>
OK
dbmcli on DEMODB>
You can perform both logon steps at the same time by using the DBM option –u | -U. When using this option, Database Manager implicitly executes the DBM command user_logon.
Note
Note that the option has different meanings depending on whether it is in upper- or lowercase.
-u: Logging on with a user name and password
Example
>dbmcli -u [<dbm_operator>,<dbm_operator_password>] -d <database_name> [-n <database_computer>]
-U: Logging on with a user stored in the XUSER file
You can use the XUSER program to store sets of user data as user keys, and use these keys when logging on. User keys for DBM operators can be used successfully only if the operators' data stored in the keys have actually been created for the database in question (see: user_create).
Example
>dbmcli -U [<user_key>] -d <database_name> [-n <database_computer>]
If you do not specify a <user_key> when using –U, Database Manager attempts to use the data stored under the DBMUSR user key.
You should therefore create an XUSER entry with the user key DBMUSR and the data of the DBM operator with the most comprehensive permissions (see: -us: Creating or Changing XUSER Entries).
Call Database Manager in session mode and connect to the local database DEMODB:
>dbmcli -d DEMODB
dbmcli on DEMODB>
Log on as the operator OLEG with the password MONDAY:
dbmcli on DEMODB>user_logon OLEG,MONDAY
OK
dbmcli on DEMODB>
or:
Call Database Manager in session mode and connect to the database MAXDB on the remote computer GENUA:
>dbmcli -d MAXDB - n GENUA
dbmcli on GENUA : MAXDB>
Log on as the operator OLEG with the password MONDAY:
dbmcli on GENUA : MAXDB>user_logon OLEG,MONDAY
OK
dbmcli on GENUA : MAXDB>
Call Database Manager CLI, log on as the operator with the user key OLKEY, connect to the local database DEMODB, and display the operational state of the database:
>dbmcli -U OLKEY -d DEMODB db_state
OK
State
OFFLINE
Call Database Manager CLI, log on as the operator OLEG with the password MONDAY, connect to the database DEMODB, and display the operational state of the database:
>dbmcli -u OLEG,MONDAY -d DEMODB db_state
OK
State
OFFLINE