Background documentationtrace_on Locate this document in the navigation structure

 

You switch on the database trace and log activities of the database kernel.

You specify a command option to define which activities are to be logged. Some activities allow you to specify a log level. When you have finished your analysis, switch the database trace off.

In order to be able to evaluate the results of the trace function, you first create a binary file for the database trace (see: trace_flush) and convert this to a plain text file (see: trace_prot). The file ID of the database trace plain text file is KNLTRC. You open this plain text file with the help of the DBM command file_getfirst.

Note Note

Switching on the database trace has a negative effect on performance with liveCache database instances. This is not the case with MaxDB database instances.

End of the note.

Prerequisites

You have the server authorization DBInfoRead or DBFileRead.

Structure

trace_on <command_option>

<command_option> :: = <activity_list> | ALL [<level>]

<activity_list> :: = <activity> <activity> ...

<activity> :: = <activity_name> [<level>]

Options

Option

Description

ALL

All activities of the database instance are logged.

<activity>

Activity for which logging is to be switched on

<level>

Logging level,

can be specified for several activities.

Possible values are 1 to 9.

The default value is 5.

For information on displaying activities which can be logged and corresponding command options, see trace_show.

Result

OK

In the event of errors, see Reply Format.

Example

Call the Database Manager CLI, log on as user OLEG with password MONDAY, connect to the DEMODB database instance, switch on the database trace for the areas CHECK_IOMAN and CHECK_LOGPAGE:

>dbmcli -u OLEG,MONDAY –d DEMODB trace_on CHECK_IOMAN CHECK_LOGPAGE

OK

More Information

Database Administration, Traces