Informix-OnLine dynamic server running mode Management

Source: Internet
Author: User
Tags informix

1. OnLine Operation Mode

Off-Line offline mode)
Quiescent static mode)
On_Line online mode)
Shutdown mode)
Recovery mode)

The OnLine system has the following working modes:

Offline mode: OnLine is not running, and shared memory is not allocated
Initialization mode: a transitional mode that occurs during OnLine initialization. The offline mode is converted to the static mode.
Static mode: The oninit process is running and shared memory resources have been allocated. However, the system does not allow database users to access the database. Only the Administrator logged on to informix can access the OnLine system.
Online mode: the system starts and runs, and the database user can use the system normally.
Closed Mode: The system is started and running. The current user can continue to use the system, but new users are not allowed to use the system.
Recovery mode: The system is performing a quick recovery or restoring the archived data. Quick recovery occurs when offline mode is switched to static mode. This recovery process takes some time, which is related to the size of the data volume to be restored.
2. Common OnLine processes

The INFORMIX-OnLine dynamic server uses several oninit processes to perform its own operations. Generally, several oninit processes exist in the system. Each process is called a virtual processor of the OnLine system.

The oninit process is run as root. This is the user permission required for virtual processor initialization tasks. In addition, because the oninit process runs as the root user, it is beneficial to protect the process, because normal users cannot kill the root user's process.

The onstat tool can read and report the shared memory structure of the OnLine system. The-gglo option displays information about the oninit process, including the process ID, virtual processor class, user CPU, and system CPU.

$ Onstat-gglo
3. UNIX-level shared memory

The UNIX Command ipcs can be used to check the shared memory segments and semaphore distribution at the operating system level. Some platforms may not have this command. The ipcs command will print information about the active shared memory in your system. For each resource, this command displays:

TYPE includes information queue q), shared memory segment m), or signal light s ).
Unique ID of a resource entry
KEY Parameter used by the application to access resources.
Mark of MODE Access MODE and permission
OWNERandGROUP username and user owner group number. The owner of all shared memory resources used OnLine is the root and informix groups.

The basic key value used by the OnLine shared memory is 0x52564801. The SERVERNUM value is multiplied by 0X10000, and this value is the shared memory key value. That is, if your SERVERNUM value is 2, the key value of your shared memory segment is 0x52564801 + (2*0x10000) = 0x52584801. If the value of SERVERNUM is 6, the generated key value is 0x525c4801.
4. Change the running MODE: MODE menu

$ The mode menu in the main menu of onmonitor command can display the following mode options:
Startup changes OnLine from offline to static. It starts the OnLine process and allocates shared and semaphore resources.
On_Line changes the system from static mode to online mode. In this mode, you can use the system.
Graceful-Shutdown is used to change the system from online mode to static mode. This command allows the current user to continue working. However, new users are not allowed to use the system. When all users leave the system, the system is changed to static mode. The current user list is displayed every 5 minutes.
Immediate-Shutdown is used to convert the system from online mode to static mode immediately. In addition, the operation of all active users is interrupted, any opened transactions are rolled back, and the system is changed to static mode.

Take_Offline is used to change the system from static mode to offline mode. If the current system is in online mode, you must first perform the immediate-Shutdown operation.
5. recovery mode

In both environments, the OnLine operation mode is recovery mode: during recovery, the system is in quick recovery mode until the recovery is complete.
In quick recovery.
6. Use the oninit tool to change the OnLine mode

The oninit tool can be used to change the operating mode of the OnLine system. The oninit tool parameters are as follows:
Oninit changes OnLine from offline to OnLine.
Oninit-s changes the OnLine mode from offline mode to static mode
Oninit-I initializes the OnLine rootdbspace.
Oninit-p does not search for or delete temporary tables during shared memory initialization.
Oninit-y automatically answers yes when prompted by the system.
Warning do not use the-I parameter in general. Because it will destroy all existing data.

Tip: If you want to automatically start the OnLine system to the OnLine mode when your machine restarts, you can run the oninit command, most UNIX machines added to the startup script of your system are/etc/rc ).
7. Use the onmode tool to change the OnLine mode

The onmode command can be used to change the operating mode of the OnLine system:

-K executes an Immediate-Shutdown and changes the system from static mode to offline mode.
-M changes the system from static mode to online mode
-S executes a graceful_Shutdown.
-U executes Immediate-Shutdown once
-Y automatically answers yes to all prompts and must be used with other options.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.