The SET_OPT_TRACE_PARAMETER procedure modifies the end-to-end tracing parameters for the optimizer of the current session.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
PROCEDURE SET_OPT_TRACE_PARAMETER(
sql_id IN VARCHAR2 DEFAULT '',
identifier IN VARCHAR2 DEFAULT DEFAULT_INENTIFIER,
level IN INT DEFAULT DEFAULT_LEVEL
);
Parameters
| Parameter | Description |
|---|---|
| sql_id | The ID of the SQL statement to be traced. For example, if you need to run PL programs in the current test and want to trace specific SQL statements in PL functions, you can set the sql_id parameter. If sql_id is specified, only specific SQL statements are traced. If sql_id is not specified, all SQL statements are traced. |
| identifier | The suffix to the trace file to facilitate file retrieval. |
| level | The trace level. Valid values:
Notice: level is a database keyword and must be enclosed by using double quotation marks ("") for Oracle tenants and by using backticks (`) for MySQL tenants. |
Examples
Set the level of trace logs and the suffix of log files.
obclient> CALL DBMS_XPLAN.SET_OPT_TRACE_PARAMETER(identifier=>'trace_test', "level"=>3);
Query OK, 0 rows affected