Use this command to switch on the database trace and log activities of the database kernel.
To define which activities are to be logged, specify a command option. Some activities allow you to specify a log level. When you have finished your analysis, switch the database trace off.
To be able to evaluate the results of the trace function, create a binary file for the database trace (see: trace_flush) first. Then convert the binary file to a plain text file (see: trace_prot). The file ID of the database trace plain text file is KNLTRC. Open this plain text file using the file_getfirst command.
Note
Switching on the database trace has no impact on the performance of SAP MaxDB databases. However, it has a negative effect on the performance of liveCache databases.
You have the server permission DBInfoRead or DBFileRead.
trace_on <command_option>
<command_option> :: = <activity_list> | ALL [<level>]
<activity_list> :: = <activity> <activity> ...
<activity> :: = <activity_name> [<level>]
Option |
Description |
---|---|
ALL |
All activities of the database 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 activities which can be logged and corresponding command options, see trace_show. |
Call Database Manager CLI, log on as the user OLEG with the password MONDAY, connect to the DEMODB database, 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
Database Administration, Traces