You can use the XUSER program with the DBM option –us in the Database Manager to create new XUSER entries for DBM operators or database users, or overwrite existing entries.
XUSER entries are sets of user data, which are defined by key names. They facilitate the logon process to programs that support XUSERs. You can use an XUSER key together with the DBM option –U to log on to the Database Manager. 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.
We recommend that you use the XUSER tool directly to create or change XUSER entries.
See also: XUSER
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 have to be created using the Database Manager
(see also Creating DBM
Operators);
Database users can be created with the query tools or the
Database Manager (see also Executing a Database
Statement).
Unlike user names and passwords, the Database Manager treats key names as case sensitive. If you define the key names DBMUSR and DEFAULT for the default values of the Database Manager, you have to write the key names in upper-case letters.
You do not need to log on to the XUSER program to create new XUSER entries.
You can define a key name for an XUSER, under which the entry is to be stored.
You can also instruct the Database Manager CLI to generate this key name from a combination of the database name and server name. You do so by specifying the database instance and database server in addition to the user name and password.
To work in the Database Manager, we recommend that you create an XUSER entry with the key name DBMUSRand the user data for the first DBM operator. If you specify the DBM option –Uwithout a key name, 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 key name. For this reason, we recommend that you also create a XUSER entry with the key name DEFAULT and the user data of a valid database user.
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 server name (DBM options -d and –n).
-us <new_user_name>,<new_user_password>
...
1. Call the Database Manager CLI, create a new XUSER entry (example: user BORIS with password PINK), save under a defined key name (example: key name DEFAULT ):
dbmcli –uk <user_key> –us <new_user_name>,<new_user_password> [options]
dbmcli –uk DEFAULT –us BORIS,PINK
2. Call the Database Manager CLI, create a new XUSER entry (example: user MONA with password RED), save under a defined key name (example: key name MOKEY ):
dbmcli –uk <user_key> –us <new_user_name>,<new_user_password> [options]
dbmcli –uk MOKEY –us MONA,RED
3. Call the Database Manager CLI, create a new XUSER entry (example: user MONA with password RED), save under the key name generated from the database name and server name (example: database instance HOTELDB, server name GENUA):
dbmcli –d <database_name> [-n <database_server>] –us <new_user_name>,<new_user_password> [options]
dbmcli –d HOTELDB –n GENUA -us MONA,RED
...
1. Call the Database Manager CLI. Log on to the XUSER program with the data of the XUSER entry that is to be changed and with DBM option -u (example: change user MONA, password RED to user DAVID, password BLUE):
a. Specify which XUSER entry is to be changed by entering the key name (example: key name MOKEY):
dbmcli -u <user_name>,<user_password> -uk <user_key> –us <new_user_name>,<new_user_password> [options]
dbmcli –u DAVID,BLUE –uk DAKEY –us BORIS,PINK
b. Specify which XUSER entry is to be changed by entering the combination of database name and server name (example: database instance HOTELDB, server name GENUA):
dbmcli -u <user_name>,<user_password> –d <database_name> [-n <database_server>] –us <new_user_name>,<new_user_password> [options]
dbmcli –u DAVID,BLUE –d HOTELDB –n GENUA –us BORIS,PINK
2. Call the Database Manager CLI. Log on to the XUSER program with the data stored under the DEFAULT XUSER key and using the DBM option -ux (example: user BORIS, password PINK):
a.
Specify which XUSER entry is to be changed using
the DBM option –uk (example: key name: DAKEY).
Specify the new data using the DBM option –us (example: user BORIS, password PINK):
dbmcli -ux <default_user_name>,<default_user_password> -uk <user_key> –us <new_user_name>,<new_user_password> [options]
dbmcli –ux BORIS,PINK –uk DAKEY –us BORIS,PINK
b.
Specify which XUSER entry is to be changed using a
combination of the database name and server name (example: database instance
HOTELDB, server name GENUA).
Specify the new data using the DBM option –us (example: user BORIS, password PINK):
dbmcli -ux <default_user_name>,<default_user_password> –d <database_name> [-n <database_server>] –us <new_user_name>,<new_user_password> [options]
dbmcli –ux MONA,RED –d HOTELDB –n GENUA –us BORIS,PINK