To log database system messages in detail, you can switch on different traces.
Writing a trace can seriously affect performance. You should therefore switch off writing a trace as soon as the actions that were necessary for the analysis have been logged.
As soon as writing a trace is switched on, operate the database instance with the load as low as possible, and only execute those actions that are necessary to reproduce the error.
Traces
Name |
Log File (Default Value) |
Description |
Database trace |
knltrace |
The trace writer task logs all kernel messages. You can use the log file to identify errors for example during the execution of SQL statements. |
ODBC trace |
sqltrace.pct |
The MaxDB ODBC driver logs all SQL statements that the application transmits to the database system. This ODBC trace is not identical to the SQL.LOG trace that you can switch on and off in the ODBC Data Source Administrator (Microsoft Windows) in the tab Tracing. |
JDBC trace |
Freely selectable |
The MaxDB JDBC driver logs all JDBC API calls and their input parameters, return values and the corresponding thread. |
· Switch on the database trace: Use the Database Manager database tool, or the CCMS in SAP systems.
¡ Database Manager GUI, Switching on the Database Trace
¡ Database Manager CLI, Switching on the Database Trace
¡
Database Administration in CCMS: MySQL
MaxDB, Database
Trace
· Switch on ODBC trace: Set the corresponding option for the data source, see ODBC Manual, Logging SQL Statements (Windows) or Logging SQL Statements (UNIX/Linux).
· Switch on the JDBC trace: Specify the corresponding option for the connection setup, see JDBC Manual, Specifying Additional Connection Options.