Setting the access mode for particular users

To specify which particular users have full (read-write) access to a database, use the derby.database.fullAccessUsers property. For example:

CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
    'derby.database.fullAccessUsers', 'sa,mary')

To specify which particular users have read-only access to a database, use the derby.database.readOnlyAccessUsers property. For example:

CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
    'derby.database.readOnlyAccessUsers', 'guest,"Fred!"')

For these properties, you specify users as a comma-separated list (no spaces between the comma and the next user).

For users not specified with either property the access is specified by the derby.database.defaultConnectionMode property.

Note: It is possible to configure a database so that it cannot be changed (or even accessed) using the derby.database.defaultConnectionMode property. If you set this property to noAccess or readOnlyAccess, be sure to allow at least one user full access.

See the Javadoc for the utility or Examples of user authorization for more details.

Related concepts
Setting the default access mode
Related reference
Notes on user authorization
User authorization exceptions