Adding logical-log files manually

You can use an onparams command to add logical-log files.

You might add logical-log files manually for the following reasons:
  • To increase the disk space allocated to the logical log
  • To change the size of your logical-log files
  • To enable an open transaction to roll back
  • As part of moving logical-log files to a different dbspace
Restriction: You cannot do the following actions:
  • Add a log file to a blobspace or sbspace.
  • Add logical or physical logs to dbspaces that have non-default page sizes.

Add logical-log files one at a time, up to a maximum of 32,767 files, to any dbspace. As soon as you add a log file to a dbspace, it becomes a critical dbspace. You can add a logical-log file during a storage space backup.

You can add a logical-log file in either of the following locations:

  • At the end of the file list using the onparams -a command
  • After the current logical-log file using the onparams -a -i command

To add a logical-log file using onparams

  1. Log-in as user informix or root on UNIX or as a member of the Informix-Admin group on Windows.
  2. Ensure that the database server is in online, administration, or quiescent, or cleanup phase of fast-recovery mode.
    The database server writes the following message to the log during the cleanup phase:
    Logical recovery has reached the transaction cleanup phase.
  3. Decide whether you want to add the log file to the end of the log file list or after the current log file.

    You can insert a log file after the current log file regardless of the DYNAMIC_LOGS parameter value. Adding a log file of a new size does not change the value of LOGSIZE.

    • The following command adds a logical-log file to the end of the log file list in the logspace dbspace, using the log-file size specified by the LOGSIZE configuration parameter:
      onparams -a -d logspace
    • The following command inserts a 1000 KB logical-log file after the current log file in the logspace dbspace:
      onparams -a -d logspace -s 1000 -i
    • To add a logical-log file with a new size (in this case, 250 KB), run the following command:
      onparams -a -d logspace -s 250
  4. Use onstat -l to check the status of the log files.
    The status of the new log file is A and is immediately available.
  5. The next time you must back up data, perform a level-0 backup of the root dbspace and the dbspaces that contain the new log files.

    Although you are no longer required to back up immediately after adding a log file, your next backup must be level-0 because the data structures have changed. For information about backing up data, see the IBM® Informix® Backup and Restore Guide.

For more information about using onparams to add a logical-log file, see the IBM Informix Administrator's Reference.