VMS Help  —  RMU72  Copy Database
    Permits you to copy a database.

1  –  Description

    The RMU Copy_Database command allows you to modify certain area
    parameters when the copy operation is performed. All the files
    are processed simultaneously during the copy operation. The copy
    operation's performance is similar to that of the RMU Backup
    command. The RMU Copy_Database command eliminates the need for
    intermediate storage media.

                                   NOTE

       You must perform a full and complete Oracle RMU backup
       operation immediately after the Copy_Database operation
       completes to ensure that the database can be properly
       restored after a database failure or corruption.

       Also note that if you do not specify either the After_
       Journal qualifier or the Aij_Options qualifier when you
       issue the RMU Copy_Database command, after-image journaling
       is disabled for the database copy and no .aij files are
       associated with the database copy.

2  –  Format

  (B)0RMU/Copy_Database root-file-spec [storage-area-list]

  Command Qualifiers                       x  Defaults
                                           x
  /[No]After_Journal[=file-spec]           x  See description
  /[No]Aij_Options=journal-opts-file       x  See description
  /[No]Cdd_Integrate                       x  Nocdd_Integrate
  /[No]Checksum_Verification               x  /Checksum_Verification
  /Close_Wait=n                            x  See description
  /Directory=directory-spec                x  None
  /[No]Duplicate                           x  /Noduplicate
  /Global_Buffers=global-buffer-options    x  Current value
  /Local_Buffers=local-buffer-options      x  Current value
  /Lock_Timeout=n                          x  See description
  /[No]Log                                 x  Current DCL verify value
  /Nodes_Max=n                             x  Current value
  /[No]Online                              x  /Noonline
  /Open_Mode={Automatic|Manual}            x  Current value
  /Option=file-spec                        x  None

  (B)0/Page_Buffers=n                          x n=33
  /Path=cdd-path                           x Existing value
  /[No]Quiet_Point                         x /Quiet_Point
  /Root=file-spec                          x None
  /Transaction_Mode=(mode-list)            x /Transaction_Mode=Current
  /Threads=n                               x /Threads=10
  /Users_Max=n                             x Current value

  File or Area Qualifier                   x Defaults
                                           x
  /Blocks_Per_Page=n                       x None
  /Extension={Disable | Enable }           x Current value
  /File=file-spec                          x None
  /Read_Only                               x Current value
  /Read_Write                              x Current value
  /Snapshots=(Allocation=n,File=file-spec) x None
  /[No]Spams                               x Current value
  /Thresholds=(n,n,n)                      x None

3  –  Parameters

3.1  –  root-file-spec

    The name of the database root file for the database you want to
    copy.

3.2  –  storage-area-list

    The name of one or more storage areas whose parameters you are
    changing. The storage-area-list parameter is optional. Unless you
    are using the RMU Copy_Database command to modify the parameters
    of one or more storage areas, you should not specify any storage
    area names.

4  –  Command Qualifiers

4.1  –  After Journal

    After_Journal[=file-spec]
    Noafter_Journal

                                   NOTE

       This qualifier is maintained for compatibility with versions
       of Oracle Rdb prior to Version 6.0. You might find it more
       useful to specify the Aij_Options qualifier, unless you are
       interested in creating an extensible .aij file only.

    Specifies how Oracle RMU is to handle after-image journaling and
    .aij file creation, using the following rules:

    o  If you specify the After_Journal qualifier and provide a file
       specification, Oracle RMU enables journaling and creates a new
       extensible after-image journal (.aij) file for the database
       copy.

    o  If you specify the After_Journal qualifier but you do not
       provide a file specification, Oracle RMU enables after-image
       journaling and creates a new extensible .aij file for the
       database copy with the same name as, but a different version
       number from, the .aij file for the database being copied.

    o  If you specify the Noafter_Journal qualifier, Oracle RMU
       disables after-image journaling and does not create a new
       .aij file.

    o  If you do not specify an After_Journal, Noafter_Journal,
       Aij_Options, or Noaij_Options qualifier, Oracle RMU disables
       after-image journaling and does not create a new .aij file.

    You can specify only one, or none, of the following after-image
    journal qualifiers in a single RMU Copy_Database command: After_
    Journal, Noafter_Journal, Aij_Options, or Noaij_Options.

    You cannot use the After_Journal qualifier to create fixed-size
    .aij files; use the Aij_Options qualifier.

4.2  –  Aij Options

    Aij_Options=journal-opts-file
    Noaij_Options

    Specifies how Oracle RMU is to handle after-image journaling and
    .aij file creation, using the following rules:

    o  If you specify the Aij_Options qualifier and provide a
       journal-opts-file, Oracle RMU enables journaling and creates
       the .aij file or files you specify for the database copy.
       If only one .aij file is created for the database copy, it
       will be an extensible .aij file. If two or more .aij files
       are created for the database copy, they will be fixed-size
       .aij files (as long as at least two .aij files are always
       available).

    o  If you specify the Aij_Options qualifier, but do not provide a
       journal-opts-file, Oracle RMU disables journaling and does not
       create any new .aij files.

    o  If you specify the Noaij_Options qualifier, Oracle RMU
       disables journaling and does not create any new .aij files.

    o  If you do not specify an After_Journal, Noafter_Journal,
       Aij_Options, or Noaij_Options qualifier, Oracle RMU disables
       after-image journaling and does not create a new .aij file.

    You can only specify one, or none, of the following after-image
    journal qualifiers in a single Oracle RMU command: After_Journal,
    Noafter_Journal, Aij_Options, Noaij_Options.

    See Show After_Journal for information on the format of a
    journal-opts-file.

4.3  –  Cdd Integrate

    Cdd_Integrate
    Nocdd_Integrate

    Integrates the metadata from the root (.rdb) file of the database
    copy into the data dictionary (assuming the data dictionary is
    installed on your system).

    If you specify the Nocdd_Integrate qualifier, no integration
    occurs during the copy operation.

    You might want to delay integration of the database metadata
    with the data dictionary until after the copy operation finishes
    successfully.

    You can use the Nocdd_Integrate qualifier even if the DICTIONARY
    IS REQUIRED clause was used when the database being copied was
    defined.

    The Cdd_Integrate qualifier integrates definitions in one
    direction only-from the database file to the dictionary. The
    Cdd_Integrate qualifier does not integrate definitions from the
    dictionary to the database file.

    The Nocdd_Integrate qualifier is the default.

4.4  –  Checksum Verification

    Checksum_Verification
    Nochecksum_Verification

    Requests that the page checksum be verified for each page copied.
    The default is to perform this verification.

    The Checksum_Verification qualifier uses significant CPU
    resources but can provide an extra measure of confidence in the
    quality of the data being copied. For offline copy operations,
    the additional CPU cost of using the Checksum_Verification
    qualifier might not be justified unless you are experiencing
    or have experienced disk, HSC, or CI port hardware problems. One
    symptom of these problems is pages being logged to the corrupt
    page table (CPT).

    For online copy operations, use of the Checksum_Verification
    qualifier offers an additional level of data security when the
    database employs disk striping or RAID (redundant arrays of
    inexpensive disks) technology. These technologies fragment data
    over several disk drives, and use of the Checksum_Verification
    qualifier permits Oracle RMU to detect the possibility that
    the data it is reading from these disks has been only partially
    updated. If you use either of these technologies, you should use
    the Checksum_Verification qualifier.

    Note, however, that if you specify the Nochecksum qualifier, and
    undetected corruptions exist in your database, the corruptions
    are included in the copied file. Such a corruption might be
    difficult to recover from, especially if it is not detected until
    weeks or months after the copy operation is performed.

    Overall, Oracle Corporation recommends that you use the Checksum_
    Verification qualifier with all copy operations where integrity
    of the data is essential.

4.5  –  Close Wait=n

    Specifies a wait time of n minutes before Oracle RMU
    automatically closes the database. You must supply a value for
    n.

    In order to use this qualifier, the Open_Mode qualifier on the
    RMU Copy_Database command line must be set to Automatic.

4.6  –  Directory

    Directory=directory-spec

    Specifies the default destination for the copied database files.
    Note that if you specify a file name or file extension, all
    copied files are given that file name or file extension. There
    is no default directory specification for this qualifier.

    See the Usage Notes for information on how this qualifier
    interacts with the Root, File, and Snapshot qualifiers and for
    warnings regarding copying database files into a directory owned
    by a resource identifier.

    If you do not specify this qualifier, Oracle RMU attempts to copy
    all the database files (unless they are qualified with the Root,
    File, or Snapshot qualifier) to their current location.

4.7  –  Duplicate

    Duplicate
    Noduplicate

    Causes the RMU Copy_Database command to generate a new database
    with the same content, but with a different identity from that
    of the original database. For this reason, .aij files cannot be
    interchanged between the original and the duplicate database.
    This qualifier creates copies of your databases that are expected
    to evolve independently in time. In this case, being able to
    exchange .aij files might be a security breach, and a likely
    source of corruption.

    A duplicate database has the same contents as the original
    database, but not the same identity. A database copied with
    the Noduplicate qualifier is an exact replica of the original
    database in every way and, therefore, .aij files can be
    interchanged between the original and duplicate database.

    The default is the Noduplicate qualifier.

4.8  –  Global Buffers

    Global_Buffers=global-buffer-options

    Allows you to change the default global buffer parameters when
    you copy a database. The following options are available:

    o  Disabled

       Use this option to disable global buffering for the copy of
       the original database.

    o  Enabled

       Use this option to enable global buffering for the copy of the
       original database. You cannot specify both the Disabled and
       Enabled option in the same RMU Copy_Database command with the
       Global_Buffers qualifier.

    o  Total=total-buffers

       Use this option to specify the number of buffers available for
       all users.

    o  User_Limit=buffers-per-user

       Use this option to specify the maximum number of buffers
       available to each user.

    If you do not specify a global buffers option, the database is
    copied with the values that are in effect for the database you
    are copying.

    When you specify two or more options with the Global_Buffers
    qualifier, use a comma to separate each option and enclose the
    list of options in parentheses.

4.9  –  Local Buffers

    Local_Buffers=local-buffer-options

    Allows you to change the default local buffer parameters when you
    copy a database. The following options are available:

    o  Number=number-buffers

       Use this option to specify the number of local buffers that
       will be available for all users. You must specify a number
       between 2 and 32,767 for the number-buffers parameter.

    o  Size=buffer-blocks

       Use this option to specify the size (specified in blocks) for
       each buffer. You must specify a number between 2 and 64 for
       the buffer-blocks parameter.

       If you specify a value smaller than the size of the largest
       page defined, Oracle RMU automatically adjusts the size of
       the buffer to hold the largest page defined. For example, if
       you specify the Local_Buffers=Size=8 qualifier and the largest
       page size for the storage areas in your database is 64 blocks,
       Oracle RMU automatically interprets the Local_Buffers=Size=8
       qualifier as though it were a Local_Buffers=Size=64 qualifier.

       Take great care when selecting a buffer size; a poor choice
       causes performance to suffer greatly.

       The value specified for the buffer-blocks parameter determines
       the number of blocks for each buffer, regardless of whether
       local buffering or global buffering is enabled for the
       database.

    If you do not specify a Local_Buffers option, the database is
    copied with the values that are in effect for the database you
    are copying.

4.10  –  Lock Timeout

    Lock_Timeout=n

    Specifies a timeout interval or maximum time in seconds to
    wait for the quiet-point lock and any other locks needed when
    the operation is performed online. When you specify the Lock_
    Timeout=seconds qualifier, you must specify the number of seconds
    to wait for the quiet-point lock. If the time limit expires, an
    error is signaled and the copy operation fails.

    When the Lock_Timeout=seconds qualifier is not specified, the
    copy operation waits indefinitely for the quiet-point lock and
    any other locks needed during an online copy operation.

    The Lock_Timeout=seconds qualifier is ignored for offline copy
    operations.

4.11  –  Log

    Log
    Nolog

    Specifies whether the processing of the command is reported to
    SYS$OUTPUT. Specify the Log qualifier to request log output and
    the Nolog qualifier to prevent it. If you specify neither, the
    default is the current setting of the DCL verify switch. (The DCL
    SET VERIFY command controls the DCL verify switch.)

4.12  –  Nodes Max

    Nodes_Max=n

    Specifies a new value for the database maximum node count
    parameter for the database copy. The default is to leave the
    value unchanged.

4.13  –  Online

    Online
    Noonline

    Specifies that the copy database operation be performed while
    other users are attached to the database. The areas to be copied
    are locked for read-only access, so the operation is compatible
    with all but exclusive access.

    The default is the Noonline qualifier.

4.14  –  Open Mode

    Open_Mode=Automatic
    Open_Mode=Manual

    Allows you to change the mode for opening a database when
    you copy a database. When you specify the Open_Mode=Automatic
    qualifier, users can invoke the database copy immediately after
    it is copied. If you specify the Open_Mode=Manual qualifier, an
    RMU Open command must be used to open the database before users
    can invoke the database copy.

    The Open_Mode qualifier also specifies the mode for closing a
    database. If you specify Open_Mode=Automatic, you can also use
    the Close_Wait qualifier to specify a time in minutes before the
    database is automatically closed.

    If you do not specify the Open_Mode qualifier, the database is
    copied with the open mode that is in effect for the database
    being copied.

4.15  –  Option

    Option=file-spec

    Specifies an options file containing storage area names, followed
    by the storage area qualifiers that you want applied to that
    storage area. Do not separate the storage area names with
    commas. Instead, put each storage area name on a separate line
    in the file. The storage area qualifiers that you can include
    in the options file are: Blocks_Per_Page, File, Snapshots, and
    Thresholds.

    You can use the DCL line continuation character, a hyphen (-),
    or the comment character (!)  in the options file. There is no
    default for this qualifier. Example 6 in the Examples entry under
    this command shows an options file and how to specify it on the
    Oracle RMU command line.

    If the Option qualifier is specified, the storage-area-list
    parameter is ignored.

4.16  –  Page Buffers

    Page_Buffers=n

    Specifies the number of buffers to be allocated for each database
    file to be copied. The number of buffers used is twice the
    number specified; half are used for reading the file and half
    for writing the copy. Values specified with the Page_Buffers
    qualifier can range from 1 to 5. The default value is 3. Larger
    values might improve performance, but they increase memory use.

4.17  –  Path

    Path=cdd-path

    Specifies a data dictionary path into which the definitions of
    the database copy will be integrated. If you do not specify the
    Path qualifier, Oracle RMU uses the CDD$DEFAULT logical name
    value of the user who enters the RMU Copy_Database command.

    If you specify a relative path name, Oracle Rdb appends the
    relative path name you enter to the CDD$DEFAULT value. If the
    cdd-path parameter contains nonalphanumeric characters, you must
    enclose it within quotation marks ("").

    Oracle Rdb ignores the Path qualifier if you use the Nocdd_
    Integrate qualifier or if the data dictionary is not installed
    on your system.

4.18  –  Quiet Point

    Quiet_Point
    Noquiet_Point

    Allows you to specify that a database copy operation is to occur
    either immediately or when a quiet point for database activity
    occurs. A quiet point is defined as a point where no active
    update transactions are in progress in the database.

    When you specify the Noquiet_Point qualifier, Oracle RMU proceeds
    with the copy operation as soon as the RMU Copy_Database command
    is issued, regardless of any update transaction activity in
    progress in the database. Because Oracle RMU must acquire
    concurrent-read locks on all physical and logical areas, the
    copy operation fails if there are any active transactions with
    exclusive locks on a storage area. However, once Oracle RMU has
    successfully acquired all concurrent-read storage area locks, it
    should not encounter any further lock conflicts. If a transaction
    that causes Oracle Rdb to request exclusive locks is started
    while the copy operation is proceeding, that transaction either
    waits or gets a lock conflict error, but the copy operation
    continues unaffected.

    If you intend to use the Noquiet_Point qualifier with a copy
    procedure that previously specified the Quiet_Point qualifier
    (or did not specify either the Quiet_Point or Noquiet_Point
    qualifier), you should examine any applications that execute
    concurrently with the copy operation. You might need to modify
    your applications or your copy procedure to handle the lock
    conflicts that can occur when you specify the Noquiet_Point
    qualifier.

    When you specify the Quiet_Point qualifier, the copy operation
    begins when a quiet point is reached. Other update transactions
    issued after the database copy operation begins are prevented
    from executing until after the root file for the database has
    been copied (copying of the database storage areas begins after
    the root file is copied).

    The default is the Quiet_Point qualifier.

4.19  –  Root

    Root=file-spec

    Requests that the database root file be copied to the specified
    location.

    See the Usage Notes for information on how this qualifier
    interacts with the Directory, File, and Snapshot qualifiers.

4.20  –  Transaction Mode=(mode-list)

    Transaction_Mode=(mode-list)

    Sets the allowable transaction modes for the database root file
    created by the copy operation. The mode-list can include one or
    more of the following transaction modes:

    o  All - Enables all transaction modes

    o  Current - Enables all transaction modes that are set for the
       source database. This is the default transaction mode.

    o  None - Disables all transaction modes

    o  [No]Batch_Update

    o  [No]Exclusive

    o  [No]Exclusive_Read

    o  [No]Exclusive_Write

    o  [No]Protected

    o  [No]Protected_Read

    o  [No]Protected_Write

    o  [No]Read_Only

    o  [No]Read_Write

    o  [No]Shared

    o  [No]Shared_Read

    o  [No]Shared_Write

    Your copy operation must include the database root file.
    Otherwise, RMU returns the CONFLSWIT error when you issue an
    RMU Copy_Database command with the Transaction_Mode qualifier.

    If you specify more than one transaction mode in the mode-list,
    enclose the list in parenthesis and separate the transaction
    modes from one another with a comma. Note the following:

    o  When you specify a negated transaction mode such as
        Noexclusive_Write, it indicates that exclusive write is not
       an allowable access mode for the copied database.

    o  If you specify the Shared, Exclusive, or Protected transaction
       mode, Oracle RMU assumes you are referring to both reading and
       writing in that transaction mode.

    o  No mode is enabled unless you add that mode to the list, or
       you use the All option to enable all transaction modes.

    o  You can list one transaction mode that enables or disables a
       particular mode followed by another that does the opposite.
       For example, Transaction_Mode=(Noshared_Write, Shared) is
       ambiguous because the first value disables Shared_Write access
       and the second value enables Shared_Write access. Oracle
       RMU resolves the ambiguity by first enabling the modes as
       specified in the modes-list and then disabling the modes as
       specified in the modes-list. The order of items in the list is
       irrelevant. In the example presented previously, Shared_Read
       is enabled and Shared_Write is disabled.

4.21  –  Threads=number

    Threads=number

    Specifies the number of reader threads to be used by the copy
    process.

    RMU creates so called internal 'threads' of execution to read
    data from one specific storage area. Threads run quasi-parallel
    within the process executing the RMU image. Each thread generates
    its own I/O load and consumes resources like virtual address
    space and process quotas (e.g. FILLM, BYTLM). The more threads,
    the more I/Os can be generated at one point in time and the more
    resources are needed to accomplish the same task.

    Performance increases with more threads due to parallel
    activities which keeps disk drives busier. However, at a certain
    number of threads, performance suffers because the disk I/O
    subsystem is saturated and I/O queues build up for the disk
    drives. Also the extra CPU time for additional thread scheduling
    overhead reduces the overall performance. Typically 2-5 threads
    per input disk drive are sufficient to drive the disk I/O
    susbsystem at its optimum. However, some controllers may be
    able to handle the I/O load of more threads, for example disk
    controllers with RAID sets and extra cache memory.

    In a copy operation, one thread moves the data of one storage
    area at a time. If there are more storage areas to be copied than
    there are threads, then the next idle thread takes on the next
    storage area. Storage areas are copied in order of the area size
    - largest areas first. This optimizes the overall elapsed time
    by allowing other threads to copy smaller areas while an earlier
    thread is still working on a large area. If no threads qualifier
    is specified, then 10 threads are created by default. The minimum
    is 1 thread and the maximum is the number of storage areas to be
    copied. If the user specifies a value larger than the number of
    storage areas, then RMU silently limits the number of threads to
    the number of storage areas.

    For a copy operation, you can specify a threads number as low as
    1. Using a threads number of 1 generates the smallest system
    load in terms of working set usage and disk I/O load. Disk
    I/O subsystems most likely can handle higher I/O loads. Using
    a slightly larger value than 1 typically results in faster
    execution time.

4.22  –  Users Max

    Users_Max=n

    Specifies a new value for the database maximum user count
    parameter.

    The default is to use the same value as is in effect for the
    database being copied.

4.23  –  Blocks Per Page

    Blocks_Per_Page=n

    Specifies a new page size for the storage area to which it is
    applied. You cannot decrease the page size of a storage area, and
    you cannot change the size of a storage area with a uniform page
    format.

    You might want to increase the page size in storage areas
    containing hash indexes that are close to full. By increasing
    the page size in such a situation, you prevent the storage area
    from extending.

    The Blocks_Per_Page qualifier is a positional qualifier.

4.24  –  Extension

    Extension=Disable
    Extension=Enable

    Allows you to change the automatic file extension attribute for a
    storage area when you copy a database.

    Use the Extension=Disable qualifier to disable automatic file
    extensions for a storage area.

    Use the Extension=Enable qualifier to enable automatic file
    extensions for a storage area.

    If you do not specify the Extension=Disable or the
    Extension=Enable qualifier, the storage areas are copied with
    the automatic file extension attributes that are in effect for
    the database being copied.

    The Extension qualifier is a positional qualifier.

4.25  –  File

    File=file-spec

    Requests that the storage area to which this qualifier is applied
    be copied to the specified location.

    See the Usage Notes for information on how this qualifier
    interacts with the Root, Snapshot, and Directory qualifiers and
    for warnings regarding copying database files into a directory
    owned by a resource identifier.

    The File qualifier is a positional qualifier. This qualifier is
    not valid for single-file databases.

4.26  –  Read Only

    Use the Read_Only qualifier to change a read/write storage area
    or a write-once storage area to a read-only storage area.

    If you do not specify the Read_Only or Read_Write qualifier, the
    storage areas are copied with the read/write attributes that are
    currently in effect for the database being copied.

    This is a positional qualifier.

4.27  –  Read Write

    Use the Read_Write qualifier to change a read-only storage area
    or a write-once storage area to a read/write storage area.

    If you do not specify the Read_Only or Read_Write qualifier, the
    storage areas are copied with the read/write attributes that are
    currently in effect for the database being copied.

    This is a positional qualifier.

4.28  –  Snapshots

    Snapshots=(Allocation=n,File=file-spec)

    If you specify the Allocation parameter, specifies the snapshot
    file allocation size in n pages for a copied area. If you specify
    the File parameter, specifies a new snapshot file location for
    the copied storage area to which it is applied.

    You can specify the Allocation parameter only, the File parameter
    only, or both parameters; however, if you specify the Snapshots
    qualifier, you must specify at least one parameter.

    The Snapshots qualifier is a positional qualifier.

    See the Usage Notes for information on how this qualifier
    interacts with the Root, File, and Directory qualifiers.

4.29  –  Spams

    Spams
    Nospams

    Specifies whether to enable the creation of space area management
    (SPAM) pages or disable the creation of SPAM pages (Nospams) for
    specified storage areas. This qualifier is not permitted with a
    storage area that has a uniform page format.

    When SPAM pages are disabled in a read/write storage area, the
    SPAM pages are initialized but they are not updated.

    The Spams qualifier is a positional qualifier.

4.30  –  Thresholds

    Thresholds=(n,n,n)

    Specifies new SPAM thresholds for the storage area to which it is
    applied (for a mixed page format storage area). The thresholds of
    a storage area with a uniform page format cannot be changed.

    See the Oracle Rdb7 Guide to Database Performance and Tuning for
    information on setting SPAM thresholds.

    The Thresholds qualifier is a positional qualifier.

5  –  Usage Notes

    o  To use the RMU Copy_Database command for a database, you must
       have the RMU$COPY privilege in the root file access control
       list (ACL) for the database to be copied or the OpenVMS SYSPRV
       or BYPASS privilege.

    o  When you copy a database into a directory owned by a resource
       identifier, the ACE for the directory is applied to the
       database root file ACL first, and then the Oracle RMU ACE is
       added. This method is employed to prevent database users from
       overriding OpenVMS file security. However, this can result in
       a database which you consider yours, but to which you have no
       Oracle RMU privileges to access. See the Oracle Rdb Guide to
       Database Maintenance for details.

    o  The RMU Copy_Database command provides four qualifiers,
       Directory, Root, File, and Snapshots, that allow you to
       specify the target for the copied files. The target can be
       just a directory, just a file name, or a directory and file
       name.

       If you use all or some of these four qualifiers, apply them as
       follows:

       -  Use the Root qualifier to indicate the target for the copy
          of database root file.

       -  Use local application of the File qualifier to specify the
          target for the copy of one or more storage areas.

       -  Use local application of the Snapshots qualifier to specify
          the target for the copy of one or more snapshot files.

       -  Use the Directory qualifier to specify a default target
          directory. The default target directory is the directory
          to which all files not qualified with the Root, File,
          or Snapshot qualifier are copied. It is also the default
          directory for files qualified with the Root, File, or
          Snapshot qualifier if the target for these qualifiers does
          not include a directory specification.

       Note the following when using these qualifiers:

       -  Global application of the File qualifier when the target
          specification includes a file name causes Oracle RMU to
          copy all of the storage areas to different versions of the
          same file name. This creates a database that is difficult
          to manage.

       -  Global application of the Snapshot qualifier when the
          target specification includes a file name causes Oracle
          RMU to copy all of the snapshot files to different versions
          of the same file name. This creates a database that is
          difficult to manage.

       -  Specifying a file name or extension with the Directory
          qualifier is permitted, but causes Oracle RMU to copy
          all of the files (except those specified with the File
          or Root qualifier) to different versions of the same file
          name. Again, this creates a database that is difficult to
          manage.

       See Example 8.

    o  You cannot use the RMU Copy_Database command to copy a
       database to a remote system or to an NFS (Network File System)
       mounted file system. The RMU Copy_Database command allows
       you to create a copy of a database on the same node as the
       original database.

    o  You cannot disable extents of snapshot (.snp) files.

    o  The file and area qualifiers for the RMU Copy_Database command
       are positional qualifiers, and if placed randomly, could
       be ignored or produce unexpected results. See the Command_
       Qualifiers help entry for more information on positional
       qualifiers.

    o  There are no restrictions on the use of the Nospams qualifier
       with mixed page format storage areas, but the use of the
       Nospams qualifier typically causes severe performance
       degradation. The Nospams qualifier is only useful where
       updates are rare and batched, and access is primarily by
       database key (dbkey).

6  –  Examples

    Example 1

    The following command makes a duplicate copy of the mf_personnel
    database in the DISK1:[USER1] directory:

    $ RMU/COPY_DATABASE MF_PERSONNEL /DIRECTORY=DISK1:[USER1]

    Example 2

    The following example shows a simple duplication of a database
    within a user's directory. In this instance, the duplicated
    database has the same content and identity as the original
    database. After-image journal files can be interchanged between
    the original and the duplicated database. Execute the RMU Dump
    command with the header qualifier to verify that the copied
    database is the same as the original database. Note that the
    creation date listed in the header for each database is the same.

    $ RMU/COPY_DATABASE MF_PERSONNEL

    Example 3

    The following example shows a duplication of a database within a
    user's directory through the use of the Duplicate qualifier. In
    this instance, the duplicated database differs from the original
    database. It has the same content as the original database,
    but its identity is different. As a result, .aij files cannot
    be exchanged between the original database and the duplicate
    database. If you use the RMU Dump command with the header
    qualifier for each database, you see that the creation date for
    the copy and the original database is different.

    $ RMU/COPY_DATABASE/DUPLICATE MF_PERSONNEL

    Example 4

    The following command copies the mf_personnel database from
    the DISK2:[USER2] directory to the DISK1:[USER1] directory. The
    Extension=Disable qualifier causes extents to be disabled for all
    the storage area (.rda) files in the DISK1:[USER1]mf_personnel
    database:

    $ RMU/COPY_DATABASE/EXTENSION=DISABLE/DIRECTORY=DISK1:[USER1] -
    _$ DISK2:[USER2]MF_PERSONNEL

    Example 5

    The following command copies the mf_personnel database from the
    DISK2:[USER2] directory to the DISK2:[USER1] directory. Because
    the Extension=Disable qualifier is specified for only the EMPIDS_
    LOW and EMPIDS_MID storage areas, extents are disabled only
    for those two storage area (.rda) files in the DISK2:[USER1]mf_
    personnel database:

    $ RMU/COPY_DATABASE/DIRECTORY=DISK2:[USER1] DISK2:[USER2]MF_PERSONNEL -
    _$ EMPIDS_LOW/EXTENSION=DISABLE,EMPIDS_MID/EXTENSION=DISABLE

    Example 6

    The following command uses an options file to specify that
    the storage area files and snapshot (.snp) files be copied to
    different disks. Note that storage area .snp files are located
    on different disks from one another and from their associated
    storage area (.rda) files; this is recommended for optimal
    performance. (This example assumes that the disks specified for
    each storage area file in options_file.opt are different from
    those where the storage area files currently reside.)

    $ RMU/COPY_DATABASE/OPTIONS=OPTIONS_FILE.OPT MF_PERSONNEL

    The options file appears as:

    $ TYPE OPTIONS_FILE.OPT

    EMPIDS_LOW /FILE=DISK1:[CORPORATE.PERSONNEL]EMPIDS_LOW.RDA -
         /SNAPSHOT=(FILE=DISK2:[CORPORATE.PERSONNEL]EMPIDS_LOW.SNP)

    EMPIDS_MID /FILE=DISK3:[CORPORATE.PERSONNEL]EMPIDS_MID.RDA -
         /SNAPSHOT=(FILE=DISK4:[CORPORATE.PERSONNEL]EMPIDS_MID.SNP)

    EMPIDS_OVER /FILE=DISK5:[CORPORATE.PERSONNEL]EMPIDS_OVER.RDA -
         /SNAPSHOT=(FILE=DISK6:[CORPORATE.PERSONNEL]EMPIDS_OVER.SNP)

    DEPARTMENTS /FILE=DISK7:[CORPORATE.PERSONNEL]DEPARTMENTS.RDA -
         /SNAPSHOT=(FILE=DISK8:[CORPORATE.PERSONNEL]DEPARTMENTS.SNP)

    SALARY_HISTORY /FILE=DISK9:[CORPORATE.PERSONNEL]SALARY_HISTORY.RDA -
         /SNAPSHOT=(FILE=DISK10:[CORPORATE.PERSONNEL]SALARY_HISTORY.SNP)

    JOBS /FILE=DISK7:[CORPORATE.PERSONNEL]JOBS.RDA -
         /SNAPSHOT=(FILE=DISK8:[CORPORATE.PERSONNEL]JOBS.SNP)

    EMP_INFO /FILE=DISK9:[CORPORATE.PERSONNEL]EMP_INFO.RDA -
         /SNAPSHOT=(FILE=DISK10:[CORPORATE.PERSONNEL]EMP_INFO.SNP)

    RESUME_LISTS /FILE=DISK11:[CORPORATE.PERSONNEL]RESUME_LISTS.RDA -
         /SNAPSHOT=(FILE=DISK12:[CORPORATE.PERSONNEL]RESUME_LISTS.SNP)

    RESUMES /FILE=DISK9:[CORPORATE.PERSONNEL]RESUMES.RDA -
         /SNAPSHOT=(FILE=DISK10:[CORPORATE.PERSONNEL]RESUMES.SNP)

    Example 7

    The following example copies the mf_personnel database from one
    directory to another. In addition, by specifying the Aij_Options
    qualifier to add after-image journal files, it enables fixed-size
    journaling in the database copy and sets several of the journal
    options as shown in the aij_journal_options.opt file.

    $ RMU/COPY_DATABASE MF_PERSONNEL/DIRECTORY=DB1:[ROOT] -
    /AIJ_OPTIONS=AIJ_JOURNAL_OPTIONS.OPT

    $ TYPE AIJ_JOURNAL_OPTIONS.OPT

    JOURNAL IS ENABLED      -
    RESERVE 2               -
    ALLOCATION IS 1024      -
    BACKUPS ARE MANUAL      -
    OVERWRITE IS DISABLED   -
    SHUTDOWN_TIMEOUT IS 120 -
    CACHE IS DISABLED

    ADD MF_PERS1 FILE DB2:[AIJONE]MF_PERS1.AIJ
    ADD MF_PERS2 FILE DB3:[AIJTWO]MF_PERS2.AIJ

    Example 8

    The following example demonstrates the use of the Directory,
    File, and Root qualifiers. In this example:

    o  The default directory is specified as DISK2:[DIR].

    o  The target directory and file name for the database root file
       is specified with the Root qualifier. The target directory
       specified with the Root qualifier overrides the default
       directory specified with the Directory qualifier. Thus, Oracle
       RMU copies the database root to DISK3:[ROOT] and names it
       COPYRDB.RDB.

    o  The target directory for the EMPIDS_MID storage area is
       DISK4:[FILE]. Oracle RMU copies EMPIDS_MID to DISK4:[FILE].

    o  The target file name for the EMPIDS_LOW storage area is
       EMPIDS. Thus, Oracle RMU copies the EMPIDS_LOW storage area
       to the DISK2 default directory (specified with the Directory
       qualifier), and names the file EMPIDS.RDA.

    o  The target for the EMPIDS_LOW snapshot file is
       DISK5:[SNAP]EMPIDS.SNP Thus, Oracle RMU copies the EMPIDS_
       LOW snapshot file to DISK5:[SNAP]EMPIDS.SNP.

    o  All the other storage area files and snapshot files in the mf_
       personnel database are copied to DISK2:[DIR]; the file names
       for these storage areas remain unchanged.

    $ RMU/COPY_DATABASE DISK1:[DB]MF_PERSONNEL.RDB -
    _$ /DIRECTORY=DISK2:[DIR] -
    _$ /ROOT=DISK3:[ROOT]COPYRDB.RDB -
    _$ EMPIDS_MID/FILE=DISK4:[FILE], -
    _$ EMPIDS_LOW/FILE=EMPIDS -
    _$ /SNAPSHOT=(FILE=DISK5:[SNAP]EMPIDS.SNP)

    Example 9

    The following example demonstrates how to disallow exclusive mode
    for a copied database. It then shows the error messages returned
    when a user attempts to access the copied database using the
    disallowed mode:

    $ RMU/COPY_DATABASE/TRANSACTION_MODE=NOEXCLUSIVE/DIRECTORY=[.COPY] -
    _$ MF_PERSONNEL.RDB
    %RMU-W-DOFULLBCK, full database backup should be done to ensure future
    recovery
    $ SQL
    SQL> ATTACH 'FILENAME mf_personnel.rdb';
    SQL> SET TRANSACTION READ WRITE RESERVING EMPLOYEES FOR EXCLUSIVE WRITE;
    %RDB-E-BAD_TPB_CONTENT, invalid transaction parameters in the
     transaction parameter block (TPB)
    -RDMS-E-INVTRANOPT, the transaction option "EXCLUSIVE WRITE" is not
     allowed
    SQL>
Close Help