RDOHELP72.HLB  —  DEFINE_DATABASE
    Creates a database file, specifies its name, and determines its
    physical characteristics. This statement also creates a directory
    in the data dictionary where definitions of other database
    elements can be stored.

    Example (single-file database):

    RDO> DEFINE DATABASE 'PERSONNEL'.

1  –  More

    By using the RDBVMS$CREATE_DB logical name and the RDBVMS$CREATE_
    DB identifier, you can restrict the ability of users to
    create databases on your system. For more information on the
    RDBVMS$CREATE_DB logical name and identifier, see the chapter
    on defining database protection in the Oracle Rdb Guide to Database
    Design and Definition manual.

    If your system does not use the RDBVMS$CREATE_DB logical name and
    identifier, all users on the system have the ability to create
    databases.

    When the DEFINE DATABASE statement executes, Oracle Rdb:

    o  Creates a database file, a snapshot file, and, if the database
       is multifile, storage area files.

    o  Creates a data dictionary entity for the database, including
       all the system fields and relations, if the dictionary is
       installed.

    o  Assigns database parameters, and, if the database is
       multifile, storage area parameters.

    o  Creates a default access control list.

    o  Invokes the newly created database, using the database file
       name as the database handle.

    You cannot issue the DEFINE DATABASE statement when a transaction
    is active. Do not issue an INVOKE DATABASE statement after you
    use DEFINE DATABASE. Oracle Rdb automatically invokes the database
    after creating the database file.

    Other users are not allowed to be attached to the database when
    you issue the DEFINE DATABASE statement.

    For Oracle Rdb for OpenVMS Alpha, RDO generates an error if you define
    the CDDSHR logical name as NL: as shown in the following example:

    $ DEFINE CDDSHR NL:
    $ RDO
    RDO> DEFINE DATABASE RENTALS.
    -RDO-F-CDDERR, error occurred during CDD signin, CDD will not be used
    -LIB-E-READERR, error reading !AS

    If CDDSHR is defined as NL:, use the DCL command SHOW LOGICAL CDDSHR_TV
    to check that the CDDSHR_TV logical name is also defined as NL:.  Oracle
    Rdb recommends that you do not define CDDSHR as NL:.  If you want to
    avoid using the dictionary, specify the DICTIONARY IS NOT USED clause on
    the RDO IMPORT or DEFINE DATABASE commands.

2  –  Format

  (B)0DEFINE DATABASE qq> file-spec qqwqqqqqqqqqqq>qqqqqqqqwqk
                                  mq> invoke-options qqj x
  lqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqj
  mqwqwqqqqqqqqqqq>qqqqqqqqqqqqwqwqwqqqqqqqqqqqq>qqqqqqqqqqqqwqqk
    x tqq> db-wide-options-1  qu x mq> storage-area-options qj  x
    x mqq> db-wide-options-2 qqj x                              x
    mqqqqqqqqqqq<qqqqqqqqqqqqqqqqj                              x
  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
  mwwqqqqqqqqqqqqqq>qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq>qqqqqqqqqqqwqwq> .
   xtq> define-storage-area-clause qqqqqqqqqqqqqqqq>qqqqqqqqqqu x
   xmq> SEGMENTED STRING STORAGE AREA IS q> storage-area-name j x
   mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqj

2.1  –  file-spec

    A file specification that names the database file. You should use
    either a full file specification, including device, directory,
    and file name without the file type, or a simple file name. In
    the second case, Oracle Rdb creates the database in the current
    default directory. In a single-file database, the file name
    specified becomes the file name for two files:

    o  The database file. The default file type is RDB.

    o  The snapshot file. This file is used as a temporary file for
       read-only transactions. The default file type is SNP.

    Type the name of the file-spec in uppercase letters when you
    define your database if you use the data dictionary or may
    use it in the future. If you type the name of the file-spec in
    lowercase letters and try to use the DEFINE GENERIC command of
    the dictionary's CDO utility to create a directory name for the
    database in the dictionary, the command will fail.

    In a multifile database, the file name specified becomes the file
    name for three files:

    o  The database root file. The default file type is RDB.

    o  The default storage area file. The default file type is RDA.

    o  A snapshot file. The default file type is SNP.

2.2  –  invoke-options

  (B)0invoke-options =

  qqwqqqqqqqqqqqqqqqqqqqqqqqqqqq>qqqqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqqq>
    tqqqqq> DB_HANDLE IS qqqqqqq> db-handle qqqqqqqu
    mqqqqq> DBKEY SCOPE IS qqwqq> COMMIT qqqwqqqqqqj
                             mqq> FINISH qqqj

2.2.1  –  db-handle

    The name of the variable you will use to refer to the database.
    Do not use a file name for the db-handle.

2.2.2  –  COMMIT

    When the DBKEY SCOPE IS COMMIT clause is specified with a
    DEFINE DATABASE statement, this means that the database key
    (dbkey) of each record used is guaranteed not to change during
    each transaction. That is, if a record is erased, its dbkey is
    guaranteed not to be reused by another database user until after
    a COMMIT statement is executed.

2.2.3  –  FINISH

    When the DBKEY SCOPE IS FINISH clause is specified with a DEFINE
    DATABASE statement, this means that the database key (dbkey)
    of each record used is guaranteed not to change until the
    user detaches from the database (usually, by using the FINISH
    statement).

2.3  –  db-wide-options-1

  (B)0db-wide-options-1 =

  qqwq> IN qqqqqq> path-name qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwq
    tq> COLLATING_SEQUENCE IS sequence-name qqk                      x
    x  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj                      x
    x  mqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqq> ncs-name qqk       x
    x    mq> DESCRIPTION IS qq> /* text */ qqj               x       x
    x    lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj       x
    x    mqwqqqqqqqqqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
    x      mq> FROM library-name qqj                                 x
    tq> DESCRIPTION IS qqqqqqq> /* text */ qqqqqqqqqqqqqqqqqqqqqqqqqqu
    tq> NUMBER OF USERS IS qq> number-users qqqqqqqqqqqqqqqqqqqqqqqqqu
    tq> NUMBER OF BUFFERS IS qqqqq> number-buffers qqqqqqqqqqqqqqqqqqu
    tq> NUMBER OF qqwqq> CLUSTER qqqqwq> NODES IS qq> number-nodes qqu
    x               mqq> VAXCLUSTER qj                               x
    tq> NUMBER OF RECOVERY BUFFERS IS qqq> recovery-buffers qqqqqqqqqu
    mq> global-buffer-params qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

2.3.1  –  path-name

    The data dictionary path name for the dictionary path name
    where the database definition is stored. Use this qualifier to
    store the data dictionary definitions for the database in a data
    dictionary entity other than the default path, which is defined
    by the name of the database file.

2.3.2  –  COLLATING_SEQUENCE

    Specifies a collating sequence to be used for all fields in the
    database. Sequence-name is a name of your choosing; use this
    sequence-name in any subsequent statements that refer to this
    collating sequence.

    The OpenVMS National Character Set (NCS) Utility provides
    a set of pre-defined collating sequences and also lets you
    define collating sequences of your own. The COLLATING_SEQUENCE
    clause accepts both pre-defined and user-defined NCS collating
    sequences.

    If you do not specify a collating sequence, the default is ASCII
    (shown as "no collating sequence" in some displays).

2.3.3  –  ncs-name

    Specifies the name of a collating sequence in the default NCS
    library, SYS$LIBRARY:NCS$LIBRARY, or in the NCS library specified
    by the argument library-name. (In most cases, it is probably
    simplest to make the sequence-name the same as the ncs-name: for
    example, COLLATING_SEQUENCE IS FRENCH FRENCH.) You can view the
    collating sequence names by using the command NCS/LIST at DCL
    level.

    The collating sequence can be either one of the pre-defined NCS
    collating sequences or one that you have defined yourself using
    NCS.

2.3.4  –  text

    Provides a comment for a collating sequence or database being
    defined.

2.3.5  –  library-name

    Specifies the name of an NCS library other than the default. The
    default NCS library is SYS$LIBRARY:NCS$LIBRARY.

2.3.6  –  number-users

    The maximum number of users allowed to access the database at one
    time. The default is 50 users. The largest number of users you
    can specify is 2032, and the fewest number of users is 1.

2.3.7  –  number-buffers

    The number of buffers Oracle Rdb allocates per process using this
    database. Specify an unsigned integer between 2 and 32768. The
    default is 20 buffers.

2.3.8  –  number-nodes

    The NUMBER OF CLUSTER NODES is clause and the NUMBER OF
    VAXCLUSTER NODES is clause have exactly the same effect. The
    option of using NUMBER OF CLUSTER NODES has been added to reflect
    the fact that Oracle Rdb can run on different hardware platforms (in
    addition to VAXclusters).

    Sets the upper limit on the maximum number of nodes in the
    cluster from which users can access the shared database. The
    default is 16 nodes. The range is 1 node to 96 nodes. The actual
    maximum limit is the current cluster limit.

    In some cases, after you have specified a particular number of
    users and nodes, doing a dump of the database root file will
    display a different number of nodes than the value you set. The
    following paragraphs explain why this occurs.

    The relationship between the number of users and the number of
    nodes supported on a database can be seen when you specify 2032
    users and 4 nodes in a SQL CREATE/ALTER DATABASE or RDO DEFINE
    /CHANGE DATABASE statement and then dump the database root file.
    The dump displays values of 2032 users and 41 nodes.

    To understand this relationship, Oracle Rdb uses a data structure
    called a TSN Block (TSNBLK). A TSN Block keeps track of
    transaction activity on a node and transaction information for
    each user on a particular node. Each TSN Block is owned by a
    particular node and can handle up to 50 users. For each group of
    50 users one TSNBLK is allocated per node to cover the maximum
    number of users and nodes the database is expected to support,
    which is determined as either one TSNBLK per node, or one TSNBLK
    per 50 users, whichever is larger. The maximum number of TSN
    blocks is equal to the value of the current maximum number of
    nodes that are supported for a database.

    For example, if the DBA specifies 2032 users and 4 nodes, this
    is calculated as 2032/50 for a total of 41 TSNBLKs and this
    equates to 41 nodes. The algorithm selects the maximum value
    of (number of nodes specified, number of nodes calculated). So in
    this example, 41 is the maximum calculated value (calculated 41 >
    specified 4).

    Had the DBA specified 2032 users and 50 nodes, 50 would be the
    maximum value for the number of nodes (specified 50 > calculated
    41) and 50 TSNBLKs would be allocated, one for each node.

    As another example, if the DBA specifies 50 users and 10 nodes,
    the maximum value is 10 nodes (specified 10 > calculated 1), so
    ten TSNBLKs would be allocated, one for each node.

2.3.9  –  recovery-buffers

    The number of database buffers used during the automatic recovery
    process that is initiated after a system or process failure. This
    recovery process uses the recovery-unit journal file. Specify an
    unsigned integer between 2 and 32768. The default is 20 buffers.

2.3.10  –  global-buffer-params

  (B)0global-buffer-params=

  q> GLOBAL BUFFERS ARE qwq> ENABLED qqwqk
                         mq> DISABLED qj x
  lqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqj
  mqwqqqqqqqqqqqqqqqqqqqqqqqq>qqqqqqqqqqqqqqqqqqqqqqqwqq>
    mq> ( qq> NUMBER IS number-glo-buffers qq> , qk  x
        lqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqj  x
        mq> USER LIMIT IS max-glo-buffers qq> ) qqqqqj

2.3.10.1  –  GLOBAL_BUFFERS

    The GLOBAL BUFFERS ARE ENABLED clause specifies that Oracle Rdb
    maintain one global buffer pool per node in the cluster for each
    database. By default, Oracle Rdb maintains a local buffer pool for
    each user. For more than one user to use the same page, each
    must read it from disk into their local buffer pool. When the
    GLOBAL BUFFERS ARE ENABLED clause has been specified, a page
    in the global buffer pool may be read by more than one user at
    the same time, although only one user reads the page from disk
    into the global buffer pool. Global buffering provides improved
    performance because I/O is reduced and memory is better utilized.

    The default is GLOBAL BUFFERS ARE DISABLED, in which Oracle Rdb
    maintains a local buffer pool for each user, and global buffers
    are not enabled.

2.3.10.2  –  NUMBER

    When global buffers are enabled, the NUMBER IS clause is used to
    specify the default number of global buffers per node.

    In database parameter syntax, a user designates an attach to the
    database, not a person who uses the database.

    The default number of global buffers is the maximum number
    of users multiplied by 5. (In the RDO syntax for database
    parameters, a user is the same as an attach.) You can override
    the default by defining a value for the logical name RDM$BIND_
    BUFFERS.

    Although you can change the NUMBER IS parameter online, the
    change will only take effect the next time that the database is
    opened. By default, a database can be opened automatically (that
    is, by any user who invokes the database and executes a data
    manipulation language statement). If the database was modified
    so that it must be manually opened, the RMU/OPEN command must be
    used to open it.

2.3.10.3  –  USER_LIMIT

    The USER LIMIT clause specifies the maximum number of global
    buffers each user allocates. Because global buffer pools are
    shared by all users, you must define an upper limit on how many
    global buffers a single user can allocate. This limit prevents a
    user from defining the RDM$BIND_BUFFERS to use all the buffers in
    the global buffer pool. The user limit cannot be greater then the
    total number of global buffers. The default is 5.

    See the Oracle Rdb Guide to Database Performance and Tuning for
    information on determining the maximum number of global buffers a
    user can allocate.

    Although you can change the USER LIMIT IS parameter online, the
    change will only take effect the next time that the database is
    opened. By default, a database can be opened automatically (that
    is, by any user who invokes the database and executes a data
    manipulation language statement). If the database was modified
    so that it must be manually opened, the RMU/OPEN command must be
    used to open it.

2.4  –  db-wide-options-2

  (B)0db-wide-options-2 =

  qwq> BUFFER SIZE IS qqqqq> buffer-blocks qq> BLOCKS qqqqqqwq>
   tq> ADJUSTABLE LOCK GRANULARITY IS qwqqq> ENABLED qqqwqqqu
   x                                   mqqq> DISABLED qqj   x
   tq> SNAPSHOT IS qqqqwqqqqq> ENABLED qwqq> IMMEDIATE qwqwqu
   x                   x                mqq> DEFERRED qqj x x
   x                   mqqqqq> DISABLED qqqqqqqqqqq>qqqqqqj x
   tq> DICTIONARY IS qqqwqqq> REQUIRED qqqqqqqwqqqqqqqqqqqqqu
   x                    tqqq> NOT REQUIRED qqqu             x
   x                    tqqq> USED qqqqqqqqqqqu             x
   x                    mqqq> NOT USED qqqqqqqj             x
   tq> CARRY OVER LOCKS ARE qqwq> ENABLED qwqqqqqqqqqqqqqqqqu
   x                          mq> DISABLED j                x
   mq> LOCK TIMEOUT INTERVAL IS number-seconds SECONDS qqqqqj

2.4.1  –  buffer-blocks

    The number of blocks Oracle Rdb allocates per buffer. Specify an
    unsigned integer greater than zero. If you do not specify this
    parameter, Oracle Rdb uses a buffer size that is three times the
    PAGE SIZE value.

    Buffer size is a global parameter and the number of blocks per
    page (or buffer) is constrained to less than 64 blocks per page.
    The page size can vary by storage area for multifile databases,
    so you should determine the page size of each storage area based
    on the sizes of records that will be stored in each storage area.

    When you choose the number of blocks per buffer, choose a number
    that is wholly divisible by all page sizes for all storage
    areas in your multifile database. For example, if your database
    has three storage areas with page sizes of 2, 3, and 4 blocks
    respectively, choosing a buffer size of 12 blocks will ensure
    optimal buffer utilization. If you choose a buffer size of 8, the
    storage area with a page size of 3 blocks will waste 2 blocks per
    buffer. Oracle Rdb reads as many pages as will fit into the buffer.
    In this case, Oracle Rdb reads two pages of 3 blocks apiece into the
    buffer, wasting 2 blocks.

2.4.2  –  ADJUSTABLE_LOCK

    Enables or disables whether or not the database system will
    automatically maintain as few locks as possible on database
    resources. The default is ENABLED, and results in fewer locks
    against the database. However, if contention for database
    resources is high, the automatic adjustment of locks can become a
    CPU drain. Such databases can trade more restrictive locking for
    less CPU usage by disabling adjustable lock granularity.

    Disabling adjustable locking granularity may require that the
    LOCKIDTBL, LOCKIDTBL_MAX, PQL_DENQLM, PQL_MENQLM OpenVMS SYSGEN
    parameters for locks be increased.

2.4.3  –  ENABLED-IMMEDIATE

    The default, ENABLED IMMEDIATE causes read/write transactions
    to write copies of records to the the snapshot file before
    those records are modified, regardless of whether a read-only
    transaction is active.

    If you use the SNAPSHOT IS ENABLED clause to enable snapshots
    on a multifile database, writing to all snapshot files for all
    storage areas is enabled.

2.4.4  –  ENABLED-DEFERRED

    Specifies that read/write transactions not write copies of
    records they modify to the snapshot file unless a read-only
    transaction is active. Read-only transactions that attempt to
    start after an active read/write transaction begins must wait for
    all active read/write users to complete their transactions.

    If you use the SNAPSHOT IS ENABLED clause to enable snapshots
    on a multifile database, writing to all snapshot files for all
    storage areas is enabled.

2.4.5  –  DISABLED

    Disables snapshot transactions. If you use the SNAPSHOT IS
    DISABLED clause to disable snapshots on a multifile database,
    writing to all snapshot files for all storage areas is disabled.

2.4.6  –  DICTIONARY

    The DICTIONARY IS [NOT] REQUIRED clause determines whether the
    database must be invoked by path name for data definition changes
    to occur. If you specify the DICTIONARY IS REQUIRED option,
    the database must be invoked by path name to change metadata
    and the data dictionary will be maintained. If you specify the
    DICTIONARY IS NOT REQUIRED option, the database can be invoked by
    either file name or path name to change metadata. The default is
    DICTIONARY IS NOT REQUIRED.

    The DICTIONARY IS [NOT] USED clause determines whether the
    definition of the database and definitions of database elements
    will be stored in the data dictionary. If you specify the
    DICTIONARY IS USED option, the definition of the database and
    definitions of database elements will be stored in the data
    dictionary. If you specify the DICTIONARY IS NOT USED option,
    no definitions will be stored in the data dictionary. The default
    is DICTIONARY IS USED.

    You receive an error message if you specify incompatible options,
    such as the DICTIONARY IS REQUIRED option and the DICTIONARY IS
    NOT USED option.

2.4.7  –  CARRY_OVER_LOCKS

    The carry-over locks option is a database-wide parameter
    that allows you to disable carry-over lock optimization. This
    optimization is enabled by default. Although this is an advantage
    in more environments, it can result in false lock conflicts in
    some applications.

    The carry-over locks optimization holds area and record locks
    across transactions and depends on NOWAIT transactions asking for
    and acquiring the NOWAIT lock. This can result in long delays if
    concurrent users are executing long verbs. You should consider
    disabling the carry-over locks optimization if transactions
    experience noticeable delays in acquiring the NOWAIT lock (as
    seen in the output of the RMU/SHOW STATISTICS command). Note that
    if you do disable the carry-over locks option, there may be some
    performance degradation because transactions will acquire and
    release area and top level ALG locks for every transaction.

2.4.8  –  LOCK_TIMEOUT

    Specifies the number of seconds for processes to wait during a
    lock conflict before timing out. The number of seconds can be
    between one and 65,000.

    Sets the default database lock timeout interval. This is the
    database wide timeout interval. It is used as the default as well
    as the upper limit in determining the timeout interval to use.
    For example, if LOCK TIMEOUT INTERVAL IS 25 SECONDS is specified
    with the CHANGE DATABASE or DEFINE DATABASE statement, and a
    user specifies 30 seconds with the SQL SET TRANSACTION WAIT 30
    statement or sets the logical name RDM$BIND_LOCK_TIMEOUT_INTERVAL
    to 30, RDO would still use the interval of 25 specified with the
    LOCK TIMEOUT INTERVAL clause.

2.5  –  storage-area-options

  (B)0storage-area-options =

  qwwqqqqqqqqqqqqqqqqqqqqqqqqqqq>qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwwq>
   xtqq> ALLOCATION IS qqq> number-pages qqqq>qqqqqqqqq PAGES qqqqux
   xtqq> PAGE SIZE IS qqqq> page-blocks qqqqq>qqqqqqqqq BLOCKS qqqux
   xtqq> PAGE FORMAT IS qqwqqqq> UNIFORM qqqqwqqqqqqqqqqqqqqqqqqqqux
   xx                     mqqqq> MIXED qqqqqqj                    xx
   xtqq> THRESHOLDS ARE q> ( q> val1 wqqqqqqqqqqqqqqqqqqqqwq> ) qqux
   xx                                m> ,val2 wqqqqqqqqqwqj       xx
   xx                                         m> ,val3 qj         xx
   xtqq> INTERVAL IS qqqqqqq> number-data-pages qqqqqqqqqqqqqqqqqqux
   xtqq> SNAPSHOT_FILENAME IS qqqq> file-spec qqqqqqqqqqqqqqqqqqqqux
   xtqq> SNAPSHOT ALLOCATION IS qqq> snp-pages qqq> PAGES qqqqqqqqux
   xtwq> SNAPSHOT EXTENT IS qwqqwq> extent-pages qqqq> PAGES qwqqqux
   xxmq> EXTENT IS qqqqqqqqqqj  mq> extension-options qqqqqqqqj   xx
   xmqq> WRITE_ONCE qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjx
   mqqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

2.5.1  –  number-pages

    The number of database pages allocated to the database initially.
    Oracle Rdb automatically extends the allocation to handle the
    loading of data and subsequent expansion. The default is 400
    pages.

2.5.2  –  page-blocks

    The size in blocks of each database page. Page size is allocated
    in 512-byte blocks. The default is two blocks (1024 bytes). If
    your largest record is larger than approximately 950 bytes,
    allocate more blocks per page to prevent records from being
    fragmented.

2.5.3  –  PAGE_FORMAT

    Specifies whether a storage area contains uniform or mixed pages.
    You can use the PAGE FORMAT option with multifile databases
    only. In storage areas with uniform page format, all pages in
    a specific logical area contain records from the same relation.
    In storage areas with mixed page format, pages can hold records
    from different relations. The default is UNIFORM.

2.5.4  –  THRESHOLDS

    Specifies one, two, or three threshold values. The threshold
    values represent a fullness percentage on a data page and
    establish four possible ranges of guaranteed free space on the
    data pages. When a data page reaches the percentage defined by
    a given threshold value, the SPAM entry for the data page is
    updated to reflect the new fullness percentage and its remaining
    free space.

    The default thresholds are 70, 85, and 95 percent. When
    THRESHOLDS ARE is used, the first threshold value is required.
    If you specify only one or two values, unspecified values default
    to 100 percent. You can specify the THRESHOLDS option only on a
    storage area for a multifile database. Threshold values can be
    set for storage areas with MIXED or UNIFORM storage area page
    formats.

2.5.5  –  number-data-pages

    Specifies the number of data pages between SPAM pages in the
    physical storage area file, and thus the maximum of data pages
    each SPAM page will manage. The default, and also the minimum
    interval, is 256 data pages. The first page of each storage
    area is a SPAM page. The interval you specify determines where
    subsequent SPAM pages are to be inserted, provided there are
    enough data pages in the storage file to require more SPAM pages.

    You can specify the INTERVAL option only on a storage area for a
    multifile database. The storage area page format must be MIXED.

2.5.6  –  file-spec

    Provides a separate file specification for the snapshot file.
    Do not specify a file extension other than SNP to the file
    specification. You cannot specify a global default for the
    SNAPSHOT_FILENAME. Thus, in a multifile database, the SNAPSHOT_
    FILENAME option must be within a DEFINE STORAGE AREA definition.

    The SNAPSHOT_FILENAME option cannot be specified for a single-
    file database.

2.5.7  –  snp-pages

    Specifies the number of pages allocated for the snapshot file.
    The default is 100 pages.

2.5.8  –  extent-pages

    Specifies the number of pages of each extent. The default is 100
    pages.

2.5.9  –  extension-options

    Specifies the MIN, MAX, and percent growth of each database file
    extent. Enclose the parameter list in parentheses.

  (B)0extension-options =

  qqq>  (   qqq>  MINIMUM OF qq> min-pages qqq> PAGES, qk
               lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
               mqq> MAXIMUM OF qq> max-pages qq> PAGES,qk
               lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
               mqq> PERCENT GROWTH IS qqq> growth qqqq>   )  qqq>

2.5.9.1  –  min-pages

    Specifies the minimum number of pages of each extent. The default
    is 99 pages.

2.5.9.2  –  max-pages

    Specifies the maximum number of pages of each extent. The default
    is 9,999 pages.

2.5.9.3  –  growth

    Specifies the percent growth of each extent. The default is 20
    percent growth.

2.5.10  –  WRITE_ONCE

    You can use the WRITE_ONCE option to change a storage area
    containing stable segmented string data to a format that can
    be stored on a write-once, read-many (WORM) optical disk. A WORM
    optical disk offers a relatively inexpensive way of storing large
    amounts of data for read-only access compared to other storage
    media.

    The following restrictions apply to the WRITE_ONCE option:

    o  Note that you cannot write data other than segmented strings
       to a write-once storage area. Oracle Rdb issues an error message
       if you try to create a storage map that stores data other than
       segmented strings in a write-once storage area. Storage maps
       for non-segmented-string data must be removed before you can
       alter a storage area to WRITE_ONCE.

    o  When you create a storage area on WORM media, you must specify
       that the snapshot area remains on read/write media: do not
       give a snapshot file the WRITE_ONCE attribute.

    o  If you specify the WRITE_ONCE option when storing a segmented
       string, database keys are not compressed. For more information
       on database key compression, see the Oracle Rdb Guide to Database
       Maintenance.

    o  Write-once storage areas do not use SPAM pages to look for
       storage space, but to assist moving data back to non-WORM
       media in which SPAM pages must be built again, space is still
       allocated for them. Since SPAM pages are essential in uniform
       areas, Write-once storage areas cannot be of uniform format
       and therefore are required to be of mixed format.

    o  You can use the PAGE SIZE IS clause of CREATE STORAGE AREA to
       change the default page size for a storage area. You should
       specify an even number of blocks per page. The smallest amount
       of space used in a write operation to WORM media is 1024 bytes
       (2 blocks). Therefore, by specifying an even number of blocks
       per page, you minimize the space wasted when writing segmented
       strings to WORM media.

    o  Rdb does not support magnetic media for storing write-once
       storage areas.

    o  After you move a storage area to or from a WORM device,
       Do a full and complete backup of your database with the
       RMU/BACKUP command and start a new after-image journaling
       file. For more information on backup and recovery procedures
       with write-once storage areas, see the Oracle Rdb Guide to
       Database Maintenance.

2.6  –  define-storage-area-clause

  (B)0define-storage-area-clause =

  qqqq> DEFINE STORAGE AREA qqwqqqq> storage-area-name qqqqwqqqqqqk
                              mqqqq> RDB$SYSTEM qqqqqqqqqqqj      x
  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
  mqqqqq> FILENAME qqqqq> file-spec qqwqqqqqqqqqqqq>qqqqqqqqqqqqqwqqqk
                                      mq> storage-area-options qqj   x
  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
  mqqqqq> END qqqqqqqwqqqqqqqqqq>qqqqqqqqqqqwq> STORAGE AREA qqqq>
                     tq> storage-area-name qu
                     mq> RDB$SYSTEM qqqqqqqqj

2.6.1  –  storage-area-name

    The name of the storage area you want to create.

2.6.2  –  file-spec

    The storage area file that is associated with the named storage
    area. If you use a simple file name, Oracle Rdb creates the storage
    area file in the current default directory. Use a name that is
    unique among all storage area files defined for the database.

2.6.3  –  RDB$SYSTEM

    The default storage area. If you directly specify RDB$SYSTEM
    in the DEFINE STORAGE AREA clause, you can override the default
    characteristics for the main storage area.

2.6.4  –  storage-area-options

    Ask for HELP on "DEFINE_DATABASE Format storage-area-options" for
    information on storage area options.

2.7  –  SEGMENTED_STRING

    The name of the storage area that will hold all segmented
    strings. For a single file database or multifile database, if you
    do not explicitly define a storage area for segmented strings,
    segmented strings will be stored in the default storage area,
    RDB$SYSTEM. If your database is a single-file database and you
    specify a storage area other than RDB$SYSTEM, you receive an
    error message because RDB$SYSTEM is the only storage area in a
    single-file database.

    The page format for the segmented string storage area can
    be UNIFORM or MIXED. However, Rdb recommends that if you
    store segmented strings in a MIXED storage area, that area
    contain only segmented strings.

3  –  Examples

    Example 1

    Use the default DEFINE DATABASE statement. If you specify the
    DICTIONARY IS NOT USED clause, the data dictionary will not be
    used to store the database definition and definitions of database
    elements.

    RDO> DEFINE DATABASE 'PERSONNEL'
    cont> DICTIONARY IS NOT USED.

    Example 2

    Use DEFINE DATABASE with qualifiers:

    RDO> DEFINE DATABASE 'PERSONNEL'
    cont> NUMBER OF BUFFERS IS 10
    cont> BUFFER SIZE IS 10 BLOCKS
    cont> DICTIONARY IS NOT USED.

    This statement performs the following actions:

    o  Names the database.

    o  Specifies a number of buffers, and the length of each buffer.

    o  Commits the database definition implicitly.

    o  Specifies that the data dictionary will not be used to store
       the database definition and definitions of database elements.

    o  Invokes the database, using the file name as the database
       handle.

    Example 3

    The scope of each record's database key is set to FINISH during
    the RDO session of the user who entered DEFINE DATABASE:

    RDO>   DEFINE DATABASE DISK2:[USER.DBS]PERS2
    cont>    DBKEY SCOPE IS FINISH.

    Note that this command does NOT set a "default" DBKEY SCOPE
    characteristic for the database. For each user, the default is
    COMMIT unless that user specifies INVOKE DATABASE...DBKEY SCOPE
    FINISH.

    Example 4

    The upper limit on the number of nodes from which users can
    access the common, cluster-wide database is set to 8:

    RDO> DEFINE DATABASE ACCTING NUMBER CLUSTER NODES IS 8
    cont> DICTIONARY IS NOT USED.

    If you attempt to access the shared database from a node and,
    in doing so, exceed the maximum nodes parameter, an error is
    signaled to your RDO session or program.

    The DICTIONARY IS NOT USED clause specifies that the data
    dictionary will not be used to store the database definition
    and definitions of database elements.

    Example 5

    The following RDO command procedure defines a multifile database
    called MULTI_PERS. The example:

    o  Defines database wide characteristics

    o  Defines global storage area defaults

    o  Specifies local attributes for RDB$SYSTEM, the default storage
       area

    o  Defines a storage area for segmented strings

    o  Defines other storage areas

    DEFINE DATABASE 'DB_DISK:MULTI_PERS'
      ! Define database-wide characteristics
         DESCRIPTION IS /* Sample multifile definition */
         NUMBER OF USERS IS 60
         NUMBER OF CLUSTER NODES IS 22
         NUMBER OF RECOVERY BUFFERS IS 200
         DICTIONARY IS NOT USED
      ! Define global storage area characteristics
         ALLOCATION IS 500 PAGES
         PAGE FORMAT IS MIXED
      ! Specify local attributes for the default storage area
      ! Override the global default of MIXED page format
         DEFINE STORAGE AREA RDB$SYSTEM
           FILENAME 'DISK1:PERS_DEFAULT'
           PAGE FORMAT IS UNIFORM
           ALLOCATION IS 300 PAGES
           SNAPSHOT_FILENAME IS 'DISK2:PERS_DEFAULT'
         END RDB$SYSTEM STORAGE AREA
      ! Define storage area for segmented strings
         DEFINE STORAGE AREA PERS_SEGSTR
           FILENAME 'DISK1:PERS_SEGSTR'
           PAGE FORMAT IS UNIFORM
         END PERS_SEGSTR STORAGE AREA
         SEGMENTED STRING STORAGE AREA IS PERS_SEGSTR
      ! Definition of some sample storage areas
         DEFINE STORAGE AREA CANDIDATES
           FILENAME 'DISK3:CANDIDATES'
           PAGE FORMAT IS UNIFORM
           SNAPSHOT_FILENAME IS 'DISK4:CANDIDATES'
         END CANDIDATES STORAGE AREA
         DEFINE STORAGE AREA EMPIDS_LOW
           FILENAME 'DISK5:EMPIDS_LOW'
           SNAPSHOT_FILENAME IS 'DISK6:EMPIDS_LOW'
         END EMPIDS_LOW STORAGE AREA
         DEFINE STORAGE AREA EMPIDS_MID
           FILENAME 'DISK7:EMPIDS_MID'
           SNAPSHOT_FILENAME IS 'DISK8:EMPIDS_MID'
         END EMPIDS_MID STORAGE AREA.
Close Help