Switching between IDS Operating Modes

The IDS instance can be switched to different operating modes thru the oninit and onmode utilities as well as the SQL Admin API. This allows the flexible integration of IDS as part of an application solution. User root and informix are authorized to change IDS operating modes. The recommendation is to perform those tasks exclusively as informix rather than root.

Please make sure that the necessary environment settings are active.

Startup IDS

An IDS instance is started by executing the oninit utility:

  • oninit

You might add the verbose option (-v) in order to get a detailed summary of the individual tasks that the IDS data server passes during startup:

  • oninit -v

Do not use the -i option during startup. This option must be only used once during first time initialization of the IDS instance !!

Starting the IDS instance thru the SQL Admin API is not supported because the SQL Admin API needs access an already running IDS instance.

Shutdown IDS

Shutting down the IDS instance can be performed thru the onmode utility or the SQL Admin API:

  • onmode Utility
    • onmode -ky
  • SQL Admin API
    • execute FUNCTION sysadmin:task('onmode', 'k');

Startup/Shutdown in a single step

If you want to combine stopping and starting the IDS instance, you can take advante of the && shell mechanism:

  • onmode -ky && oninit -v

Quiescent Mode

Only user root and informix can access an IDS instance in quiescent mode, normal users are defeated. Backups or onchecks are allowed in quiescent mode. However you can also perform them in online mode as IDS supports online backups since the beginning.

There is no SQL access possible in quiescent mode.

Offline to Quiescent

  • oninit Utility
    • oninit -s
  • SQL Admin API
    • not supported

Quiescent to Offline

  • onmode Utility
    • onmode -ky
  • SQL Admin API
    • not supported

Quiescent to Online

  • onmode Utility
    • onmode -m
  • SQL Admin API
    • not supported as no SQL connections are allowed in quiescent mode

Online to Quiescent

  • onmode Utility
    • onmode -uy
  • SQL Admin API
    • execute FUNCTION sysadmin:task('onmode', 'u');

This will immediately kill all attached database sessions and switches the IDS instance to quiescent mode.

If you prefer a graceful shutdown, which switches to quiescent mode not until all attached sessions disconnected from the IDS instance, you can use these options:

  • onmode Utility
    • onmode -sy
  • SQL Admin API
    • execute FUNCTION sysadmin:task('onmode', 's');

Administration Mode

The administration mode - sometimes also referred to as single-user mode - is similar to the quiescent mode. The important difference is that the IDS instance can be accessed via SQL by user informix and other authorized users in this mode.

Authorized users can be specified thru the ADMIN_MODE_USERS onconfig parameter or thru the -U option of the oninit and onmode utilities. As a requirement you need to set the onconfig parameter ADMIN_USER_MODE_WITH_DBSA to 1, otherwise only user informix is able to connect to the IDS instance in administration mode.

Offline to Single-user

  • oninit Utility
    • oninit -j
  • SQL Admin API
    • not supported

Single-User to Offline

  • onmode Utility
    • onmode -ky
  • SQL Admin API
    • execute FUNCTION sysadmin:task('onmode', 'k');

Single-User to Online

  • onmode Utility
    • onmode -m
  • SQL Admin API
    • execute FUNCTION sysadmin:task('onmode', 'm');

Online to Single-User

  • onmode Utility
    • onmode -jy
  • SQL Admin API
    • execute FUNCTION sysadmin:task('onmode', 'j');

Determining Operation Mode via onstat

The current operating mode can be checked via the onstat - command:

  • IBM Informix Dynamic Server Version 11.10.FC1DE   -- On-Line -- Up 2 days 10:14:15 -- 46552 Kbytes
    

Beside showing the current operating mode the onstat - command delivers also a returncode which can be used in scripts:

  • onstat -
  • IBM Informix Dynamic Server Version 11.10.FC1DE   -- On-Line -- Up 2 days 10:14:15 -- 46552 Kbytes
  • echo $0
  • 5

The different IDS operating modes and their respective onstat - returncodes:

IDS Operating Mode 'onstat -' Returncode
Off-Line -1 (255)
Initializing 0
Ouiescent 1
Fast Recovery 2
Backup 3
Shutting Down 4
On-Line 5
Abort 6
Single User 7

Credits go to Prasad Mujumdar from IBM for providing this information.

Closure

Further Information

 
idsdev/admin/modes.txt · Last modified: 2007/11/19 13:51 by eherber     Back to top