Deleting a User

Remove a user ID from the database.

Prerequisites
Task
If the user being delete has any external logins defined, the external logins are deleted as part of the process. However, any related objects on remote servers are not removed.
To delete a user, execute:
DROP USER userID
Note:
  • When dropping a user, any permissions granted by this user are also removed.
  • If the user being deleted owns any objects in the database, the following error message appears, and the command fails:
    Cannot drop a user that owns tables in runtime system SQLCODE=-128, ODBC 3  State="42000"
        Line 1, column 1

Example:

This statement drops user ID Joe from the database:

DROP USER Joe
Related reference
DROP USER Statement