add log argument: Add a new logical log (SQL administration API)
Use the add log argument with the admin() or task() function to add a logical log to a dbspace.
Syntax
Element | Description | Key Considerations |
---|---|---|
after_current_flag | Whether to add the new log after the current log or after the last logical log (default). | Possible values are:
|
count | The number of log files to create. The default is 1. | The number must not cause the total number of logical-log files to exceed 32,767. |
dbspace | The name of the dbspace in which to insert a logical-log file. | You can add a log file to a dbspace only if
the database server has adequate contiguous space. You can add a log file during a backup. You cannot add a log file to a blobspace or sbspace. |
size | The size in kilobytes of the new logical-log file. The default is the size specified by the LOGSIZE configuration parameter. | This value must be an unsigned integer greater than or equal to 200 KB. |
Usage
The newly added log files have a status of A and are immediately available for use. Use onstat -l to view the status of your logical-log files. It is recommended that you take a level-0 backup of the root dbspace and the dbspace that contains the log file as soon as possible after running this function.
By default, the new log file is added after the last logical
log. Include 1
as the fifth argument to insert the
logical-log file after the current log file.
This function resembles the onparams -a -d command, which can add a single logical-log file. You can add multiple logical-log files to the specified dbspace, however, with a single invocation of this function.
Example
The command in the following example adds three logical logs after the current log, each with a size of 5 MB:
EXECUTE FUNCTION task ("add log","logdbs","5M",3,1);