METAOPERATE Procedure

Concepts: METAOPERATE Procedure

How PROC METAOPERATE Works

The administrator of the metadata server can perform three types of maintenance with PROC METAOPERATE.
  • Control the metadata server by calling methods in the IServer server interface of SAS Open Metadata Architecture. Use PAUSE, REFRESH, RESUME, STATUS, and STOP.
  • Control a repository by calling methods in the IOMI server interface of SAS Open Metadata Architecture. Use DELETE, EMPTY, and UNREGISTER.
  • Manage server backups. Use REFRESH.

How PAUSE, REFRESH, and RESUME Affect Repositories

Beginning in SAS 9.2, the PAUSE and RESUME actions affect the metadata server, not an individual repository or the repository manager. The REFRESH action is equivalent to a PAUSE action followed by a RESUME action.
The pause state is a property of each repository. However, a repository's pause state is not set directly. It is computed from both the metadata server state and the repository's registered access mode.
  • You can set the metadata server's state with the PAUSE and RESUME actions in PROC METAOPERATE or with SAS Management Console.
  • You cannot set a repository's registered access mode with PROC METAOPERATE. To do so, it is recommended that you use SAS Management Console. Or, you can change the access mode by issuing an UpdateMetadata method call with PROC METADATA. You can determine a repository's registered access mode by issuing a GetRepositories method call with PROC METADATA. For more information, see Get Information about Metadata Repositories.
  • However, notice in the grid below that when you use PROC METAOPERATE to pause the metadata server to an OFFLINE state (which is the default), the repositories are set to an OFFLINE state, regardless of the repositories' registered access mode. For more information about the tasks that require PAUSE, REFRESH, or RESUME actions, see SAS Intelligence Platform: System Administration Guide.
A repository's computed pause state is one of the following:
admin
allows Read and Write access for users with administrative status only.
admin(readonly)
allows Read-Only access for users with administrative status only.
offline
disables all Read and Write access, unloads the repository from memory, and closes the physical files.
online
allows normal access to the repository.
readonly
allows Read-Only access for any user.
The following grid shows how a repository's pause state is computed from the repository's access mode (the rows) and the metadata server's state (the columns). For example, a repository with a registered Read-Only access mode and an ADMIN server state has an admin(readonly) pause state.
How Server State Affects Repository State
Registered Access Mode
Online Server State
Admin Server State
Read-Only Server State
Offline Server State
online
online
admin
readonly
offline
read-only
readonly
admin(readonly)
readonly
offline
administration
admin
admin
admin(readonly)
offline
offline
offline
offline
offline
offline

Using Backup and Recover XML Elements

The SAS 9.3 Metadata Server has the ability to back up and recover itself. Backups are initiated by a dedicated scheduler thread that is started when the metadata server is started. Backups are executed in a dedicated backup thread that is started as needed, so that backups do not interrupt the regular operation of the metadata server. When a server recovery is requested, the recovery process is executed in the backup thread.
The SAS 9.3 Metadata Server is configured with a default backup configuration and backup schedule by SAS 9.3 configuration processes. The default backup schedule performs daily backups at 1 a.m., and writes them to a Backups subdirectory of the MetadataServer directory in your SAS configuration directory. Backups are retained for seven days, and run unassisted unless you want to modify the default backup configuration or backup schedule. The Monday morning backup includes a REORG process that releases unused disk space from repository data sets. The REORG process temporarily pauses the server to an offline state. Therefore, it needs to run when server activity is low. The server backup facility supports ad hoc backups and server recovery with an optional roll-forward capability.
You can modify the default backup configuration and backup schedule in SAS Management Console by opening the Server Backup node in the SAS Management Console Metadata Manager (this is the recommended method), or by using PROC METAOPERATE. You can perform ad hoc backups and request a recovery using both tools.
PROC METAOPERATE supports two options that are not supported in SAS Management Console.
  • an option to rebuild or restart the scheduler thread in case backups are not occurring as scheduled. See ACTION=REFRESH and <SCHEDULER/>.
  • an option to interrupt the recovery process in the event that it stops responding. See ACTION=PAUSE, ACTION=RESUME, and <FORCE/>.
The PROC METAOPERATE <RECOVER/> option supports a ROLL_FORWARD= attribute that enables you to request roll-forward recovery to a specified datetime value. The metadata server log records datetime values in server local time. The ROLL_FORWARD= attribute requires input in GMT time. Backup names contain information that you can use to convert server local time values to GMT time values.
Backups are named with a date-and-time stamp in ISO 8601 format. The ISO 8601 format is a server local datetime value that includes the GMT offset at the end of the string. For example, consider the backup name:
2010-09-20T0_59_59-04_00
The numbers preceding the T are the date: September 20, 2010. The numbers immediately following the T are the server local time (0_59_59). The -04_00 at the end of the time is the GMT offset. In this case, the backup was made just before 1 a.m. server local time. The minus offset indicates that the time value is four hours less than GMT. A timezone that is greater than GMT has a plus offset (+7_00). Use the GMT offset in your backup names to determine how you need to adjust the input value from the server log.
Tip
To avoid having to make the conversion, you can use SAS Management Console to perform recoveries. The SAS Management Console Server Backup Recovery window enables you to specify the roll-forward value in server local or GMT time.
The following table summarizes backup-related tasks that can be performed with PROC METAOPERATE:
Task
ACTION=
OPTION=
change the default backup location, retention policy, or turn off scheduled backups
REFRESH
<BACKUPCONFIGURATION attribute(s)/>
modify the backup schedule
REFRESH
<SCHEDULE EVENT="BACKUP" WEEKDAYn="timevalue"/>
invoke an ad hoc backup
REFRESH
<BACKUP options/>
recover the server from a backup
REFRESH
<RECOVER BACKUPNAME="name" | BACKUPPATH="pathname" options/>
restart the scheduler thread
REFRESH
<SCHEDULER/>
regain control of the metadata server during the recovery process in the event that the recover process stops responding
PAUSE or RESUME
<FORCE/>
Backups are monitored in the Server Backup node of the SAS Management Console Metadata Manager or by using PROC METADATA. For more information, see METADATA Procedure.