RDB/VMS SQL IMPORT — VMS RDB_4.1_M
IMPORT DATABASE ──>
F
R
O
M file-spec ──┐ ┌────────────────────────────────────┘ └───┬─>
F
I
L
E
N
A
M
E file-spec ─┬────────┐ └─>
W
I
T
H
A
L
I
A
S alias ───┘ │ ┌────────────────────────────────────┘ └┬─┬──────────────────────────────────┬─┬─> typebox (;) │ ├┬───────┬─┬─>
A
C
L ──────────┬─────┤ │ │ │└─>
N
O ─┘ ├─>
B
A
T
C
H
U
P
D
A
T
E ─┤ │ │ │ │ ├─>
C
D
D
L
I
N
K
S ────┤ │ │ │ │ ├─>
D
A
T
A ─────────┤ │ │ │ │ └─>
T
R
A
C
E ────────┘ │ │ │ ├─> import-root-file-params-1 ─────┤ │ │ ├─> import-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:
WITH_ALIASACLBATCH_UPDATECDD_LINKS
DATATRACE
More Informationimport root file params 1import root file params 2storage area params
WITH_ALIAS
Specifies the source database files to be compressed and written to an .RBR file. ALIAS specifies the alias of a database that is part of the current session. If the database you want to export is already attached, specifying ALIAS avoids the overhead of a second attachment to the database and the locking that attachment entails.
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 database 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 database 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
DATABASE:
- BUFFER SIZE
- SEGMENTED STRING STORAGE AREA
o Change storage area parameters you cannot change with ALTER
DATABASE:
- 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.
import root file params 1
import-root-file-params-1 = ─┬──────────────────────────>────────────────────┬─> ├─>
P
A
T
H
N
A
M
E path-name ─────────────────────────┤ ├─>
M
U
L
T
I
S
C
H
E
M
A
I
S
O
N ──────────────────────────┤ ├─>
D
B
K
E
Y
S
C
O
P
E typebox (I)typebox (S) ─┬─>
T
R
A
N
S
A
C
T
I
O
N ─┬──────────┤ │ └─>
A
T
T
A
C
H ──────┘ │ ├─>
C
O
L
L
A
T
I
N
G
S
E
Q
U
E
N
C
E sequence-name ────────┐ │ │ ┌─────────────────────────────────────────┘ │ │ └┬───────────────┬────┬─────────────┬─────┐ │ │ └─>
C
O
M
M
E
N
T
I
S ─┘ └─> typebox (')string' ─┘ │ │ │ ┌─────────────────────────────────────────┘ │ │ └──> ncs-name ───┬───────────────────────┬───┤ │ └─>
F
R
O
M library-name ──┘ │ ├─>
N
U
M
B
E
R typebox (O)F
U
S
E
R
S ──> number-users ───────────┤ ├─>
N
U
M
B
E
R typebox (O)F
B
U
F
F
E
R
S ─────> number-buffers ────┤ ├─>
N
U
M
B
E
R typebox (O)F
V
A
X
C
L
U
S
T
E
R
N
O
D
E
S ─> number-nodes ─┤ ├─>
N
U
M
B
E
R typebox (O)F
R
E
C
O
V
E
R
Y
B
U
F
F
E
R
S ───┐ │ │ ┌─────────────────────────────┘ │ │ └───> number-buffers ───────────────────────┤ ├─>
B
U
F
F
E
R
S
I
Z
E typebox (I)typebox (S) ─> buffer-blocks ──>
B
L
O
C
K
S ─┤ └─> global-buffer-params ───────────────────────┘
Additional information available:
global buffer params
global-buffer-params= ─>
G
L
O
B
A
L
B
U
F
F
E
R
S typebox (A)typebox (R)typebox (E) ─┬─>
E
N
A
B
L
E
D ──┬───┐ └─>
D
I
S
A
B
L
E
D ─┘ │ ┌─────────────────────────────────────┘ └─┬────────────────────────────────────────────────┬─> └─> ( ─>
N
U
M
B
E
R typebox (I)typebox (S) number-glo-buffers ─> , ──┐ │ ┌───────────────────────────────────────┘ │ └─>
U
S
E
R
L
I
M
I
T typebox (I)typebox (S) max-glo-buffers ────> ) ──┘ If you specify global buffer parameters, different user processes in a cluster can map shared pages of the database to virtual memory to eliminate unnecessary database file reads.
import root file params 2
import-root-file-params-2 = ─┬──────────────────────────> ───────────────────────────┬─> ├─>
S
N
A
P
S
H
O
T typebox (I)typebox (S) ────┬─────>
E
N
A
B
L
E
D ─┬─>
I
M
M
E
D
I
A
T
E ┬─┬─┤ │ │ └─>
D
E
F
E
R
R
E
D ─┘ │ │ │ └─────>
D
I
S
A
B
L
E
D ───────────>─────┘ │ ├─>
D
I
C
T
I
O
N
A
R
Y typebox (I)typebox (S) ───┬───>
R
E
Q
U
I
R
E
D ───────┬────────────┤ │ └───>
N
O
T
R
E
Q
U
I
R
E
D ───┘ │ ├─>
A
D
J
U
S
T
A
B
L
E
L
O
C
K
G
R
A
N
U
L
A
R
I
T
Y typebox (I)typebox (S) ─┬─>
E
N
A
B
L
E
D ──┬─────┤ │ └─>
D
I
S
A
B
L
E
D ─┘ │ ├─>
C
A
R
R
Y
O
V
E
R
L
O
C
K
S typebox (A)typebox (R)typebox (E) ─┬─>
E
N
A
B
L
E
D ──┬───────────────┤ │ └─>
D
I
S
A
B
L
E
D ─┘ │ ├─>
L
O
C
K
T
I
M
E
O
U
T
I
N
T
E
R
V
A
L typebox (I)typebox (S) number-seconds SECONDS ────┤ ├─>
S
E
G
M
E
N
T
E
D
S
T
R
I
N
G ─┬─> typebox (S)typebox (T)typebox (O)typebox (R)typebox (A)typebox (G)typebox (E)
A
R
E
A typebox (I)typebox (S) area-name ───┤ ├─>
L
I
S
T ─────────────┘ │ └─>
P
R
O
T
E
C
T
I
O
N typebox (I)typebox (S) ───┬───>
A
N
S
I ──┬─────────────────────┘ └───>
A
C
L
S ──┘
Additional information available:
More Information
Parameters that control the characteristics of the database root file associated with the database, 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 = ─┬─┬──────────────────────────>─────────────────────────────┬─┬──> │ ├─>
A
L
L
O
C
A
T
I
O
N typebox (I)typebox (S) ───> number-pages ────> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S) ─────────┤ │ │ ├─>
P
A
G
E
S
I
Z
E typebox (I)typebox (S) ────> page-blocks ─────> typebox (B)typebox (L)typebox (O)typebox (C)typebox (K)typebox (S) ────────┤ │ │ ├─>
P
A
G
E
F
O
R
M
A
T typebox (I)typebox (S) ──┬────>
U
N
I
F
O
R
M ────┬────────────────┤ │ │ │ └────>
M
I
X
E
D ──────┘ │ │ │ ├─>
T
H
R
E
S
H
O
L
D
S typebox (A)typebox (R)typebox (E) ( val1 ─┬──────────────────────┬─> ) ─┤ │ │ │ └─> ,val2 ─┬──────────┬┘ │ │ │ │ └─> ,val3 ─┘ │ │ │ ├─>
I
N
T
E
R
V
A
L typebox (I)typebox (S) ───────> number-data-pages ──────────────┤ │ │ ├─>
E
X
T
E
N
T typebox (I)typebox (S) ────┬──> extent-pages ────> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S) ────┬────┤ │ │ │ └──> (extension-options)──────────┘ │ │ │ ├─>
S
N
A
P
S
H
O
T
F
I
L
E
N
A
M
E ───> file-spec ────────────────────┤ │ │ ├─>
S
N
A
P
S
H
O
T
A
L
L
O
C
A
T
I
O
N typebox (I)typebox (S) ──> snp-pages ──> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S) ──────┤ │ │ ├─>
S
N
A
P
S
H
O
T
E
X
T
E
N
T typebox (I)typebox (S) ─┬─> extent-pages ──> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S) ─┬────┤ │ │ │ └─> (extension-options) ────┘ │ │ │ └─>
W
R
I
T
E
O
N
C
E ──────────────────────────────────────────┘ │ │ │ └──────────────────────────────<─────────────────────────────┘
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 database
o For multifile databases, the storage area parameters specify
a set of default values for any storage areas created by the
CREATE DATABASE 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 database 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
DATABASE statement.