Reducing the size of message log files

You can reduce the size of online, ON-Bar activity, or ON-Bar debug message log files by running SQL administration API commands that rotate, truncate, or delete the logs.

About this task

To manually rotate a message log file:

  1. Run the admin() or task() function with the message log rotate argument, the name of the message log, and the maximum message log version that the server will rotate, as follows:
    EXECUTE FUNCTION task("message log rotate",
     "full_path_for_message_log_file",maximum_version);

    For example, to rotate a maximum of 52 online.logfiles, specify:

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

To manually truncate a message log file (remove the contents of the file):

  1. Run the admin() or task() function with the message log truncate argument and the full path name for the message log file, as follows:
    EXECUTE FUNCTION task("message log truncate",
     "full_path_for_message_log_file");

    For example, to remove the contents of the online.log file, specify:

    EXECUTE FUNCTION task("message log truncate",
     "/usr/informix/online.log");

To manually delete a message log file (remove the contents of the file and the file):

  1. Run the admin() or task() function with the message log delete argument and the full path name for the message log file, as follows:
    EXECUTE FUNCTION task("message log delete",
     "path_for_message_log_file");

    For example, to delete the entire online.logfile, specify:

    EXECUTE FUNCTION task("message log delete",
     "/usr/informix/online.log");