mxdbs db-remove-user

Syntax

mxdbs db-remove-user [-h | --help] database_name external_username

Description

The mxdbs db-remove-user sub-command removes a database user from the specified database.

Parameters

database_name
Specifies the name of the database.
external_username
Specifies the External Username of the database user to be removed.

Options

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

Considerations

  • If the user to be removed owns a schema in the database, then the user cannot be removed from the database.
  • The last user with CREATE access level privilege cannot be removed from the database.
  • If there are explicit access privileges granted to the user by other users of the database, the user cannot be removed from the database. Any access privilege granted explicitly to the user must be revoked before user can be removed from the database.
  • The user will be removed from the database default privilege group, the user created privilege groups, and the implicit privilege group.

  • If the user holds CREATE access level in the database, the CREATE SCHEMA privilege on the database catalog is revoked.
  • If the user owns other databases or is a user in other databases, the user is not dropped from the system.

  • If the user does not own any other databases or is not part of any other database, the External Username of the database user is dropped from the system. The associated Guardian user is in use and is not available for use when a new external user is created.

Example input and output

The following command removes a user from the database.

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

db-remove-user command started.

---  mxdbs operation complete.