## Using a User Key when Logging On to a Database Instance

### Use

Several database tools and interfaces support the XUSER program and logon to a database instance with a user key.

### Procedure

To log on to a database instance using a user key, specify the option –U <user_key> [<options>]when you log on. <user_key> is the user key saved in the XUSER program.

When entering the user key, note that it is case sensitive.

Note also that logon can only be successful if the user stored under the specified user key has actually been created beforehand.

If you also specify log-on options, these override the corresponding data in the XUSER entry.

If you log on to XUSER using SQL applications and do not specify a user key, the logon is carried out using the user data stored under the user key DEFAULT.

If you use the Database Manager to connect to XUSER, and do not specify a user key, then the connection is made with the user data saved under the user name DBMUSR.

### Example

You log on to the Database Manager CLI using the user key ag.

dbmcli -U ag

The user key ag contains the DBM user name anna_ghobadi and the password may for the DEMODB database instance.