How to change multiple configuration parameters at once?
wilhap 0600007F3T Visits (3999)
At present most of the Informix configuration parameters can be modified dynamically. Typically, users run 'onmode -wf' or 'onmode -wm' command to dynamically change a specific configuration parameter. But there may be a situation when you need to modify multiple parameters at once. For example, you have ten Informix instance and want to tune some of SQL statement cache configuration parameters on all the Informix instances.
Now, you can import a configuration file using onmode command to change multiple configuration parameter at once. Importing a configuration file is often faster and more convenient than changing one configuration parameter at a time. You can use the 'onmode -wi' command to import a file that contains new values for multiple configuration parameters. If the parameters are dynamically tunable, the database server applies the new values. The import operation ignores the configuration parameters in the file that are not dynamically tunable and if the new parameter values same as the existing value.
However, you need to keep a note hare that an import operation changes the values of configuration parameters only in the memory. It does not modify the values in the ONCONFIG file on disk.
Let's take the same example as before, modify some of SQL statement cache configuration parameters using import operation. Currently, you have following settings:
You create a 'onconfig.new' file under '/tmp' directory with following values to modify the configuration parameters:
Next, you run the following command to import configuration values from file named 'onconfig.new' in the the /tmp directory:
The above command generates appropriate messages on screen and the message log. Following is an excerpt of the message log:
You can notice only three out of the five parameters has been changed because either those are not dynamically tunable or using same existing value.
As the 'onmode -wi' command import a configuration file, you can also export configuration parameters from memory to a file using 'onmode -we' command.
-- Thanks Sanjit