Command Line Interface Utilities : psc
 
psc
Description
Psc stands for PSQL service controller. This tool retrieves and sets control information about PSQL services.
You must have administrator authority to run psc.
Synopsis
psc < start | stop | restart | query | getpolicy > servicename
or
psc setpolicy servicename < automatic | manual | disabled >
Options
A service specifies the name of a program, routine, or process that performs a specific system function to support other programs, particularly at a low level (close to the hardware). Servicename specifies the name given to the service key in the registry. Note that service key name may differ – and in most cases does differ – from the service display name.
The options described below are case-insensitive.
start
Starts a PSQL service running
stop
Terminates the running of a PSQL service
restart
Terminates the running of a PSQL service then starts the service running again
query
Specifies whether servicename is running or not
getpolicy
Retrieves the type of startmode (automatic, manual, or disabled) associated with servicename
setpolicy
Sets the type of startmode (automatic, manual, or disabled) associated with servicename
automatic
The service starts automatically when the operating system starts
manual
The service must be started manually after the operating system starts
disabled
The service is disabled and does not start after the operating system starts
Examples
To start the Workgroup Engine service manually:
psc start psqlWGE
To start the Cache Engine service manually:
psc start psqlCE
To stop, then restart the PSQL transactional and relational services:
psc restart psql.all
Note that psql.all is a shortcut method available only with psc. It affects both the PSQL transactional and relational services and can be used with the psc parameters start, stop, or restart.
Return Codes
The psc tool returns the following codes (DOS ERRORLEVEL) for the state of the service after the command has been run.
String
Value
BTI_SERVICE_ACCESS_DENIED
32775
BTI_SERVICE_ALREADY_RUNNING
32778
BTI_SERVICE_CANNOT_ACCEPT_CTRL
32779
BTI_SERVICE_CONTINUE_PENDING
32772
BTI_SERVICE_DATABASE_LOCKED
32780
BTI_SERVICE_DEPENDENCY_DELETED
32783
BTI_SERVICE_DEPENDENCY_FAIL
32784
BTI_SERVICE_DISABLED
32782
BTI_SERVICE_DOES_NOT_EXIST
32785
BTI_SERVICE_DUP_NAME
32776
BTI_SERVICE_EXISTS
32786
BTI_SERVICE_INVALID_CTRL
32789
BTI_SERVICE_INVALID_NAME
32777
BTI_SERVICE_MARKED_FOR_DELELE
32790
BTI_SERVICE_NOT_ACTIVE
32787
BTI_SERVICE_PAUSE_PENDING
32773
BTI_SERVICE_PAUSED
32774
BTI_SERVICE_REQUEST_TIMEOUT
32788
BTI_SERVICE_RUNNING
32771
BTI_SERVICE_START_PENDING
32769
BTI_SERVICE_STOP_PENDING
32770
BTI_SERVICE_STOPPED
32768