RDOHELP72.HLB  —  IMPORT  Examples
    Example 1

    The following example imports a database. It also specifies the
    number of buffers and the length of each buffer in the imported
    database:

    RDO> IMPORT
    cont>  'DISK1:PERSONNEL.RBR'
    cont>   INTO 'DEPT3:NEW_PERSONNEL'
    cont>   NUMBER OF BUFFERS IS 10
    cont>   BUFFER SIZE IS 10 BLOCKS
    cont> END IMPORT.

    Example 2

    The following example imports a database without including its
    data. The NODATA option with the IMPORT statement creates an
    Oracle Rdb database whose metadata is identical to the metadata
    in the intermediate RBR file.

    RDO> IMPORT
    cont>  'DISK1:PERSONNEL.RBR'
    cont>   INTO 'DEPT3:NEW_PERSONNEL'
    cont>   NODATA
    cont> END IMPORT.

    Example 3

    The following example imports a database from a magnetic tape.

    $ MOUNT MUA0:
    _Label:  PERS
    _Log name:
    $ RDO
    RDO> IMPORT
    cont>  'MUA0:PERSONNEL' INTO
    cont>  'DEPT3:PERSONNEL'
    cont> END IMPORT.

    This statement reads the export copy of the database from the
    magnetic tape volume labeled PERS, mounted on device MUA0:. It
    creates a new database in DEPT3:PERSONNEL.RDB, where DEPT3 is a
    logical name for a device and directory.

    Example 4

    The following example uses the RMU/DUMP command to check the
    current value of the node count, and then uses the IMPORT
    statement with the NUMBER CLUSTER NODES clause to lower the node
    count parameter. In this case, the Local Area cluster contains 22
    nodes; the default maximum for the CLUSTER NODES parameter is 16.
    This example sets the upper limit of user access from VAX nodes
    at 20.

    $ RMU/DUMP ACCTING
             .
             .
             .

        Maximum node count is 22
             .
             .
             .

    $ RDO
    RDO> EXPORT ACCTING.RDB INTO ACCOUNTING_TEST.RBR
    RDO> IMPORT ACCOUNTING_TEST.RBR INTO ACCOUNTING_TEST.RDB
    cont> NUMBER OF CLUSTER NODES IS 20
    cont> END IMPORT.

    Example 5

    The following example uses the IMPORT statement to restructure a
    single-file database into a multifile database. This example does
    not include all the storage areas and storage maps that are in
    the sample multifile MF_PERSONNEL database.

    $  RDO
    !
    ! Invoke a command file that has the IMPORT statement in it
    !
    RDO>  @IMPORT_PERS.RDO
    !
    !
    IMPORT 'DISK$BACK:PERSONNEL.RBR' INTO 'DB_DISK:MULTI_PERSONNEL.RDB'
    !
    ! Specify database-wide characteristics
    !
         NUMBER OF USERS IS 40
         NUMBER CLUSTER NODES 12
         SNAPSHOT IS ENABLED IMMEDIATE
         DICTIONARY IS REQUIRED
         NUMBER RECOVERY BUFFERS 200
    !
    !
    ! Specify global defaults to override Oracle Rdb defaults
    !   for all storage areas
    !
         ALLOCATION IS 500 PAGES
         PAGE FORMAT IS MIXED
         THRESHOLDS ARE (55,65,75)
         INTERVAL IS 300
    !
    !
    ! Define the default storage area
    !
    DEFINE STORAGE AREA RDB$SYSTEM
      FILENAME IS DISK1:PERS_DEFAULT
      PAGE FORMAT IS UNIFORM
      SNAPSHOT_FILENAME IS DISK2:PERS_DEFAULT
    END RDB$SYSTEM STORAGE AREA
    !
    !
    ! Define storage area for segmented strings
    !
    DEFINE STORAGE AREA PERS_SEGSTR
      FILENAME IS DISK1:PERS_SEGSTR
      PAGE FORMAT IS MIXED
      SNAPSHOT_FILENAME IS DISK2:PERS_SEGSTR
    END PERS_SEGSTR STORAGE AREA
    !
    ! Put the segmented strings in the named storage area
    !
    SEGMENTED STRING STORAGE AREA IS PERS_SEGSTR
    !
    !
    ! Define other storage areas
    !  Storage area parameters specified within the DEFINE STORAGE AREA
    !  clause override the global defaults, and the Oracle Rdb defaults
    !
    DEFINE STORAGE AREA EMPIDS_LOW
      FILENAME IS DISK3:EMPIDS_LOW
      SNAPSHOT_FILENAME IS DISK4:EMPIDS_LOW
    END EMPIDS_LOW STORAGE AREA
    !
    !
    DEFINE STORAGE AREA EMPIDS_MID
      FILENAME IS DISK5:EMPIDS_MID
      SNAPSHOT_FILENAME IS DISK6:EMPIDS_MID
    END EMPIDS_MID STORAGE AREA
    !
    !
    DEFINE STORAGE AREA EMPIDS_OVER
      FILENAME IS DISK7:EMPIDS_OVER
      SNAPSHOT_FILENAME IS DISK8:EMPIDS_OVER
    END EMPIDS_OVER STORAGE AREA
    !
    !
    DEFINE STORAGE AREA EMP_INFO
      FILENAME IS DISK1:EMP_INFO
    !  Local definition overrides the global default
      THRESHOLDS ARE (65,75,85)
      INTERVAL IS 400
      SNAPSHOT_FILENAME IS DISK2:EMP_INFO
    END EMP_INFO STORAGE AREA
    !
    !
    !
    DEFINE INDEX EMPLOYEES_HASH
      DESCRIPTION IS /* hashed index for employees relation */
      FOR EMPLOYEES
      STORE USING EMPLOYEE_ID
      WITHIN
       EMPIDS_LOW WITH LIMIT OF "00200";
       EMPIDS_MID WITH LIMIT OF "00500";
       EMPIDS_OVER
      TYPE IS HASHED.
      EMPLOYEE_ID.
    END EMPLOYEES_HASH INDEX
    !
    !
    DEFINE STORAGE MAP EMP_MAP
      DESCRIPTION IS /* Employees records partitioned by EMPLOYEE_ID */
      FOR EMPLOYEES RELATION
      STORE USING EMPLOYEE_ID
      WITHIN
       EMPIDS_LOW WITH LIMIT OF "00200";
       EMPIDS_MID WITH LIMIT OF "00500";
       EMPIDS_OVER
      PLACEMENT VIA INDEX EMPLOYEES_HASH
    END EMP_MAP STORAGE MAP
    !
    !
    !  End the IMPORT statement
    !
    END IMPORT.

    Example 6

    The following example shows how to use the DICTIONARY IS NOT
    USED clause to prevent metadata from being written to the data
    dictionary. The IMPORT statement creates a database called
    RALLY$COMMERCE. Because the DICTIONARY IS NOT USED clause is
    specified, no metadata is written to the data dictionary during
    the IMPORT operation.

    RDO> IMPORT RALLY$COMMERCE.RBR INTO RALLY$COMMERCE
    cont>     NOCDD LINKS
    cont>     NOACL
    cont>     DICTIONARY IS NOT REQUIRED
    cont>     DICTIONARY IS NOT USED
    cont> END IMPORT.

    Example 7

    If you use the IMPORT statement to restructure a data dictionary,
    be sure to use the DICTIONARY IS NOT USED clause to prevent RDO
    from using the dictionary in any way:

    RDO> IMPORT CDDPLUS.RBR INTO CDD$DATABASE
    cont> DICTIONARY IS NOT USED
              .
              .
              .
    cont> END IMPORT.
Close Help