• No results found

Using Scripts to Operate SAS Servers Individually

In document SAS 9.3 Intelligence Platform (Page 79-83)

About Using Scripts to Operate Servers

The configuration directory for each SAS server and spawner contains a script that enables you to operate the server or spawner individually from a command line.

On Windows machines, depending on the options that were selected during installation, the SAS Deployment Wizard might have also added shortcuts to your Start menu to enable you to start, stop, pause and resume servers and spawners.

On UNIX and z/OS systems, you can use the sas.servers script to start and stop servers with a single command. For more information, see “Using the sas.servers Script on UNIX or z/OS to Start or Stop All Servers” on page 59. On z/OS systems, SAS recommends operating servers as started tasks. See “Starting and Stopping SAS Servers on z/OS” on page 58.

For information about the start-up parameters for each server, see the documentation references that are provided in “Summary of Procedures for Server Operation” on page 55.

Note: If you need to customize a server script, do not directly update the script. Instead, add your customizations to the corresponding file that is named

server-name_usermods_.bat or server-name_usermods.sh. Use of these files prevents your customizations from being overwritten when a new SAS release is installed.

Use Individual Scripts to Operate the SAS Metadata Server, SAS Object Spawner, SAS OLAP Server, and SAS SAS Framework Data Server

You can use scripts to start, stop, pause, or resume the metadata server, an object spawner, an OLAP server, or a framework data server from the DOS command line, the UNIX console, or the z/OS console. The scripts also enable you to install or remove a server or spawner as a Windows service and to display the server or spawner's current status.

Note: The following

• The metadata server must be running before you can start an object spawner or an OLAP server.

• Before using scripts to operate the metadata server, see “About SAS Metadata Server States” on page 78.

Follow these steps:

1. On Windows, log on as a user who is a member of the host operating system's Administrators group. On UNIX or z/OS, log on as the SAS Installer user (for example, sas).

2. Use one of the following scripts, which are located in the path SAS-configuration-directory/Lev1:

Using Scripts to Operate SAS Servers Individually 63

Table 5.4 Scripts for Operating Servers and Spawners Server or Spawner Script Name and Location SAS Metadata

SAS object spawner Windows: ObjectSpawner\ObjectSpawner.bat UNIX and z/OS: ObjectSpawner/ObjectSpawner.sh SAS OLAP Server Windows: SASApp\OLAPServer\OLAPServer.bat**

UNIX and z/OS: SASApp/OLAPServer/OLAPServer.sh**

SAS Framework

* In single-machine installations that were migrated from SAS 9.1.3, the directory name might be SASMain instead of SASMeta.

** Your installation might have a different name for the SASApp directory.

You can use any of the following arguments with these scripts:

Note: The hyphen in front of each argument is optional.

-install

installs the server or spawner as a Windows service.

-remove

removes the server or spawner service from Windows.

-start

starts the server or spawner.

Note: Before you start the object spawner or the OLAP server, make sure that the metadata server is running.

-stop

completely stops the server or spawner.

Note:

• Stopping the metadata server stops other components, including object spawners, OLAP servers, SAS/CONNECT spawners, and SAS/SHARE servers.

• Before you stop an OLAP server, you should first stop the active sessions, as follows:

1. In SAS Management Console, expand the Monitoring node and the SAS OLAP Server Monitor node.

2. Right-click the name of the logical SAS OLAP Server, and select Connect.

3. In the dialog box that appears, enter your user name and password and click OK.

64 Chapter 5 • Operating Your Servers

4. Right-click the name of each session that you want to close, and select Close Session.

-restart

stops and then starts a running server or spawner.

-pause

causes the server or spawner to finish processing all active client sessions and to stop accepting new requests.

When this option is used with the metadata server, the server is placed in the Offline state.

-resume

resumes the server or spawner process when it is in the paused state.

When this option is used with the metadata server, the server is returned to the Online state if the current state is Offline or Administration.

-status

displays the current status of the server or spawner.

The metadata server script has two additional options:

-backup

uses the metadata server’s backup facility to copy all of your metadata repositories, the repository manager, and the contents of the metadata server's configuration directory to the configured backup location. The backup process executes in a separate thread while the metadata server is running. Therefore, the server does not need to be paused. For more information, see “Backing Up and Recovering the SAS Metadata Server” on page 167.

CAUTION:

For production backups, it is highly recommended that you follow the best practices that are provided in this guide. See “Best Practices for Backing Up and Restoring Your SAS Content” on page 155.

-optimizeIMDB

optimizes the usage of memory on the metadata server. This option analyzes the handling of character variables, checking for items such as unnecessary indexes, long character variables that can be stored as variable-length strings, and duplicate strings.

To apply the results of the analysis, you must pause and resume (or restart) the server after executing this command option. For more details, see “Using optimizeIMDB to Optimize and Report on Metadata Server Memory Usage” on page 197.

Use Individual Scripts to Operate the SAS/CONNECT Spawner, SAS/SHARE Server, and SAS Deployment Tester Server

To use an individual script to operate the SAS/CONNECT spawner, SAS/SHARE server, and SAS Deployment Tester server, follow these steps:

1. On Windows, log on as a user who is a member of the host operating system's Administrators group. On UNIX and z/OS, log on as the SAS Installer user (for example, sas).

2. Use one of the following scripts, which are located in the path SAS-configuration-directory/Lev1 (your installation might have a different name for SASApp subdirectory):

Using Scripts to Operate SAS Servers Individually 65

Table 5.5 Scripts for Operating Servers and Spawners Server or Spawner Script Name and Location SAS/CONNECT

spawner

Windows: SASApp\ConnectServer.bat UNIX and z/OS: SASApp/ConnectServer.sh SAS/SHARE server Windows: SASApp\ShareServer.bat

UNIX and z/OS: SASApp/ShareServer.sh SAS Deployment

Tester server

Windows: DeploymentTesterServer

\DeploymentTesterServer.bat UNIX and z/OS:

DeploymentTesterServerDeploymentTesterServe r.sh

You can use any of the following arguments with these scripts:

Note: The hyphen in front of each argument is optional.

-install

installs the server or spawner as a Windows service.

-remove

removes the server or spawner service from Windows.

-start

starts the server or spawner.

-stop

stops the server or spawner.

-restart

restarts the server or spawner.

-status

displays the current status of the server or spawner.

See Also

Communications Access Methods for SAS/CONNECT and SAS/SHARE

SAS/SHARE User's Guide

• “Using the Deployment Tester” on page 89

Starting or Stopping the SAS Services Application (Remote Services)

The SAS Services Application deploys a set of services called Remote Services that are used by the SAS Information Delivery Portal, the SAS Stored Process Web application, and other Web applications. This application must be started before you start your Web application server. To start the SAS Services Application:

1. Make sure that the metadata server is running.

66 Chapter 5 • Operating Your Servers

2. On Windows, log on as a user who is a member of the host operating system's Administrators group. On UNIX and z/OS, log on as the SAS Installer user (for example, sas).

3. Use one of the following scripts:

On Windows: SAS-configuration-directory\Lev1\Web\Applications

\RemoteServices\RemoteServices.bat

On UNIX or z/OS: SAS-configuration-directory/Lev1/Web/Applications/

RemoteServices/RemoteServices.sh

You can use any of the following arguments with these scripts:

Note: The hyphen in front of each argument is optional.

-install

installs Remote Services as a Windows service.

-remove

removes the Remote Services service from Windows.

-start

starts Remote Services.

-stop

stops Remote Services.

-restart

restarts Remote Services.

-status

displays the current status of Remote Services.

Using SAS Management Console to Operate SAS

In document SAS 9.3 Intelligence Platform (Page 79-83)