Previous Page | Next Page

Server Control (IServer Interface)

Pause

Temporarily limits the availability of the SAS Metadata Server.

Category: Server control methods


Syntax

rc=Pause(options);

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 it did, RC=1 means it did not.
options C in
<PAUSECOMMENT>

Used with the <SERVER> element, this option enables administrators to set a free-form text comment that is retrieved with server status queries.

<REPOSITORY>

Deprecated in SAS 9.2.

<SERVER State="value"/>

Specifies to limit the availability of the SAS Metadata Server and the desired server state. See the "Details" section for more information.


Details

A user must have administrative user status on the SAS Metadata Server to issue the Pause method.

The Pause method is issued on a running SAS Metadata Server to temporarily change the server to a more restrictive state. A running SAS Metadata Server supports three states:

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

New in SAS 9.2. Indicates the SAS Metadata Server is available for reading and writing, but only to users who have administrative user status on the SAS Metadata Server. The server is unavailable to other users.

OFFLINE

Indicates the SAS Metadata Server is running, but is temporarily unavailable to all users.

The <SERVER> element is specified as follows:

<SERVER State="ADMIN|OFFLINE"/>

The State attribute specifies the state to apply to the SAS Metadata Server.

If the Pause method is issued without options, the SAS Metadata Server changes to an OFFLINE state. To change the server to an ADMIN state, you must specify <SERVER State="ADMIN"/> when you issue the method.

The <PAUSECOMMENT> element can be used with the <SERVER> element to enable administrators to set a free-form text comment 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 state of the SAS Metadata Server is obtained by issuing the Status method. For more information, see Status. The <PAUSECOMMENT> element can be added to any exception returned by a method that rejects a user request because of a paused status.

A paused SAS Metadata Server is returned to the ONLINE state by issuing the Resume method. Resume clears the text in the <PAUSECOMMENT> element. When a paused SAS Metadata Server is stopped and restarted, it restarts in an ONLINE state. A server pause is not persisted between server sessions.

In SAS 9.2, the Pause method can no longer 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.


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

Previous Page | Next Page | Top of Page