Background documentationuser_logon Locate this document in the navigation structure

 

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.

Structure

Two Step Logon

You can first open the session with the DBM server and then log on to Database Manager.

  1. Open a DBM server session:

    >dbmcli –d <database_name> [-n <database_computer>]

    dbmcli on DEMODB>

  2. Log on to Database Manager:

    dbmcli on DEMODB>user_logon <dbm_operator>,<dbm_operator_password>

    OK

    dbmcli on DEMODB>

One Step Logon

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

Note that the option has different meanings depending on whether it is in upper- or lowercase.

End of the note.
Using the DBM Option -u

-u: Logging on with a user name and password

Example Example

>dbmcli -u [<dbm_operator>,<dbm_operator_password>] -d <database_name> [-n <database_computer>]

End of the example.
Using the DBM option -U (logon with XUSER)

-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 Example

>dbmcli -U [<user_key>] -d <database_name> [-n <database_computer>]

End of the example.

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).

Result

dbmcli on [<database_computer>] : <database_name>

In the event of errors, see Reply Format.

Example

Two Step Logon
  1. Call Database Manager in session mode and connect to the local database DEMODB:

    >dbmcli -d DEMODB

    dbmcli on DEMODB>

  2. Log on as the operator OLEG with the password MONDAY:

    dbmcli on DEMODB>user_logon OLEG,MONDAY

    OK

    dbmcli on DEMODB>

or:

  1. 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>

  2. Log on as the operator OLEG with the password MONDAY:

    dbmcli on GENUA : MAXDB>user_logon OLEG,MONDAY

    OK

    dbmcli on GENUA : MAXDB>

One Step Logon with User Key and Execution of a DBM Command

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

One Step Logon with Name and Password of a DBM Operator and Execution of a DBM Command

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

More Information

Glossary, Server Permission

Database Administration, DBM Operators