Starting a new audit file

About this task

You use the onaudit command to start a new audit file. For the onaudit syntax to start a new audit file, change the audit-file size, or change the path name of the audit directory, see The onaudit utility.

You can use more than one flag at a time in an onaudit command.

You can start a new audit file in one of the following ways:

Procedure

  • Use onaudit -s to change the maximum size of an audit file.
    If the audit file is already larger than the new size that you specify, the utility saves the current file and starts to write to a new one.

    The following example changes the default size to 20,000 bytes:

    onaudit -s 20000
  • Use onaudit -n to start a new audit file without changing the maximum size.

    This option, which the following example shows, saves the current audit log to another file whenever you run it:

    onaudit -n
  • Use onaudit -p to change the directory in which the database server writes audit files.

    The following example specifies /work/audit as the UNIX™ file system where the audit files are to be kept:

    onaudit -p /work/audit

    The directory that you specify must exist.

  • Start database-server- managed auditing. A new audit file starts every time that you start database-server- managed auditing.