# SYSCS_UTIL.SYSCS_DROP_USER system procedure

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 "Configuring NATIVE authentication" in the Derby Security 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.

## Syntax

    SYSCS_UTIL.SYSCS_DROP_USER(IN USERNAME VARCHAR(128))

No result set is returned by this procedure.

USERNAME
  A user name that is case-sensitive if you place the name string in double quotes. This user name is an authorization identifier. See "Authorization identifiers, user authentication, and user authorization" in the Derby Security Guide for more information about how these names are treated. If the user name is that of the database owner, an error is raised.

## Execute privileges

If authentication and SQL authorization are both enabled, only the database owner has execute privileges on this procedure by default. See "Configuring NATIVE authentication," "Configuring user authentication," and "Configuring user authorization" in the Derby Security Guide for more information. The database owner can grant access to other users.

## JDBC example

Drop a user named FRED:

    CallableStatement cs = conn.prepareCall
    ("CALL SYSCS_UTIL.SYSCS_DROP_USER('fred')");
    cs.execute();
    cs.close();

## SQL example

Drop a user named FreD:

    CALL SYSCS_UTIL.SYSCS_DROP_USER('"FreD"')

Parent topic: Built-in system procedures
Related reference
SYSCS_UTIL.SYSCS_CREATE_USER system procedure
SYSCS_UTIL.SYSCS_MODIFY_PASSWORD system procedure
SYSCS_UTIL.SYSCS_RESET_PASSWORD system procedure