HELPLIB.HLB  —  RMU72  Copy Database, 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