The following example shows how to do this. The example assumes that you are
reusing the credentials-protected database you created in
. The example commands first set the
read/write and read-only users and then verify that the settings work
correctly.
Coarse-grained authorization details
Use a CALL statement to call the
SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY system procedure.
To specify multiple user IDs, use a comma-separated list, with no spaces
between the comma and the next user ID.
To specify read-write access for a user ID that contains special characters,
use delimited identifiers for the user ID. For example:
CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
'derby.database.fullAccessUsers', '"Elena!"')
For extra security, you should configure the
derby.database.propertiesOnly property so that users cannot
override database behavior using system-wide properties specified on the command
line or in the derby.properties file.