SQL$HELP72.HLB  —  ALTER  DATABASE  Arguments  READ_WRITE,READ_ONLY
    The READ options of the alter-storage-area-params clause permit
    you to change existing storage area access as follows:

    o  Select the READ WRITE option to change any storage area to
       read/write access.

    o  Select the READ ONLY option to change any storage area to
       read-only access.

    If you want to change the read-only and read/write parameters of
    the RDB$SYSTEM storage area, you must specify these parameters at
    this point of your ALTER DATABASE statement and not in the ALTER
    STORAGE AREA clause. For example:

    SQL> -- You can change the RDB$SYSTEM storage area by altering
    SQL> -- the database.
    SQL> --
    SQL> ALTER DATABASE FILENAME mf_personnel
    cont> READ ONLY;
    SQL> --
    SQL> -- An error is returned if you try to change the RDB$SYSTEM storage
    SQL> -- area to read-only using the ALTER STORAGE AREA clause.
    SQL> --
    SQL> ALTER DATABASE FILENAME mf_personnel
    cont> ALTER STORAGE AREA RDB$SYSTEM
    cont> READ ONLY;
    %RDB-E-BAD_DPB_CONTENT, invalid database parameters in the database
    parameter block (DPB)
    -RDMS-E-NOCHGRDBSYS, cannot change RDB$SYSTEM storage area explicitly

    SQL provides support for read-only databases and databases with
    one or more read-only storage areas.

    You can take advantage of read-only support if you have a
    stable body of data that is never (or rarely) updated. When the
    RDB$SYSTEM storage area is changed to read-only, lock conflicts
    occur less frequently, and the automatic updating of index and
    table cardinality is inhibited.

    Read-only databases consist of:

    o  A read/write database root file

    o  One or more read-only storage areas and no read/write storage
       areas

    Read-only databases can be published and distributed on CD-ROM.

    Read-only storage areas:

    o  Have snapshot files but do not use them. (Data in a read-only
       storage area is not updated; specify a small number for the
       initial snapshot file size for a read-only storage area.)

    o  Eliminate page and record locking in the read-only storage
       areas.

    o  Are backed up by the RMU Backup command by default unless you
       explicitly state the Noread_Only qualifier, which excludes
       read-only areas without naming them.

    o  Are restored by the RMU Restore command if they were
       previously backed up.

    o  Are recovered by the RMU Recover command. However, unless the
       read-only attribute was modified, the read-only area does not
       change.

    o  Are not recovered by the RMU Recover command with the Area=*
       qualifier, in which you are not explicitly naming the areas
       needing recovery, unless they are inconsistent.

    You use the READ ONLY option to change a storage area from
    read/write to read-only access. If you wanted to facilitate
    batch-update transactions to infrequently changed data, you would
    use the READ WRITE option to change a read-only storage area back
    to read/write.

    If you change a read/write storage area to read-only, you cannot
    specify the EXTENT, SNAPSHOT ALLOCATION, and SNAPSHOT EXTENT
    clauses.

    A database with both read/write and read-only storage areas can
    be fully recovered after a system failure only if after-image
    journaling is enabled on the database. If your database has
    both read/write and read-only storage areas but does not have
    after-image journaling enabled, perform full backup operations
    (including read-only areas) at all times. Doing full backup
    operations enables you to recover the entire database to its
    condition at the time of the previous backup operation.

    For a complete description of read-only databases and read-only
    storage areas, see the Oracle Rdb7 Guide to Database Performance
    and Tuning.
Close Help