11.6.3 Deleting HADB users
To delete an HADB user, use the DROP USER definition SQL statement. The following shows an example of deleting an HADB user.
- Specification example
-
HADB user ADBUSER02 is deleted.
DROP USER "ADBUSER02" CASCADE
An HADB user who has the DBA privilege and the CONNECT privilege can use the DROP USER statement to delete HADB users.
- Note
-
-
Before deleting an HADB user, we recommend that you execute the adbchgsrvmode --offline command to change the operation mode of the HADB server to the offline mode. Delete an HADB user only after disabling connection requests from HADB clients.
-
You cannot delete an HADB user who has the audit privilege. To delete such a user, you must first have their audit privilege revoked. For details about how to revoke an audit privilege, see (2) Deleting auditors (revoking audit privileges) in 12.4.1 Adding, deleting, and changing auditors (granting or revoking audit privileges).
-
For details about the DROP USER statement, see DROP USER (delete an HADB user) in Definition SQL in the manual HADB SQL Reference.
- Important
-
Because the schemas and tables that are owned by the HADB user to be deleted are also deleted, the following might be affected:
-
The viewed tables that depend on the table to be deleted by execution of the DROP USER statement (viewed tables for other schemas) are deleted or invalidated.
-
The foreign keys that use as the referenced table the table to be deleted by execution of the DROP USER statement (foreign keys for other schemas) are also deleted.
For details about deleting schemas, see 11.9.2 Deleting a schema. If the base table defined in the schema is non-updatable, temporary work files created by the interrupted command might remain.
If the HADB user to be deleted granted access privileges to other HADB users, those access privileges are canceled.
-