Controlling the SAS Embedded Process

The SAS Embedded Process starts when a query is submitted. The SAS Embedded Process continues to run until it is manually stopped or the database is shutdown. You might want to disable or shutdown the SAS Embedded Process without shutting down the database.
The following commands control the SAS Embedded Process.
Action performed
Command (by Teradata version)
Provides the status of the SAS Embedded Process.
CALL SQLJ.SERVERCONTROL ('SAS', 'status', :A); 1
Shuts down the SAS Embedded Process.
Note: You cannot shut down until all queries are complete.
CALL SQLJ.SERVERCONTROL ('SAS', 'shutdown', :A); 1
Stops new queries from being started. Queries that are currently running continue to run until they are complete.
CALL SQLJ.SERVERCONTROL ('SAS', 'disable', :A); 1
Enables new queries to start running.
CALL SQLJ.SERVERCONTROL ('SAS', 'enable', :A); 1
1 Note that the Languagename parameter, 'SAS', is required and must be uppercase. The Cmd parameter (for example, 'status'), must be lowercase.
Here is the sequence of operations to stop and then restart the SAS Embedded Process:
  1. Disable the SAS Embedded Process to stop new queries from being started.
    CALL SQLJ.SERVERCONTROL ('SAS', 'disable', :A);
  2. Query the status of the SAS Embedded Process until the status returns this message: Hybrid Server is disabled with no UDFs running.
    CALL SQLJ.SERVERCONTROL ('SAS', 'status', :A);
  3. Shutdown the SAS Embedded Process.
    CALL SQLJ.SERVERCONTROL ('SAS', 'shutdown', :A);
  4. Perform maintenance on the SAS Embedded Process, for example, install a hot fix or upgrade to a new version.
  5. Enable the SAS Embedded Process.
    CALL SQLJ.SERVERCONTROL ('SAS', 'enable', :A);
  6. Test the SAS Embedded Process. The SAS Embedded Process will start when the next SAS query that uses the SAS Embedded Process is sent to the database.
Last updated: February 9, 2017