In this blog post, let’s learn about the error message “21126 User user-name cannot be removed from the database database-name.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.
Error Message
21126 User user-name cannot be removed from the database database-name.
Reason for the Error
This error occurs if one of the following conditions occurs:
You specified an external username who is the only user with CREATE access level in the database.
The user owns a schema in the database.
Solution
Use one of the following recovery options depending upon the cause:
If the user to be removed is the only user with CREATE access level in the database, add another user to the database with CREATE access level and retry the operation.
If the user needs to remove own schemas in the database, the schemas must be dropped before attempting to remove the user from the database