RDB/VMS Relational Database Operator EXPORT — VMS RDB_4.1A
Makes a copy of a database in an intermediate, compressed form. Use
the RDO IMPORT statement on this export file to rebuild the Rdb/VMS
database.
Example:
RDO> EXPORT 'DEPT3:PERS' INTO 'DISK2:PERSONNEL.RBR'
Additional information available:
More
Use EXPORT and IMPORT to:
You must have the Rdb/VMS READ privilege to the database relations to
use the EXPORT statement.
o Restructure a Rdb/VMS single-file database into a multifile
database
o Restructure a multifile database
o Migrate a database from one DSRI-compliant database management
system to another
o Create a version-independent copy of the database for archiving
purposes
o Create an empty target database that uses the same data
definitions as a source database by copying the metadata, but not
the data, to the target database
o Change database and storage area characteristics that you cannot
change with the CHANGE DATABASE statement
The IMPORT and EXPORT statements are not intended for regular backups
of the database. For regular backups and restorations of Rdb/VMS
databases, use the RMU/BACKUP and RMU/RESTORE commands.
Format
EXPORT ─> database-file-spec ─>typebox (I)typebox (N)typebox (T)typebox (O) ─> interchange-file-spec ─┐ ┌─────────────────────────────────────────────────────────────┘ └──┬──────────────────>───────────────────┬───────> └─>
W
I
T
H ─────┬───>
E
X
T
E
N
S
I
O
N
S ───────┤ ├───>
N
O
E
X
T
E
N
S
I
O
N
S ─────┤ ├───>
D
A
T
A ─────────────┤ └───>
N
O
D
A
T
A ───────────┘
Additional information available:
database-file-specinterchange-file-spec
database-file-spec
The file specification for the database you want to export. Use either a full or partial file specification or a logical name. If you use a simple file name, Rdb/VMS looks for the database in the current default directory. If you do not specify a file type, Rdb/VMS uses RDB.
interchange-file-spec
The file specification for a file in which EXPORT places an intermediate version of the database. Use either a full or partial file specification or a logical name. If you use a simple file name, Rdb/VMS places the interchange file in the current default directory. The default file type is RBR.
WITH_EXTENSIONS
Specifies whether the exported format of the database is compatible
with a pre-Version 3.0 Rdb/VMS database (WITH NOEXTENSIONS), or with
an Rdb/VMS database created with Version 3.0 Rdb/VMS software or
higher (WITH EXTENSIONS). The default is WITH EXTENSIONS. The WITH
EXTENSIONS option also directs Rdb/VMS to preserve other parameters
about the physical structure of the exported database. Use WITH
NOEXTENSIONS in the following situations:
o When you migrate a database to Rdb/ELN
o When you export a database that you plan to import on pre-Version
3.0 Rdb/VMS software
When you specify the WITH NOEXTENSIONS option, null flags for missing
value fields are not exported, therefore numeric missing values are
replaced by zeros and character missing values are replaced by
blanks.
Note also that when you specify the WITH NOEXTENSIONS option,
features of Version 3.0 and higher Rdb/VMS databases are not
exported. Storage maps, triggers, and collating sequences, for
example, are not backed up when you specify the WITH NOEXTENSIONS
option.
The WITH NOEXTENSIONS option is not compatible with CDD/Plus
dictionary databases (CDD$DATABASE.RDB). If you attempt to export a
CDD$DATABASE.RDB database, RDO issues an error message stating that
the NOEXTENSIONS option is not valid for CDD/Plus dictionary
databases.
WITH_DATA
Specifies whether the RBR file includes the data and metadata contained in the database (WITH DATA), or the metadata only (WITH NODATA). The default is WITH DATA. When you specify the WITH NODATA option, the EXPORT statement copies metadata from the source database to an RBR file. Use the IMPORT statement to generate an empty database whose metadata is identical to that of the source database. The WITH NODATA option is not compatible with CDD/Plus dictionary databases (CDD$DATABASE.RDB). If you attempt to export a CDD$DATABASE.RDB database, RDO issues an error message stating that the NODATA option is not valid for CDD/Plus dictionary databases.
Example
Example 1 The following example shows how to export a database to a disk file: RDO> EXPORT cont> 'DEPT3:PERSONNEL.RDB' INTO cont> 'EXPORT$DISK:[EXPORT]PERSONNEL.RBR' This statement creates an interchange file for the PERSONNEL database from the database file identified by DEPT3:PERSONNEL.RDB. DEPT3 in this case is a logical name for the device and directory where the database is located. The copy is stored on EXPORT$DISK in the directory [EXPORT]. By default, the database is exported WITH EXTENSIONS and WITH DATA. Example 2 The following example shows how to export a database to a magnetic tape volume: $ INITIALIZE MUA0: _Label: PERS $ $ MOUNT MUA0: _Label: PERS _Log name: $ RDO RDO> EXPORT 'DEPT3:PERSONNEL.RDB' INTO 'MUA0:PERSONNEL.RBR' This statement creates an intermediate copy of the database on the magnetic tape volume labeled PERS, mounted on device MUA0:. Example 3 The following example shows how to use the EXPORT statement to migrate an Rdb/VMS multifile database to an Rdb/ELN system. RDO> EXPORT 'MF_PERS.RDB' INTO 'ELN_PERS.RBR' WITH NOEXTENSIONS Because Rdb/ELN must see the migrated database as a pre-V3.0 database, you must use the NOEXTENSIONS option. Example 4 The following example shows how to export the metadata in a database without its data: RDO> EXPORT cont> 'DEPT3:PERSONNEL.RDB' INTO cont> 'EXPORT$DISK:[EXPORT]PERSONNEL.RBR' cont> WITH NODATA This statement creates an interchange file for the PERSONNEL database from the database file identified by DEPT3:PERSONNEL.RDB. The WITH NODATA option specifies that the interchange file, PERSONNEL.RBR, contains only the metadata that defines the structure of PERSONNEL.RDB.