RDB/VMS Relational Database Operator CLOSE — VMS CDD+_4.1A
Controls the process of eliminating active users in a specific
database. The CLOSE options control whether access to the database
is curtailed for users on a single node or for users on all nodes in
a VAXcluster environment.
Example:
RDO> CLOSE FILE 'DISK2:[CORP]PERS'
Additional information available:
More
Note that users with sufficient privilege (ADMINISTRATOR, VMS SYSPRV, or BYPASS) can still enter an explicit OPEN statement to open the database. If you do enter the WITH EXIT or WITH DELETION option, the default is to close the database through attrition for all active users.
Format
CLOSE ──┬──>
F
I
L
E
N
A
M
E file-spec ──┬────>──┐ └──>
P
A
T
H
N
A
M
E path-name ──┘ │ ┌──────────────────────<───────────────┘ └────┬───────────────>─────────────────┬─┐ └──>
W
I
T
H ──┬──>
E
X
I
T ──────┬──>──┘ │ └──>
D
E
L
E
T
I
O
N ──┘ │ ┌──────────────────<─────────────────────┘ └────┬───────────────>─────────────────┬───────> └──>
F
O
R ───┬──>
N
O
D
E ──────┬──>──┘ └──>
C
L
U
S
T
E
R ───┘
Additional information available:
file-specpath-nameWITH clauseFOR clause
file-spec
The VMS file specification for the database you want to close.
path-name
The full or relative data dictionary path name in which the definitions reside for the database you want to close.
WITH clause
Determines whether all active users will be immediately forced off the specified database (WITH EXIT) or whether the processes of all active users for the specified database will be immediately deleted (WITH DELETION).
FOR clause
Determines whether the CLOSE statement affects active users of the specified database on this VAX node only (FOR NODE) or for all nodes in the VAXcluster (FOR CLUSTER).
Examples
Example 1
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 with the database.
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 (such as 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 2
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 his or her node
o Or, the CHANGE DATABASE ... OPEN IS AUTO statement is executed
by a user with sufficient privilege from any node in the
VAXcluster