mxdbs db-add-user

Syntax

mxdbs db-add-user [-h | --help] database_name external_username password { read | write | create | none }

Description

The mxdbs db-add-user sub-command adds a user to the specified database with the specified access level.

Parameters

database_name
Specifies the name of the database.
external_username
Specifies the External Username of the database user to be added to the database.
password
If the user does not exist, specifies the password to be set for the database user.
read | write | create | none
Specifies the access level of the user on the schemas in the database. The user is added to the implicit privilege group that corresponds to the access level specified. The privileges granted to the implicit privilege group for access are:
  • READ access level grants the user SELECT, USAGE, and EXECUTE access on existing and future schemas in the database.
  • CREATE access level grants the user ALL access on existing and future schemas in the database, and CREATE SCHEMA access privilege on the database catalog.

  • WRITE access level grants the user ALL_DML access on existing and future schemas in the database.

  • NONE access level does not grant the user any access on existing and future schemas in the database. Object owners in the database can explicitly grant access privileges to the user with the GRANT statement.

Options

-h | --help
Displays the help message and exits.

Considerations

  • If the database user does not exist on the system, the user will be created with an associated Guardian user from the configured list of Guardian users in DBS_PLATFORM_USERS metadata.
  • If the user exists on the system, the specified password is ignored.
  • If the user is already associated with the database, the operation fails.
  • The user is added to one of the DBS implicit privilege groups in the database based on the access level specified. The access privileges granted will be applied to the future schemas created after the user is added to the database.

Example input and output

The following command adds a user to the database with CREATE access level.

mxdbs db-add-user db1 demouser1 hpe create
Hewlett Packard Enterprise NonStop(TM) SQL/MX DBS Client 3.5
(c) Copyright 2016 Hewlett Packard Enterprise Development LP.

db-add-user command started.

---  mxdbs operation complete.