The onshutdown script

Use the onshutdown script to automate shutting down the database server. The script attempts to shut down the server normally. If the server has not shut down after a specified time, the script forces the server to shut down.

Syntax

The onshutdown script first runs the onmode -ky command. After a specified wait time, the script runs the onclean -ky command.

On UNIX and Linux, you must be user root or informix to run the onshutdown script. On Windows, you must be in the Informix-Admin group to run the onshutdown script.

Read syntax diagramSkip visual syntax diagram
                   (1)                   
>>-+-onshutdown.sh------+--+---------+-------------------------><
   |                (2) |  '-timeout-'   
   '-onshutdown.bat-----'                

Notes:
  1. UNIX
  2. Windows
Table 1. Syntax Elements of the onshutdown Script
Element Purpose
timeout The number of seconds after the onmode -ky command has been run before running the onclean -ky command.

Must be a positive integer from 10 to 60. The default value is 30 seconds.

Usage

Use the onshutdown script only when forcing the database server to shut down would be appropriate.

Attention: Use the onshutdown script with caution. If the script needs to run the onclean -ky command, any pending transactions and processes fail to complete, and user sessions are disconnected abruptly. However, the database server rolls back transactions when it restarts.

The INFORMIXDIR, INFORMIXSERVER, INFORMIXSQLHOSTS, and ONCONFIG environment variables must be set with valid values to run this utility.

You can only use the onshutdown script to shut down the local database server; you cannot use it to shut down a remote database server. The onshutdown script should not be used to shut down an entire high-availability cluster or a remote database server instance.

The onshutdown script has a 10 second time period during which it can be aborted.


Copyright© 2019 HCL Technologies Limited