Changing database server operating modes

Use the oninit and onmode utilities to change from one database server operating mode to another. Use the ADMIN_MODE_USERS configuration parameter to specify which users can connect to the server in administration mode.

Windows only: In Windows, the database server runs as a service. Windows provides a service control application (also called the Services tool) to start, stop, and pause a service. The service control application is located in the Control Panel program group. The service name for the database server includes the database server name (the value of DBSERVERNAME in the onconfig file). For example, the HCL Informix® service for the newyork database server is:
IBM Informix Database Server - newyork

To change mode with the Services tool, start the tool and select the database server service. Then choose the appropriate option in the Services window. The tables shown later in these topics explain which option you select for each mode.

To start and stop the database server, you can use other Windows tools, such as the NET command and the Server Manager tool. For more information about these methods, consult your Windows operating-system documentation.

Tip: After you change the mode of your database server, run the onstat command to verify the current server status.

You can change database server modes in the following ways:

Change from offline to quiescent mode
When the database server changes from offline mode to quiescent mode, the database server initializes shared memory. Only administrators can access the database server to perform maintenance functions that do not involve the execution of SQL and DDL statements.
UNIX: Run the oninit -s command.
Windows: On the command line, use the starts dbservername -s command.
Change from offline to online mode
When you move the database server from offline to online mode, the database server initializes shared memory and is available for all user sessions.
UNIX: Run the oninit command.
Windows: In the Services tool, select the database server service and click Start. Alternatively, on the command line, use the starts dbservername command.
Change from offline to administration mode
When you move the database server from offline to administration mode, you move the server into a mode that only administrators can use to perform database server functions and maintenance functions, including those involving the execution of SQL and DDL statements.
Run the oninit -j command.
Change from quiescent to online mode
When you take the database server from quiescent mode to online mode, all sessions gain access. If you have already taken the database server from online mode to quiescent mode and you are now returning the database server to online mode, any users who were interrupted in earlier processing must reselect their database and redeclare their cursors.
Run the onmode -m command.
Windows: In the Services tool, choose the database server service and click Continue.
Change gracefully from online to quiescent mode
Take the database server gracefully from online mode to quiescent mode to restrict access to the database server without interrupting current processing. After you perform this task, the database server sets a flag that prevents new sessions from gaining access to the database server. The current sessions are allowed to finish processing. After you initiate the mode change, it cannot be canceled. During the mode change from online to quiescent, the database server is considered to be in Shutdown mode.
Run the onmode -s or the onmode -sy command.
Windows: In the Services tool, choose the database server service and click Pause.
Change immediately from online to quiescent mode
Take the database server immediately from online mode to quiescent mode to restrict access to the database server as soon as possible. Work in progress can be lost. A prompt asks for confirmation of the immediate shutdown. If you confirm, the database server sends a disconnect signal to all sessions that are attached to shared memory. If a session does not receive the disconnect signal or is not able to comply automatically within 10 seconds, the database server terminates the session. The database server users receive either error message -459 indicating that the database server was shut down or error message -457 indicating that their session was unexpectedly terminated. The database server cleans up all sessions that the database server terminated. Active transactions are rolled back.
Run the onmode -u or the onmode -uy command.
Change from quiescent or online to administration mode
When you move the database server from quiescent or online to administration mode, you move the server into a mode that only administrators can use. If you begin in online mode, the database server automatically disconnects any users who are connected with any user ID that is not user informix and the users receive an error message. If a connection is terminated during a transaction, the database server rolls back the transaction. Change to administration mode when you want to run SQL and DLL commands when no other users are connected. Also see Specifying administration mode users.
Run the onmode -j command.
Change from administration to online mode
When you move the database server from administration to online mode, all users can access the database server.
Run the onmode -m command.
Change from administration to quiescent mode
When you move the database server from administration to quiescent mode, you move the server into a mode that only administrators can use to perform maintenance functions that do not involve the execution of SQL and DDL statements.
Run the onmode -s command.
Change from any mode immediately to offline mode
You can take the database server immediately from any mode to offline mode. A prompt asks for confirmation to go offline. If you confirm, the database server initiates a checkpoint request and sends a disconnect signal to all sessions that are attached to shared memory. If a session does not receive the disconnect signal or is not able to comply automatically within 10 seconds, the database server terminates this session. The database server users receive either error message -459 indicating that the database server was shut down or error message -457 indicating that their session was unexpectedly terminated. After you take the database server to offline mode, restart the database server in quiescent, administration, or online mode. When you restart the database server, it performs a fast recovery to ensure that the data is logically consistent. The database server cleans up all sessions that were terminated by the database server. Active transactions are rolled back.
Run the onmode -k or the onmode -ky command.
Windows: In the Services tool, choose the database server service and click Stop.
If the onmode command fails to shut down the database server, you can use the onclean utility to force an immediate shutdown.

Copyright© 2019 HCL Technologies Limited