Drop a user

2023-12-25 08:49:42  Updated

Use the DROP USER statement to drop a user.

Prerequisites

You must have the system privilege DROP USER. For information about how to view your privileges, see View user privileges. If you do not have the system privilege DROP USER, contact the administrator to obtain the privilege. For information about how to grant privileges to a user, see Modify user privileges.

Considerations

Notice

Dropping a user will drop all objects owned by the user, including privileges, databases, tables, and so on. Please proceed with caution when performing this operation.

Procedure

  1. Log on to an Oracle tenant of the cluster.

  2. Execute the following statement to drop a user:

    DROP USER username CASCADE;
    

    where

    • CASCADE specifies that before dropping a user, the system will drop all objects owned by the user, including privileges, databases, tables, and so on.

    • username specifies the user to be dropped. Only one user can be dropped at the same time.

    Here is an example:

    obclient> DROP USER sqluser CASCADE;
    Query OK, 0 rows affected
    

References

For more information about the DROP USER statement, see DROP USER.

Contact Us