Background documentation-us: Creating or Changing XUSER Entries Locate this document in the navigation structure

 

You can use the XUSER program with the DBM option –us in the Database Manager to create new XUSER entries for users, or to overwrite existing entries.

XUSER entries are sets of user data that are defined by user keys. They facilitate the logon process to programs that support XUSER.

You can use an XUSER key together with the DBM option -U to log on to the Database Manager (see: user_logon). This means you do not have to specify a DBM operator name and password (DBM option –u), since the Database Manager CLI takes the required data from the relevant XUSER entry.

Recommendation Recommendation

We recommend that you use the XUSER program directly to create or change XUSER entries.

End of the recommendation.

Note Note

You can access the database instance with a user stored under an XUSER entry only if that user was actually created for this database instance. DBM operators can only be created using the Database Manager. (see: user_create). Database users can be created with the query tools or using the Database Manager (see: db_execute).

Unlike user names and passwords, the Database Manager treats user keys as case sensitive. If you define the user keys DBMUSR and DEFAULT for the default values of the Database Manager, you have to write the user keys in upper-case letters.

End of the note.
Creating XUSER Entries

You do not need to connect to the XUSER program to create new XUSER entries.

You can define a user key for an XUSER entry, under which this entry is to be stored.

You can also instruct the Database Manager CLI to generate this user key from a combination of the database name and computer name. You do so by specifying the database instance and database computer in addition to the user name and password.

To work in the Database Manager, we recommend that you create an XUSER entry with the user key DBMUSR and the user data for the first DBM operator. If you specify the DBM option -U without a user key, the Database Manager CLI attempts to access this key implicitly when you log on to this program.

To execute other functions, you have to log on with the user data stored under the DEFAULT user key. For this reason, we recommend that you also create an XUSER entry with the user key DEFAULT and the user data of a valid database user.

Changing XUSER Entries

To change XUSER entries, you must log on with the data of the user that you want to change, or with the data stored under the DEFAULT XUSER key.

If you log on with the data stored under the DEFAULT XUSER key, you are authorized to change all XUSER entries. To identify the XUSER entry you want to change, use the DBM option -uk or a combination of the database name and computer name (DBM options -d and -n).

Structure

-us <new_user_name>,<new_user_password>

Options

Option

Description

<new_user_name>

Name of the user you want to save in the key

<new_user_password>

Password of the user you want to save in the key

Example

Creating a New XUSER Entry
Saving Under a Defined User Key

Call the Database Manager CLI, create a new XUSER entry for the user BORIS with the password PINK, save under the defined user key DEFAULT):

>dbmcli -uk <user_key> -us <new_user_name>,<new_user_password> [options]

with example data:

>dbmcli -uk DEFAULT -us BORIS,PINK

Saving Under a Generated User Key

Call the Database Manager CLI, create a new XUSER entry for the user MONA with the password RED), save under the user key that is generated from the database name DEMODB and the computer name GENUA:

>dbmcli -d <database_name> [-n <database_computer>] -us <new_user_name>,<new_user_password> [options]

with example data:

>dbmcli -d DEMODB -n GENUA -us MONA,RED

Changing an Existing XUSER Entry
Logging on with the Data of the User to be Changed

Call the Database Manager CLI., log on to the XUSER program with the DBM option -u and the data of the XUSER entry to be changed (user MONA, password RED), change the XUSER entry to the user DAVID with the password BLUE,

  • and specify the XUSER entry to be changed by entering the user key (example: user key MOKEY):

    >dbmcli -u <user_name>,<user_password> -uk <user_key> -us <new_user_name>,<new_user_password> [options]

    with example data:

    >dbmcli -u DAVID,BLUE -uk DAKEY -us BORIS,PINK

  • or specify the XUSER entry using the combination of the database name and the computer name (DEMODB and GENUA):

    >dbmcli -u <user_name>,<user_password> -d <database_name> [-n <database_computer>] -us <new_user_name>,<new_user_password> [options]

    with example data:

    >dbmcli -u DAVID,BLUE -d DEMODB -n GENUA -us BORIS,PINK

Logging on with the User Key DEFAULT

Call the Database Manager CLI, log on to the XUSER program using the DBM option -ux and the data stored under the DEFAULT XUSER key (user BORIS, password PINK)

  • and specify the XUSER entry to be changed using the DBM option –uk (user key: DAKEY), specify the new user data (user MONA, password RED) using the DBM option –us:

    >dbmcli -ux <default_user_name>,<default_user_password> -uk <user_key> -us <new_user_name>,<new_user_password> [options]

    with example data:

    >dbmcli -ux BORIS,PINK -uk DAKEY -us MONA,RED

  • or specify the XUSER entry to be changed using a combination of the database name DEMODB and the computer name GENUA, specify the new user data (user name MONA, password RED) using the DBM option -us:

    >dbmcli -ux <default_user_name>,<default_user_password> -d <database_name> [-n <database_computer>] -us <new_user_name>,<new_user_password> [options]

    with example data:

    >dbmcli -ux BORIS,PINK -d DEMODB -n GENUA -us MONA,RED

More Information

Utilities, XUSER