RDB/VMS SQL IMPORT — VMS RDB_4.0B
IMPORT SCHEMA --> AUTHORIZATION auth-id ----> FROM file-spec -+
|
|
+-------------------------------------------------------------+
++-+----------------------------------+-+-> ;
| ++-------+-+-> ACL ----------+-----+ |
| |+-> NO -+ +-> BATCH UPDATE -+ | |
| | +-> CDD LINKS ----+ | |
| | +-> DATA ---------+ | |
| | +-> TRACE --------+ | |
| +-> root-file params-1 ------------+ |
| +-> root-file-params-2 ------------+ |
| +-> storage-area-params -----------+ |
| +-> create-storage-area-clause ----+ |
| +-> create-storage-map-statement --+ |
| +-> create-index-statement --------+ |
| +-> drop-storage-area-statement ---+ |
| +-> drop-storage-map-statement ----+ |
| +-> drop-index-statement ----------+ |
+-----------------<--------------------+
Additional information available:
ACLBATCH_UPDATECDD_LINKSDATATRACE
More Informationroot file params1root file params2storage area params
ACL
ACL (access control list) is the default and specifies that IMPORT uses the the ACL from the original database when it creates the new database. If you are using IMPORT to restructure a database, you typically want to use ACL and preserve the access control lists. NO ACL overrides the ACLs from the original database and uses the database system default ACLs. Specify NO ACL if you are using IMPORT to rebuild a database on a different system or to convert to an Rdb/VMS database from another DSRI-compliant database system. NO ACL makes you the owner of the new database and creates default access privilege sets.
BATCH_UPDATE
Specifies whether IMPORT stores user data and indexes in a single BATCH UPDATE transaction mode or in in separate READ WRITE transactions for each table (NO BATCH UPDATE). By default IMPORT stores user data and indexes in a single BATCH UPDATE transaction. BATCH UPDATE mode is faster but does not perform run-unit journaling, which means you cannot recover the database in the event of a failure during the IMPORT operation. With the NO BATCH UPDATE option, you can recover the database.
CDD_LINKS
Determines whether IMPORT tries to reestablish links between schema definitions originally based on data dictionary definitions (domains and tables created with the FROM pathname clause) and their sources in the data dictionary. The default depends on whether the IMPORT statement specifies PATHNAME. If IMPORT does specify PATHNAME, CDD LINKS is the default; if it does not specify PATHNAME, NO CDD LINKS is the default. CDD LINKS specifies that IMPORT does try to reestablish data dictionary links even if you do not specify PATHNAME. If you specify CDD LINKS and the database dictionary definition on which a schema definition was based no longer exists, IMPORT generates a warning message. NO CDD LINKS specifies that IMPORT does not establish data dictionary links even if you specify PATHNAME. Specify NO CDD LINKS if you are using IMPORT to rebuild a database on a different system or to convert to an Rdb/VMS database from another DSRI-compliant database system.
DATA
Specifies whether the database created by the IMPORT statement includes the data and metadata contained in the source database, or the metadata only. DATA is the default. When you specify the NO DATA option, you import the metadata that defines a database from an .RBR file and exclude the data. The NO DATA option is not compatible with CDD/Plus dictionary databases. An RBR file, created by an EXPORT statement with the DATA option (the default) and generated from a CDD$DATABASE.RDB file, can not be used with the NO DATA option to the IMPORT statement. SQL will issue an error message stating that the NO DATA option is not valid for CDD/Plus-based databases.
TRACE
Specifies whether usage statistics are logged by IMPORT. NO TRACE is the default. Some actions taken by the IMPORT statement can consume significant amounts of I/O, and CPU time. These actions include the following operations: o Loading data o Defining indices o Defining constraints When you specify the TRACE option with the IMPORT statement, SQL writes a message to your terminal screen when each operation begins, and writes a summary of DIO, CPU, and PAGE FAULT statistics when the operation completes. When the IMPORT statement finishes execution, a summary of all DIO, CPU, and PAGE FAULT statistics is displayed. The display also includes information on access to the RBR file, database creation and loading of data.
More Information
Creates an Rdb/VMS database from an intermediate, compressed
.RBR file.
You use IMPORT with EXPORT to make changes to Rdb/VMS databases
that cannot be made any other way. EXPORT unloads a database to
an .RBR file. IMPORT recreates the database with changes not
allowed through ALTER statements:
o Convert a single-file database to multifile and vice versa
o Change root file parameters you cannot change with ALTER
SCHEMA:
- BUFFER SIZE
- SEGMENTED STRING STORAGE AREA
o Change storage area parameters you cannot change with ALTER
SCHEMA:
- ALLOCATION
- PAGE SIZE
- PAGE FORMAT
- THRESHOLDS
- INTERVAL
- SNAPSHOT FILENAME
- PROTECTION IS ANSI/ACL
- Any characteristics of the RDB$SYSTEM storage area
o Reload tables with existing rows to take advantage of
newly-created hashed indexes
o Reload tables to take advantage of new or changed storage
maps
o Move a database to another directory or disk structure
o Convert a database from another DSRI-compliant
implementation to an Rdb/VMS database. For instance, the
Rdb/ELN EBRP utility creates an .RBR file you can use with
the IMPORT statement to create an Rdb/VMS database.
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.
If you use the NO DATA option, the IMPORT statement creates
an Rdb/VMS database whose metadata is identical to that
found in the source database used by the EXPORT statement,
but the duplicate database contains no data.
root file params1
root-file-params-1 =
------+--------------------------> -------------------------------+---->
+-> FILENAME file-spec -------------------------------------+
+-> PATHNAME path-name -------------------------------------+
+-> DBKEY SCOPE IS -+-> TRANSACTION -+----------------------+
| +-> ATTACH ------+ |
+-> COLLATING SEQUENCE sequence-name --+---------------+-+ |
| +-> COMMENT IS -+ | |
| +-----------------------------------------------------+ |
| ++-------------+--> ncs-name -+-----------------------+--+
| +-> "string" -+ +-> FROM library-name --+ |
+-> NUMBER OF USERS IS --> number-users --------------------+
+-> NUMBER OF BUFFERS IS -----> number-buffers -------------+
+-> NUMBER OF VAXCLUSTER NODES IS --> number-nodes ---------+
+-> NUMBER OF RECOVERY BUFFERS IS ---> number-buffers ------+
+-> BUFFER SIZE IS -----> buffer-blocks --> BLOCKS ---------+
root file params2
root-file-params-2 =
------+--------------------------> -------------------------------+---->
+-> SNAPSHOT IS ----+-----> ENABLED -+-> IMMEDIATE --+-+--+
| | +-> DEFERRED ----+ | |
| +-----> DISABLED ----------->--------+ |
+-> DICTIONARY IS ---+---> REQUIRED -------+----------------+
| +---> NOT REQUIRED ---+ |
+-> ADJUSTABLE LOCK GRANULARITY IS -+-> ENABLED --+---------+
| +-> DISABLED -+ |
+-> SEGMENTED STRING STORAGE AREA IS area-name -------------+
+-> PROTECTION IS ---+---> ANSI --+-------------------------+
+---> ACL ---+
Additional information available:
More Information
Parameters that control the characteristics of the database root file associated with the schema, or characteristics stored in the root file that apply to the entire database. The IMPORT statement by default will retain the protection style of the database that was exported. If you specify protection is ANSI or protection IS ACL, then it will create a database with that protection type. If the protection of the database created is different from the protection of the database that was exported, then no protection records will be imported and you will get default protections.
storage area params
storage-area-params = -+-+-------------------------->-----------------------------+-+--> | +-> ALLOCATION IS ---> number-pages ----> PAGES ---------+ | | +-> PAGE SIZE IS ----> page-blocks -----> BLOCKS --------+ | | +-> PAGE FORMAT IS --+----> UNIFORM ----+----------------+ | | | +----> MIXED ------+ | | | +-> THRESHOLDS ARE ( val1 -+----------------------+-> ) -+ | | | +-> ,val2 -+----------++ | | | | +-> ,val3 -+ | | | +-> INTERVAL IS -------> number-data-pages --------------+ | | +-> EXTENT IS ----+--> extent-pages ----> PAGES ----+----+ | | | +--> (extension-options)----------+ | | | +-> SNAPSHOT FILENAME ---> file-spec --------------------+ | | +-> SNAPSHOT ALLOCATION IS --> snp-pages --> PAGES ------+ | | +-> SNAPSHOT EXTENT IS -+-> extent-pages --> PAGES -+----+ | | +-> (extension-options) ----+ | +----------------------------<-------------------------------+
Additional information available:
More Information
Parameters that control the characteristics of database storage
area files. You can specify most storage area parameters for
either single-file or multifile databases, but the effect of the
clauses differs:
o For single file databases, the storage area parameters
specify the characteristics for the single storage area in
the schema
o For multifile databases, the storage area parameters specify
a set of default values for any storage areas created by the
CREATE SCHEMA statement that do not specify their own values
for the same parameters. The default values apply to the
RDB$SYSTEM storage area, plus any others named in CREATE
STORAGE AREA schema elements.
CREATE STORAGE AREA statements can override these default
values, and the default values do not apply to CREATE
STORAGE AREA statements outside the scope of the CREATE
SCHEMA statement.