Background documentationfile_operation Locate this document in the navigation structure

 

You delete part of the content of database files or complete database files.

If you use the command with files for which it is not valid, you receive the error -24996 ERR_PARAM - wrong parameters.

Prerequisites

  • You have determined the file ID of the file to be processed (see file_getfirst).

Structure

file_operation <file_ID> <action>

<action> :: = <delete_action> | <shrink_action>

<delete_action>:: = OP=DELETE [DATE=<yyyymmddhhmmss>]

<shrink_action>:: = OP=SHRINK <option>

<option> :: = DATE=<yyyymmddhhmmss> | LINE=<n>

Options

Option

Description

<file_ID>

Log file(s) of the database instance

OP=DELETE [DATE=<yyyymmddhhmmss>]

The file(s) is/are deleted.

You can use the DATE=<yyyymmddhhmmss> option to specify that only those files that have not been changed since the specified date are to be deleted.

OP=SHRINK <option>

Part of the content of the file is deleted.

You can use these fields to restrict the conditions to be archived. If you specify the option DATE=<yyyymmddhhmmss>, all the lines that were written before the specified date are deleted.

If you specify the LINE=<n> option, the content of the file is reduced to <n> lines. The <n> lines that were written most recently are retained.

Result

OK

In the event of errors, see Reply Format.

More Information

Glossary, Database File