Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

More

Examples

Format

DELETE_STORAGE_AREA

db-handle

file-spec

path-name

change-database-options

change-journal-file-options

add-storage-area

change-storage-area-clause

ENABLED-IMMEDIATE

ENABLED-DEFERRED

DISABLED

DICTIONARY

ADJUSTABLE_LOCK

OPEN Options

recovery-buffers

snp-pages

extent-pages

extension-options

number-users

number-buffers

number-nodes

min-pages

max-pages

growth

aij-journal-file-spec

journal-blocks

extent-blocks

storage-area-name

file-spec

storage-area-options

PAGE_FORMAT

THRESHOLDS

number-pages

page-blocks

number-data-pages

file-spec

snp-pages

extent-pages

extension-options

snp-pages

extent-pages

extension-options

min-pages

max-pages

growth

RDB/VMS Relational Database Operator CHANGE_DATABASE — VMS CDD+_4.1A

 Changes database and storage area parameters.  When this statement
 executes, Rdb/VMS updates the characteristics named in the statement.
 All other characteristics remain the same.

 Example:

 RDO>  CHANGE DATABASE FILENAME 'DISK2:[USER.TEST]PERSONNEL'
 cont>   SNAPSHOT ALLOCATION IS 200.

Additional information available:

MoreExamplesFormat

More

 Use CHANGE DATABASE to:

  o  Define, change, and delete storage areas in multifile databases

  o  Enable or disable after-image journaling and change journal file
     characteristics

  o  Enable or disable snapshot transactions and change snapshot file
     characteristics

  o  Change the number of recovery buffers

  o  Change physical parameters associated with the database

  o  Specify whether the database can be opened automatically or
     manually

  o  Require the use of the data dictionary

Examples

 Example 1

 Use the CHANGE DATABASE statement to enable after-image
 journaling:

 CHANGE DATABASE PATHNAME 'PERSONNEL'
        JOURNAL FILE IS 'DEPT3:PERSONNEL.AIJ'.

 Example 2

 You can also use CHANGE DATABASE to disable after-image journaling:

 RDO> CHANGE DATABASE FILENAME 'PERSONNEL'
 cont>    NOJOURNAL.

 Example 3

 The database shutdown feature is designed to ensure that active users
 on a single node or across a VAXcluster cannot access the database
 while you perform administrative and maintenance tasks.  For
 instance, use this shutdown feature when you need the database in a
 stable condition while performing backup and restore options, or when
 you are tuning the database.

 In the following example, a complete database shutdown is performed
 for all users of a database residing on a common disk in a
 VAXcluster.  The CHANGE DATABASE ...  OPEN IS MANUAL statement is
 used to prevent new users from automatically opening that database
 when the first DML statement is executed on the database.

 $ RDO
 RDO> CHANGE DATABASE FILE "$222$DUA17:[DBS]PERS"
 cont> OPEN IS MANUAL.
 RDO> $ REPLY/ALL "PERS.RDB database will be shut down in 15 minutes"
 RDO> $ REPLY/ALL "Please complete any work with PERS before then"
 RDO> !
 RDO> ! After waiting 15 minutes:
 RDO> !
 RDO> CLOSE FILE "$222$DUA17:[DBS]PERS" WITH
 cont> EXIT FOR CLUSTER
 RDO>

 At this point, you are assured that no unprivileged users can invoke
 this database and you can perform maintenance tasks (like tuning).
 For example, you can add or delete indexes and compare the
 performance results in a stable testing environment.

 When you are ready to make the database available again across the
 cluster, enter RDO and type:

 RDO> CHANGE DATABASE FILE "$222$DUA17:[DBS]PERS"
 cont> OPEN IS AUTOMATIC.


 Example 4

 The following example shuts down access to a clusterwide database and
 then reopens the database for a specific node:

 RDO> CHANGE DATABASE FILE "$222$DUA17:[DBS]PERS"
 cont> OPEN IS MANUAL.
 RDO> $ REPLY/ALL "PERS.RDB database will be shut down in 15 minutes"
 RDO> $ REPLY/ALL "Please complete any work with PERS before then"
 RDO> !
 RDO> ! After waiting 15 minutes:
 RDO> !
 RDO> CLOSE FILE "$222$DUA17:[DBS]PERS" WITH
 cont> EXIT FOR CLUSTER
 RDO> EXIT
 $ !
 $ SET HOST TRIXIE
   .
   .
   .
 $ ! On node TRIXIE now.
 $ RDO
 RDO> OPEN FILE "$222$DUA17:[DBS]PERS"

 This OPEN statement opens the PERS database on TRIXIE only.  Users
 logged into other nodes in the VAXcluster who normally have access to
 the clusterwide database cannot access it until:

  o  The OPEN statement is executed by a user with sufficient
     privilege on their node

  o  Or, the CHANGE DATABASE ...  OPEN IS AUTO statement is executed
     by a user with sufficient privilege from any node in the
     VAXcluster


 Example 5

 The following example shows how to disable snapshots on a database:

 RDO> CHANGE DATABASE FILENAME 'PERSONNEL' SNAPSHOT IS DISABLED.
 %RDMS-I-MODAREFLG, disabled snapshots

 Example 6

 The following example uses the CHANGE DATABASE statement to define a
 new storage area for a multifile database:

 RDO>  CHANGE DATABASE FILENAME 'MF_PERSONNEL'
 cont>   DEFINE STORAGE AREA ARCHIVED_EMPS
 cont>    FILENAME IS DISK3:ARCHIVED_EMPS
 cont>    ALLOCATION IS 50 PAGES
 cont>    PAGE FORMAT IS MIXED
 cont>    SNAPSHOT_FILENAME IS DISK4:ARCHIVED_EMPS
 cont>   END ARCHIVED_EMPS STORAGE AREA.

Format

 CHANGE DATABASE  ─────────>───────────────────────────┐
 ┌────────────────<────────────────<───────────────────┘
 └┬─>──────────────────┬─┬─> 
F

I

L

E

N

A

M

E
──> file-spec ─┬─┐ └─> db-handle ──> typebox (=) ─┘ └─> 
P

A

T

H

N

A

M

E
──> path-name ─┘ │ ┌─────────────────────────────────────────────────────┘ └──┬──┬──> change-database-options ────────────────────┬──┬───> . │ ├──> change-journal-file-options ─────────────────┤ │ │ ├──> add-storage-area-clause ─────────────────────┤ │ │ ├──> change-storage-area-clause ──────────────────┤ │ │ └──> 
D

E

L

E

T

E

S

T

O

R

A

G

E

A

R

E

A
──> storage-area-name ───┘ │ │ │ └───────────────────────────<────────────────────────────┘

Additional information available:

DELETE_STORAGE_AREA

db-handlefile-specpath-namechange-database-optionschange-journal-file-options
add-storage-areachange-storage-area-clause

db-handle

 A host language variable or name that you associate with the
 database.  Use a database handle when you are accessing more than one
 database at a time.

file-spec

 The name of the database file.  Put the name in quotation marks.

path-name

 The path name that refers to the data dictionary entity for the
 database.  Put the name in quotation marks.

change-database-options

 change-database-options =

  ─┬─┬──>──────────────────────>──────────────────────────────┬─┬──>
   │ ├──>
O

P

E

N
typebox (I)typebox (S) ──────────┬──> 
A

U

T

O

M

A

T

I

C
─┬───────────────┤ │ │ │ └──> 
M

A

N

U

A

L
─────┘ │ │ │ ├──>
E

X

T

E

N

T
typebox (I)typebox (S) ────────┬──> extent-pages ─> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S) ──┬────┤ │ │ │ └──> (extension-options) ─────┘ │ │ │ ├──>
N

U

M

B

E

R
typebox (O)F 
V

A

X

C

L

U

S

T

E

R

N

O

D

E

S
typebox (I)typebox (S) number-nodes ──────────┤ │ │ ├──>
N

U

M

B

E

R
typebox (O)F 
B

U

F

F

E

R

S
typebox (I)typebox (S) ────> number-buffers ───────────┤ │ │ ├──>
N

U

M

B

E

R
typebox (O)F 
U

S

E

R

S
typebox (I)typebox (S) ──────> number-users ─────────────┤ │ │ ├──>
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
──┘ │ │ │ ├──>
N

U

M

B

E

R
typebox (O)F 
R

E

C

O

V

E

R

Y

B

U

F

F

E

R

S
typebox (I)typebox (S) ──> recovery buffers ──┤ │ │ ├──>
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
────────>────────┘ │ │ │ ├──>
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) ───┘ │ │ │ └──>
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
───┘ │ └──────<────────────────────────────────────────<────────────┘

Additional information available:

ENABLED-IMMEDIATEENABLED-DEFERREDDISABLEDDICTIONARY
ADJUSTABLE_LOCK

OPEN Optionsrecovery-bufferssnp-pagesextent-pagesextension-options
number-usersnumber-buffersnumber-nodes

OPEN Options

 The OPEN options are OPEN IS AUTOMATIC and OPEN IS MANUAL.  These
 options determine whether any user can open a previously unopened or
 a closed database by simply invoking it and executing a DML statement
 (OPEN IS AUTOMATIC, the default).

recovery-buffers

 The number of database buffers used during the automatic recovery
 process that is initiated after a system or process failure.  The
 default is 20 buffers.

ENABLED-IMMEDIATE

 Specifies that READ_WRITE transactions write copies of records to the
 snapshot file before those records are modified, regardless of
 whether a READ_ONLY transaction is active.  The default is SNAPSHOT
 IS ENABLED IMMEDIATE.

 You enable snapshot writing to all snapshot files for all storage
 areas when you specify the SNAPSHOT IS ENABLED clause.

ENABLED-DEFERRED

 Specifies that READ_WRITE transactions not write copies of records
 they modify to the snapshot file unless a READ_ONLY transaction is
 active.  READ_ONLY transactions that attempt to start after an active
 READ_WRITE transaction begins must wait for all active READ_WRITE
 users to complete their transactions.

 You enable snapshot writing to all snapshot files for all storage
 areas when you specify the SNAPSHOT IS ENABLED clause.

DISABLED

 Disables snapshot transactions.  If you use the SNAPSHOT IS DISABLED
 clause to disable snapshots on a multifile database, writing to all
 snapshot files for all storage areas is disabled.

snp-pages

 The number of pages allocated for the snapshot file.  The default is
 100 pages.

extent-pages

 The number of pages of each extent.  The default is 100 pages.

extension-options

 Specifies the MIN, MAX, and percent growth of each database file
 extent.  Enclose the parameter list in parentheses.

 extension-options =

 ───>  (   ───>  
M

I

N

I

M

U

M
typebox (O)F ──> min-pages ───> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S), ─┐ ┌────────────────────────────────────────┘ └──> 
M

A

X

I

M

U

M
typebox (O)F ──> max-pages ──> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S),─┐ ┌────────────────────────────────────────┘ └──> 
P

E

R

C

E

N

T

G

R

O

W

T

H
typebox (I)typebox (S) ───> growth ────> ) ───>

Additional information available:

min-pagesmax-pagesgrowth

min-pages
 The minimum number of pages of each extent.  The default is 100
 pages.
max-pages
 The maximum number of pages of each extent.  The default is 10,000
 pages.
growth
 The percent growth of each extent.  The default is 20 percent growth.

DICTIONARY

 Determines whether the database must be invoked by path name for data
 definition changes to occur.  If you specify the DICTIONARY IS
 REQUIRED option, the database must be invoked by path name to change
 metadata and the data dictionary will be maintained.  If you specify
 the DICTIONARY IS NOT REQUIRED option, the database can be invoked by
 either file name or path name to change metadata.  The default is
 DICTIONARY IS NOT REQUIRED.

 If you specify the DICTIONARY option, you cannot specify any other
 options in the same CHANGE DATABASE statement.

ADJUSTABLE_LOCK

 Enables or disables adjustable locking granularity.  The default is
 ENABLED.

number-users

 The maximum number of users allowed to access the database at one
 time.  The default is 50 users.

number-buffers

 The number of buffers Rdb/VMS allocates per process using this
 database.  Specify an unsigned integer greater than zero.  The
 default is 20 buffers.

number-nodes

 Sets the upper limit on the maximum number of VAXcluster nodes from
 which users can access the shared database.  The default is 16.  The
 range is 1 node to 64 nodes.

change-journal-file-options

 change-journal-file-options =

  ─┬─┬──>──────────────────────>──────────────────────────────┬─┬──>
   │ ├──>
J

O

U

R

N

A

L

F

I

L

E

I

S
──> aij-journal-file-spec ───────────┤ │ │ ├──>
N

O

J

O

U

R

N

A

L
───────────────────>───────────────────────┤ │ │ ├──>
J

O

U

R

N

A

L

A

L

L

O

C

A

T

I

O

N
typebox (I)typebox (S) ─> journal-blocks ─> typebox (B)typebox (L)typebox (O)typebox (C)typebox (K)typebox (S) ───┤ │ │ └──>
J

O

U

R

N

A

L

E

X

T

E

N

T
typebox (I)typebox (S) ───> extent-blocks ──> typebox (B)typebox (L)typebox (O)typebox (C)typebox (K)typebox (S) ─────┘ │ │ │ └────────────────────────────────────────────────────────────┘

Additional information available:

aij-journal-file-specjournal-blocksextent-blocks

aij-journal-file-spec

 The file specification for the after-image journal file.

 The journal file specification must be fully qualified and conform to
 VAX file naming conventions, except that the file specification must
 not include a DECnet node name.  You can define a system logical name
 to refer to the journal file.  If you do not include a file type in
 the journal file specification, Rdb/VMS assigns a default file type
 of AIJ.

journal-blocks

 The number of blocks allocated to the after-image journal file.  The
 default is 0 blocks.

extent-blocks

 The size of each extent of the after-image journal file.  The default
 is 512 blocks.

add-storage-area

 Allows you to define a new storage area.

 add-storage-area-clause =


 ────> 
D

E

F

I

N

E

S

T

O

R

A

G

E

A

R

E

A
───────> storage-area-name ───────────┐ │ ┌────────────────────────────────<──────────────────────────────┘ │ └────> 
F

I

L

E

N

A

M

E
────> file-spec ───┬───────────────>───────────┬───┐ └──> storage-area-options ──┘ │ │ ┌──────────────────────────────────<───────────────────────────────┘ │ └──────────> 
E

N

D
───┬─────────>───────────┬─> typebox (S)typebox (T)typebox (O)typebox (R)typebox (A)typebox (G)typebox (E) typebox (A)typebox (R)typebox (E)typebox (A) ────> └─>storage-area-name ─┘

Additional information available:

storage-area-namefile-specstorage-area-options

storage-area-name

 The name of the storage area you want to create.

file-spec

 The file specification for the storage area file.  By default, this
 file has the default file type RDA.

storage-area-options

 storage-area-options =

 ─┬┬──────────────────────────>─────────────────────────────────┬─┬──>
  │├─> 
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

I

S
────> 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) ──────┘ │ └────────────<─────────────────────────────────────<────────────┘

Additional information available:

PAGE_FORMATTHRESHOLDS

number-pagespage-blocksnumber-data-pagesfile-specsnp-pages
extent-pagesextension-options

number-pages
 The number of database pages allocated to the storage area initially.
 Rdb/VMS automatically extends the allocation to handle the loading of
 data and subsequent expansion.  The default is 400 pages.
page-blocks
 The size in blocks of each database page.  Page size is allocated in
 512-byte blocks.  The default is two blocks (1024 bytes).  If your
 largest record is larger than approximately 950 bytes, allocate more
 blocks per page to prevent records from being fragmented.
PAGE_FORMAT
 Specifies whether a storage area contains UNIFORM or MIXED pages.
 You can use the PAGE FORMAT option with multifile databases only.  In
 storage areas with uniform page format, all pages in a specific
 logical area contain records from the same relation.  In storage
 areas with mixed page format, pages can hold records from different
 relations.  The default is uniform.
THRESHOLDS
 Specifies one, two, or three threshold values.  The threshold values
 represent a fullness percentage on a data page and establish four
 possible ranges of guaranteed free space on the data pages.  When a
 data page reaches the percentage defined by a given threshold value,
 the SPAM entry for the data page is updated to reflect the new
 fullness percentage and its remaining free space.

 The default thresholds are 70,85, and 95 percent.  If you specify
 only one or two values, unspecified values default to 100 percent.
 You can specify the THRESHOLDS option only on a storage area for a
 multifile database.  The storage area page format must be MIXED.
number-data-pages
 Specifies the number of data pages between SPAM pages in the physical
 storage area file, and thus the maximum of data pages each SPAM page
 will manage.  The default, and also the minimum interval, is 256 data
 pages.  The first page of each storage area is a SPAM page.  The
 interval you specify determines where subsequent SPAM pages are to be
 inserted, provided there are enough data pages in the storage file to
 require more SPAM pages.

 You can specify the INTERVAL option only on a storage area for a
 multifile database.  The storage area page format must be MIXED.
file-spec
 Provides a separate file specification for the snapshot file.  Do not
 specify a file extension other than SNP to the file specification.
snp-pages
 Specifies the number of pages allocated for the snapshot file.  The
 default is 100 pages.
extent-pages
 Specifies the number of pages of each extent.  The default is 100
 pages.
extension-options
 Specifies the MIN, MAX, and percent growth of each database file
 extent.  Enclose the parameter list in parentheses.

 extension-options =

 ───>  (   ───>  
M

I

N

I

M

U

M
typebox (O)F ──> min-pages ───> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S), ─┐ ┌────────────────────────────────────────┘ └──> 
M

A

X

I

M

U

M
typebox (O)F ──> max-pages ──> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S),─┐ ┌────────────────────────────────────────┘ └──> 
P

E

R

C

E

N

T

G

R

O

W

T

H
typebox (I)typebox (S) ───> growth ────> ) ───>

change-storage-area-clause

 Allows you to modify the extent and snapshot allocation of a storage
 area.  You cannot specify RDB$SYSTEM in the
 change-storage-area-clause.  To change the EXTENT, SNAPSHOT
 ALLOCATION or SNAPSHOT EXTENT for RDB$SYSTEM, specify these
 qualifiers as part of the change-database-options.  When you specify
 these options as part of the change-database-options, they will be
 changed for RDB$SYSTEM but not for any other storage areas.

 change-storage-area-clause =

 ──────>  
C

H

A

N

G

E

S

T

O

R

A

G

E

A

R

E

A
────────> storage-area-name ─────┐ │ ┌──────────────────────────────────<─────────────────────────┘ │ └─┬─┬──────────────────────────────>────────────────────────┬──┬─> │ │ │ │ │ ├─> 
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

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) ─────┘ │ └─────────────────────────────────<──────────────────────────┘

Additional information available:

snp-pagesextent-pagesextension-options

snp-pages

 Specifies the number of pages allocated for the snapshot file.  The
 default is 100 pages.

extent-pages

 Specifies the number of pages of each extent.  The default is 100
 pages.

extension-options

 Specifies the MIN, MAX, and percent growth of each database file
 extent.  Enclose the parameter list in parentheses.

 extension-options =

 ───>  (   ───>  
M

I

N

I

M

U

M
typebox (O)F ──> min-pages ───> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S), ─┐ ┌────────────────────────────────────────┘ └──> 
M

A

X

I

M

U

M
typebox (O)F ──> max-pages ──> typebox (P)typebox (A)typebox (G)typebox (E)typebox (S),─┐ ┌────────────────────────────────────────┘ └──> 
P

E

R

C

E

N

T

G

R

O

W

T

H
typebox (I)typebox (S) ───> growth ────> ) ───>

Additional information available:

min-pagesmax-pagesgrowth

min-pages
 Specifies the minimum number of pages of each extent.  The default is
 100 pages.
max-pages
 Specifies the maximum number of pages of each extent.  The default is
 10,000 pages.
growth
 Specifies the percent growth of each extent.  The default is 20
 percent growth.

DELETE_STORAGE_AREA

 Deletes the named storage area.  You cannot delete the RDB$SYSTEM
 storage area.  You cannot delete a storage area if a storage map
 refers to it, or if there is data in it.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026