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.
See the Javadoc for the utility or Examples of user authorization for more details.