Pause

Short Description

Temporarily limits the availability of the SAS Metadata Server.

Category

Server control methods

Syntax

rc=Pause(options);
Method Parameters
Parameter
Type
Direction
Description
rc
N
out
Return code for the method. Indicates whether the SAS Metadata Server ran the method call. RC=0 means that it did, RC=1 means that it did not.
options
C
in
<FORCE/>
Regains control of the SAS Metadata Server in the unlikely event that it does not respond during recovery processing.
<PAUSECOMMENT>
Enables administrators to set a free-form text comment that is retrieved with server status queries.
<REPOSITORY>
Deprecated.
<SERVER STATE="value"/>
Specifies to change the availability of the SAS Metadata Server to the specified server state. Valid values are ADMIN, READONLY, or OFFLINE. If a STATE value is not specified, or the <SERVER> option is omitted from the Pause request, the default value is <SERVER STATE="OFFLINE"/>.

Details

The Pause method is issued on a running SAS Metadata Server to temporarily change the server to a more restrictive state.
A user must have administrative user status on the SAS Metadata Server to issue the Pause method.
The Pause method cannot be used to limit the availability of specific metadata repositories. To limit a metadata repository's availability, use the UpdateMetadata method to change the value in the repository's Access attribute. If a Pause method is issued that specifies the <REPOSITORY/> option, the SAS Metadata Server returns an error.
A running SAS Metadata Server supports six states in SAS 9.3:
ONLINE
This is the normal state of a running SAS Metadata Server. It indicates the server is available for reading and writing to all users.
ADMIN
The SAS Metadata Server is available for reading and writing, but only to users who have administrative user status on the SAS Metadata Server.
READONLY
The SAS Metadata Server is available for reading only to all users (new in SAS 9.3).
ADMIN(READONLY)
The SAS Metadata Server is available for reading only, to administrative users of the server (new in SAS 9.3).
RECOVERY
The SAS Metadata Server is unavailable for reading or writing to all users, except the recovery process (new in SAS 9.3).
OFFLINE
The SAS Metadata Server is running, but is temporarily unavailable to all users.
The ADMIN, READONLY, and OFFLINE states are set with the Pause method.
The ADMIN(READONLY) and RECOVERY states are set by internal server recovery processes. The SAS Metadata Server is set to and remains in the RECOVERY state until the recovery process successfully completes. After a successful recovery, the server is returned to whatever state it was in when the recovery was requested. A server backup is performed with the server in that state. In the unlikely event the server fails to respond during the recovery process, administrators can use the Pause method with the <FORCE/> option to regain control of the server. By default, <FORCE/> changes the server to an OFFLINE state. The <FORCE/> option should be used with the <SERVER STATE="ADMIN"/> option to enable administrators to examine the server before making it available to clients. When the server is in the RECOVERY state, Pause requests are rejected. The ADMIN(READONLY) state is set by internal server recover processes that fail if the server was in a READONLY state when the recovery was started. From this state, administrators can troubleshoot the failure before making the server available to clients.
When the server has been changed to another state by the Pause method or by internal server recovery processes, the Resume method must be used to return the server to an ONLINE state. For more information, see Resume.
The <PAUSECOMMENT> element enables administrators to set a free-form text comment along with the Pause action that is retrieved with server status queries. The <PAUSECOMMENT> element is specified as follows:
<PauseComment>This is a test of the Pause method. </PauseComment>
The <PAUSECOMMENT> element can be added to any exception returned by a method that rejects a user request because of a paused status. Resume clears the text in the <PAUSECOMMENT> element.
When a paused SAS Metadata Server is stopped and restarted, it restarts in an ONLINE state. Neither a server pause, nor <PAUSECOMMENT>, is persisted between server sessions.
The state of the SAS Metadata Server is obtained by issuing the Status method. For more information, see Status.

Examples

The following example pauses the SAS Metadata Server to an OFFLINE state:
<!-- Pause the server to OFFLINE  -->
options=' ';
rc=serverObject.Pause(options);
OFFLINE is the default value when the Pause method is issued without options specified.
The following example pauses the SAS Metadata Server to an ADMIN state:
<!-- Pause the server to ADMIN  -->
options='<Server State="ADMIN"/>';
rc=serverObject.Pause(options);
The following example shows how the <PAUSECOMMENT> element is used:
<!-- Pause the server to OFFLINE with a comment  -->
options='<PauseComment>This is a test of the Pause method.  Client 
activity on the SAS Metadata Server will be resumed shortly.</PauseComment>';
rc=serverObject.Pause(options);