Closes an open database. You should always specify the Wait qualifier, unless you are attempting to recover from some failure. When you specify the Wait qualifier, Oracle RMU performs all the auxiliary actions required to close and recover the database clusterwide, and it does not return the system prompt until those actions have been completed. If you use the RMU Close command with the Nowait qualifier, the database must be open on the node where you issue the command. Otherwise, you will receive an error message stating that the database is not known. The system prompt is returned immediately, but it is only an indication that the database will be closed as soon as all other users have finished accessing the database. Therefore, the Wait qualifier is used almost exclusively.
1 – Description
The RMU Close command closes an open database. A database root file is considered open if it has been specified in a previous RMU Open command or has active users attached to it. You can close the database immediately by specifying the Abort qualifier, or you can allow current users to finish their session by specifying the Noabort qualifier. If you have specified manual opening for your database (with the OPEN IS MANUAL clause of the SQL ALTER DATABASE statement), you must use the RMU Open command to manually open the database before any users can invoke it and the RMU Close command to manually close the database. If you have specified automatic opening for your database (with the OPEN IS AUTOMATIC clause of the SQL ALTER DATABASE statement), the RMU Close command affects current database users only. Current processes are detached from the database but they and new processes can immediately reattach to the database. Use the RMU Show Users command to display information about databases currently in use on your node. Use the RMU Dump Users command to display information about databases currently in use on your cluster.
2 – Format
(B)0[m RMU/Close root-file-spec [,...] [4mCommand[m [4mQualifiers[m x [4mDefaults[m x /[No]Abort=option x /Abort=Forcex /[No]Cluster x See description /Path x None /[No]Statistics=Export x /Nostatistics /[No]Wait x /Nowait
3 – Parameters
3.1 – root-file-spec
root-file-spec[,...] An open database root file. The default file extension is .rdb.
4 – Command Qualifiers
4.1 – Abort
Abort=option Noabort Specifies whether to close the database immediately or allow processes to complete. The Abort qualifier has two options. Both refer to OpenVMS system services. The options are as follows: o Forcex When you use the Forcex (forced exit) option, recovery units are recovered and no recovery-unit journal (.ruj) files are left in the directories. Therefore, the RMU Backup command works. The option cannot force an exit of a database process with a spawned subprocess or a suspended or swapped out process. It aborts batch jobs that are using the database. Forcex is the default. o Delprc When you use the Delprc (delete process) option, recovery units are not recovered. The .ruj files are left in the directories to be recovered on the next invocation of the database. The processes and any subprocesses of all database users are deleted, thereby deleting the processes from the database. Therefore, if you attempt to issue an RMU Backup command, you might receive the following error message: %RMU-F-MUSTRECDB, database must be closed or recovered The Delprc and Forcex options are based on OpenVMS system services $DELPRC and $FORCEX. Refer to the OpenVMS documentation set for more information. With the Noabort option, users already attached to the database can continue, and the root file global sections remain mapped in the virtual address file contents until all users exit the database. No new users will be allowed to attach to the database. When all current images terminate, Oracle RMU closes the database.
4.2 – Cluster
Cluster Nocluster Specifying the Cluster qualifier causes Oracle RMU to attempt to close a database on all nodes in a clustered environment that currently have the database open. Specifying the Cluster qualifier is similar to issuing the RMU Close command on every node in the cluster. Specifying the Nocluster qualifier causes Oracle RMU to close a database only on the cluster node from which you issue the RMU Close command. The default is the Cluster qualifier if you specify the Wait qualifier. The default is the Nocluster qualifier if you specify the Nowait qualifier. The following list describes the behavior of the command when you use various combinations of the [No]Cluster and [No]Wait qualifiers together in the same command line: o Cluster and Wait When you specify the Cluster and Wait qualifiers, the RMU Close command closes the database on every node in the cluster, even if the database is not opened on the node from which the command is issued. Because you specified the Cluster and Wait qualifiers, the RMU Close command closes and recovers the database on every node in the cluster before the DCL prompt is returned to you. o Cluster and Nowait When you specify the Cluster and Nowait qualifiers, the RMU Close command attempts to close the database on every node in the cluster. If the database is not opened on the node from which the Oracle RMU command is issued, the command cannot close the database on any node, and you receive the following error message: %RDMS-F-CANTCLOSEDB, database could not be closed as requested -RDMS-F-DBNOTACTIVE, database is not being used %RMU-W-FATALERR, fatal error on DISK1:[USER1]DATABASE.RDB;1 Because you used the Nowait qualifier, the database might not yet be closed on one or more nodes when the DCL prompt is returned to you. When you specify the Nowait qualifier, you can receive SYS-F-ACCONFLICT errors when you attempt to access a database after you have issued the RMU Close command with the Cluster and Nowait qualifiers and the DCL prompt has been returned, but the monitor has not yet closed the database on all nodes in the cluster. o Nocluster and Wait This combination provides the ability to have database shutdown complete on the local node before Oracle RMU returns to the DCL prompt. o Nocluster and Nowait When you specify the Nocluster and Nowait qualifiers, Oracle RMU closes the database only on the node from which you issue the command, regardless of whether or not the database is open on other nodes. Because you used the Nowait qualifier, the database might not yet be closed on the node from which you issued the command when the DCL prompt is returned to you. With the Nowait qualifier, you can receive SYS-F-ACCONFLICT errors when you attempt to access a database after you have issued the RMU Close command with the Cluster and Nowait qualifiers and the DCL prompt has been returned, but the monitor has not yet closed the database on all nodes in the cluster.
4.3 – Path
Specifies the full or relative data dictionary path name in which the definitions reside for the database you want to close. The Path qualifier is a positional qualifier. Positional qualifiers operate on specific parameters based on the placement of the qualifiers in the command line. The path name cannot include wildcard characters.
4.4 – Statistics=Export
Statistics=Export Nostatistics Specifies that statistic information is to be saved when the database is closed. The default is Nostatistics, which indicates that statistic information is not preserved when the database is closed. Clusterwide statistic information is not stored in the statistic file, which allows you to decide on which nodes the statistic information should be initially loaded when the database is opened. The statistic information is stored in a node-specific database file located in the same directory as the database root file. The file has the same name as the root-file-spec, with a default file extension of .rds. Because the statistic files contain node- specific information, they cannot be renamed or copied. They can be deleted if they are no longer needed. The Statistics=Export qualifier cannot be specified in conjunction with the Cluster qualifier. To preserve the statistics information for a database open on a cluster, you must specifically close the individual nodes. The RMU Backup command does not save the statistics files. They are considered temporary files and not part of the database.
4.5 – Wait
Wait Nowait Specify the Wait qualifier to cause Oracle RMU to close and recover the database before the system prompt is returned to you. The default is the Nowait qualifier. With the Nowait qualifier, the database might not be closed when the system prompt is returned to you. You can receive errors when you attempt to access a database after you issued the RMU Close command and the system prompt is returned, but before the monitor has closed the database. See the Usage Notes for restrictions on using the Wait qualifier.
5 – Usage Notes
o To use the RMU Close command for a database, you must have the RMU$OPEN privilege in the root file access control list (ACL) for the database or the OpenVMS WORLD privilege. o To use the Wait qualifier, Oracle RMU requires that the database be recoverable for correct operation. It must be possible to attach to the database on a node where it is opened. There are database recovery failures that preclude further attaches to the database. When such a failure occurs, any attempt to attach to the database (for example, with an SQL ATTACH statement) causes the process to be deleted from the system. In other words, you are logged out. In this situation, the RMU Close command with the Wait qualifier has the same effect as the RMU Close command with the Cluster and Nowait qualifiers. The operation does not wait, and it does not close the database unless it is opened on the node from which you issue the Oracle RMU command. If you encounter this situation, enter the following command from a node on which the database is open to close the database: $ RMU/CLOSE/CLUSTER/NOWAIT/ABORT=DELPRC
6 – Examples
Example 1 When you issue the following command from a node in a cluster, the Cluster qualifier shuts down the database for the entire cluster, even if no users are on the node from which you issued the command. The Wait qualifier causes Oracle RMU to close the database before the system prompt is returned. $ RMU/CLOSE/CLUSTER/WAIT MF_PERSONNEL.RDB Example 2 The following command closes the mf_personnel database in the [.WORK] directory, all the databases in the [.TEST] directory, and the databases specified by the path names CDD$TOP.FINANCE and SAMPLE_DB: $ RMU/CLOSE DISK1:[WORK]MF_PERSONNEL, CDD$TOP.FINANCE/PATH, - _$ DISK1:[TEST]*, SAMPLE_DB/PATH