space
Previous Page | Next Page

Creating the SAS/SHARE Server Environment

Windows: Creating the Server Environment


SAS/SHARE Server Can Run as a Windows Service

You can configure a SAS/SHARE server as a Windows service, which enables the automatic start-up of the server when the Windows operating environment is started.

To configure a SAS/SHARE server as a Windows service, use the SAS Service Configuration Utility (SAS SCU), which is shipped with Base SAS for Windows. For information about using SAS SCU, see the online Help that is provided with the utility.

Note:   The complete instructions for installing and using the SAS SCU are provided in the document "Installation Instructions for 9.2 of the SAS System for Microsoft Windows," which is included with the software.  [cautionend]


Using SAS SCU to Install a SAS/SHARE Server as a SAS Service

Configure the Server Service using these steps:

  1. Start the SAS Service Configuration Utility (SAS SCU): Start [arrow] Programs [arrow] your- SAS- System- folder [arrow] SAS Service Configuration Utility

  2. In the SAS SCU window, click the Install tab and complete the following fields:

    [untitled graphic]

    Service Name

    is used to create the service name as recorded in the Windows registry.

    Display Name

    is used to create the service name that is displayed in the Windows Service Control Manager. In the example, the server ID SHR1 is included to make it easier to identify among the multiple SAS/SHARE servers that might be configured.

    Start Type

    is used to specify whether the server is started automatically or manually. Automatic causes the SAS/SHARE server to start automatically when the Windows operating environment is started. Select Manual to enable the service to be started and stopped by an administrator using the Windows Service Control Manager.

    Service Path

    identifies the SAS invocation command line to be executed with corresponding system options for server-specific behavior. The following is an example of a service path specification:

    C:\Program Files\SAS\SAS System\9.1\sas.exe
     -noterminal -logparm "write=immediate" -sysin "C:\shr1.sas"
     -log "C:\shr1%W.log" -logparm "rollover=auto"

    C:\Program Files\SAS\SAS System\9.1\sas.exe

    identifies the SAS executable.

    -noterminal

    prevents interaction with the console.

    -logparm "write=immediate"

    writes messages to the server log immediately (without buffering).

    -sysin "C:\shr1.sas"

    specifies a batch file to start the SAS/SHARE server. The file shr1.sas contains the following SAS program:

    %let tcpsec=_secure_;
    proc server id=shr1 authenticate=required;
    run;

    The PROC SERVER statement starts the SAS/SHARE server SHR1. The TCPSEC=_SECURE_ system option and the AUTHENTICATE=REQUIRED option specify that each client must be authenticated before accessing the server.

    For more information about the TCP/IP access method, see Windows: TCP/IP Method in Communications Access Methods for SAS/CONNECT and SAS/SHARE.

    -log "C:\shr1%W.log"

    directs all log messages to the log file that is named by replacing %W with the current numeric week of the year. For example, shr102.log identifies a log that was generated during the second week of the year.

    -logparm "rollover=auto"

    if the pathname of the log file changes (for example, when %W is used to name weekly logs), the log is automatically saved in the current file, and a new file is opened to store the new content.

    For more information, see the LOG System Option and SYSIN System Option in the SAS Companion for the Microsoft Windows Environment and the LOGPARM= System Option and TERMINAL System Option in SAS Language Reference: Dictionary.
    Dependencies

    specifies a list of Windows services, which will be started before the SHARE server service.

  3. In the SAS SCU window, click the Account tab and complete the following fields:

    [untitled graphic]

    This Account

    specifies a valid Windows user account that the service will run under. The value for this field should be in the format Domain\Account. For example, CORPSALES\ServAcct.

    Password

    specifies a valid password for the user account that is specified in the This Account field.

    Confirm Password

    confirms the value that you entered in the Password field.

  4. In the SAS SCU window, click the Install tab again and select Install.

    A message window appears and confirms that the service was installed successfully.

    Click OK to close the message window.

  5. Click OK in the SAS Service Configuration Utility window to complete the configuration and installation of the service.

Note:   To start the SAS/SHARE server service either manually or automatically, the account that you specified in the This Account field on the Account tab must be assigned the Log on as a service and Act as part of the operating system rights.

The administrative interface that is used to assign user rights is dependent on the version of Windows that you are using. See the documentation for your Windows operating environment for instructions about assigning user rights.  [cautionend]


Starting and Stopping a Service


Using the Windows Services Utility

From the Services utility in the Windows Control Panel, you can monitor Windows services, including the SAS/SHARE server service that you set up by using the SAS SCU.

To start or stop a service, click Start or Stop, as appropriate.

[untitled graphic]


Using DOS Commands

You can also start or stop a service by using commands at a DOS prompt.

To start a service, type NET START service-name , where service-name is the name of the service that you want to start.

To stop a service, type NET STOP service-name , where service-name is the name of the service that you want to stop.


Removing or Changing an Installed SAS/SHARE Server Service


Removing the Service

To remove the server service:

  1. If the service is active, stop the service by using one of the methods described in Starting and Stopping a Service.

  2. Start the SAS Service Configuration Utility (SAS SCU):Start [arrow] Programs [arrow] your-SAS-System-folder [arrow] SAS Service Configuration Utility.

  3. In the SAS SCU window, click the Remove tab. Click the down arrow under Choose the installed SAS service you want to remove and select the service that you want to remove.

  4. Click Remove.


Changing the Service

To change the configuration for a service, remove the service and install it again.

space
Previous Page | Next Page | Top of Page