Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

More

Format

Examples

file-spec

path-name

WITH clause

FOR clause

RDB/VMS Relational Database Operator CLOSE — VMS RDB_3.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.

 Digital Equipment Corporation recommends that you use the RMU/CLOSE
 command instead of the RDO statement CLOSE.

 Example:

 RDO>  CLOSE FILE 'DISK2:[CORP]PERS'

Additional information available:

MoreFormatExamples

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 not specify the WITH EXIT or WITH DELETION option, Rdb/VMS
 waits for active users to terminate their sessions with an explicit
 or implicit FINISH statement, then the database is closed.

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).

 A user whose process is swapped out is not forced out by the WITH
 EXIT option because the user is not considered active.  Therefore,
 sometimes the WITH DELETION option is necessary to remove all active
 users.

 If the FOR CLUSTER and WITH DELETION options are both specified, the
 processes of all active users throughout the VAXcluster will be
 immediately deleted.

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

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