The SYSCS_UTIL.SYSCS_DROP_USER system procedure removes a user account from a database.
This procedure is used in conjunction with NATIVE authentication. For details about NATIVE authentication, see derby.authentication.provider and "Using NATIVE authentication" in the Derby Developer's Guide.
You are not allowed to remove the user account of the database owner.
If you use this procedure to remove a user account, the schemas and data objects owned by the user remain in the database and can be accessed only by the database owner or by other users who have been granted access to them. If the user is created again, the user regains access to the schemas and data objects.
SYSCS_UTIL.SYSCS_DROP_USER(IN USERNAME VARCHAR(128))
No result set is returned by this procedure.
If authentication and SQL authorization are both enabled, only the database owner has execute privileges on this procedure by default. See "Using NATIVE authentication," "Enabling user authentication," and "Setting the SQL standard authorization mode" in the Derby Developer's Guide for more information. The database owner can grant access to other users.
Drop a user named FRED:
CallableStatement cs = conn.prepareCall ("CALL SYSCS_UTIL.SYSCS_DROP_USER('fred')"); cs.execute(); cs.close();
Drop a user named FreD: