apache > db
Apache DB Project
 
Font size:      

Examples

Examples

This example shows the property settings to configure a database to support:

  • full access for a single user named "sa"
  • read-only access for anyone else who connects to the database
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
        'derby.database.defaultConnectionMode',
        'readOnlyAccess')
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
        'derby.database.fullAccessUsers', 'sa')
    
    

The following example shows the settings to configure a database to support:

  • full access for a single user named "Fred!" (case-sensitive) with full (read-write) access
  • Read-only access for mary and guest
  • No access for other users

The example also demonstrates the use of delimited identifiers for user names.

CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
    'derby.database.defaultConnectionMode',
    'noAccess')
 
CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
    'derby.database.fullAccessUsers', '"Fred!"')
 
CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
    'derby.database.readOnlyAccessUsers', 'mary,guest')


Previous Page
Next Page
Table of Contents
Index