RE: Change database mode online using onmode in Informix
Posted in 2005
Topics: Server Administration, Logging & Checkpoints
onmode -m takes the database server from quiescent or single-user mode to online mode. To bring the server from off-line to on-line, you should just use the oninit command.
You could use the oninit -s to initialise shared memory and bring the server to single-user mode and then use onmode -m to bring it to multi-user mode.
By the way, you should not use onmode -ky to shut down the server unless you are in quiescent mode. This will not perform a checkpoint and can, in some situations, lead to data loss or corruption. I recommend shutting down with onmode -yuk. This brings the database server to quiescent mode without waiting for users to finish their sessions. Their current transactions are rolled back, and their sessions are terminated. A checkpoint is completed and then database server goes to offline mode and database server shared memory is removed.
The order of parameters is unimportant, but I use "onmode -yuk" because of the mnemonic value, at least for English speakers; say it out loud with me: "onmode -yuk (yuck) can avoid a big mess."
I know its silly, but it sticks in the head.
Check the IBM Informix Dynamic Server Administrator's Reference: http://publib.boulder.ibm.com/epubs/html/25122680/25122680tfrm.htm
Sincerely,
Christopher Coleman
Steering Committee President
Kansas City Informix Users Group
www.iiug.org/kciug
Database Analyst
Pharmacy Division
Mediware Information Systems, Inc.
-----Original Message-----
From: alanmas@gmail.com [mailto:alanmas@gmail.com]
Sent: Wednesday, September 07, 2005 8:37 AM
To: informix-list@iiug.org
Subject: Change database mode online using onmode in Informix
Hi.
I would like to put 'Online' and 'Offline' via command an IDS server.
I tried put a serer Offline by typing: onmode -ky and it works.
informix@FO:/informix$ export INFORMIXSERVER=backup_source
informix@FO:/informix$ onmode -ky
However I tried to put it Online again by typing: onmode -my but it
does not work. Does anybody knows wheter the expression is correct or
whether the server must be first in transient mode or why it does not
work?
informix@FO:/informix$ onmode -ky
shared memory not initialized for INFORMIXSERVER 'backup_source'
Thank you all.
sending to informix-list
Well -c is a valid option to onmode. So I use
onmode -yuck