At present most of the Informix configuration parameters can modify 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:
$ onmode -wi /tmp/onconfig.new
3 parameters successfully modified. See online log for more info.
The above command generates appropriate messages on screen and the message log. Following is an excerpt of the message log:
14:50:42 Importing configuration from '/tmp/onconfig.new':
14:50:42 Value of STMT_CACHE has been changed to 1.
14:50:42 Value of STMT_CACHE_NOLIMIT has been changed to 1.
14:50:42 Value of STMT_CACHE_HITS has been changed to 1.
14:50:42 Config Import Complete. 3 tunable parameters processed.
3 modified, 0 unchanged, 0 could not be tuned.
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.