message log rotate argument: Rotate the message log file (SQL administration API)

Use the message log rotate argument or the file rotate argument with the admin() or task() function to specify the particular online, ON-Bar activity, or ON-Bar debug message log file to rotate, and to indicate the maximum number of message logs to rotate.

When the message log file rotates, the database server switches to a new online message log file and increments the ID numbers for the previous log files by one. When the maximum number of log files is reached, the log file with the highest ID is deleted.

Syntax


1  EXECUTE FUNCTION
1 admin
1 task
2  (
3.1 "message log rotate"
3.1 "file rotate"
2 ,
2 "
2 file_path
2 "
2?  maximum_version
2  ) ;
Element Purpose Key considerations
file_path Full path name of the online, ON-Bar activity, or ON-Bar debug message log file that the server will rotate, for example, /usr/informix/online.log.
maximum_version The log file with the highest ID. This is the maximum message log version that the server will rotate.

Examples

The following examples show the arguments that you can use to rotate a maximum of 52 /usr/informix/online.log files:

execute function task("message log rotate", "/usr/informix/online.log",52);
execute function task("file rotate", "/usr/informix/online.log",52);

When the database server rotates these files, the server deletes version 52 of the file. Version 51 becomes version 52, version 50 becomes version 51, and so on. The new online log becomes version 1.