onparams -d -l lognum: Drop a logical-log file
Element | Purpose | Key considerations |
---|---|---|
-d -l lognum | Allows you to drop a logical-log file specified by the log file number | Restrictions: The lognum value must
be an unsigned integer greater than or equal to 0. You can obtain the lognum from the number field of onstat -l. The sequence of lognum might be out of order. |
-y | Causes the database server to automatically respond yes to all prompts | None. |
Usage
You can only drop one log files at a time.
The database server requires a minimum of three logical-log files at all times. You cannot drop a log if your logical log is composed of only three log files.
Important: Before you can drop any of the first three logical-log
files, you must add new logical-log files and run a backup of the
logical-log files. The backup must be run using either the ontape
-a command or the ontape -c command.
After you add the new logical-log files and run a backup, you can
then use onparams -d -llognum to delete
the first three logical-log files.
The
status of the log file determines if the log file can be dropped,
and the actions taken by the database server when the log file is
dropped:
- If you drop a log file that has never been written to, status is newly Added (A), the database server deletes the log file and frees the space immediately.
- If you drop a used log file that has a status of User (U) or Free (F), the database server marks the log file as Deleted (D). After you take a level-0 backup of the dbspaces that contain the log files and the root dbspace, the database server deletes the log file and frees the space.
- You cannot drop a log file that is currently in use (C) or contains the last checkpoint record (L).
This command has an equivalent SQL administration API function.
When you move logical-log files to another dbspace, use the onparams commands to add and drop logical-log files. See moving a logical-log file, in the section on managing logical-log files in the Informix® Administrator's Guide.