DBA_ENABLED_TRACES dba_enabled_traces displays information about enabled sql traces. Column Datatype NULL Description TRACE_TYPE VARCHAR2(21) Type of the trace: CLIENT_ID SERVICE SERVICE_MODULE SERVICE_MODULE_ACTION DATABASE PRIMARY_ID VAR
dba_enabled_traces displays information about enabled sql traces.
| Column | Datatype | NULL | Description |
|---|---|---|---|
| TRACE_TYPE | VARCHAR2(21) | Type of the trace:
CLIENT_ID SERVICE SERVICE_MODULE SERVICE_MODULE_ACTION DATABASE |
|
| PRIMARY_ID | VARCHAR2(64) | Primary qualifier (specific client identifier or service name) | |
| QUALIFIER_ID1 | VARCHAR2(48) | Secondary qualifier (specific module name) | |
| QUALIFIER_ID2 | VARCHAR2(32) | Additional qualifier (specific action name) | |
| WAITS | VARCHAR2(5) | Indicates whether waits are traced (TRUE) or not (FALSE) | |
| BINDS | VARCHAR2(5) | Indicates whether binds are traced (TRUE) or not (FALSE) | |
| PLAN_STATS | VARCHAR2(10) | Frequency at which row source statistics are dumped in the trace files for each cursor:
never first_execution all_executions |
|
| INSTANCE_NAME | VARCHAR2(16) | Instance name for tracing restricted to named instances |
SQL> select * from dba_enabled_traces;
未选定行
SQL> BEGIN dbms_monitor.client_id_trace_enable(client_id=>'easy',waits=>true,binds=>false); END;
2 /
PL/SQL 过程已成功完成。
SQL> select * from dba_enabled_traces;
TRACE_TYPE PRIMARY_ID QUALIFIER_ID1 QUALIFIER_ WAITS BINDS PLAN_STATS INSTANCE_NAME
--------------------- -------------------- -------------------- ---------- ----- ----- ---------- ----------------
CLIENT_ID easy TRUE FALSE FIRST_EXEC
SQL> exec dbms_monitor.serv_mod_act_trace_enable(service_name=>'service1',waits=>true,binds=>false);
PL/SQL 过程已成功完成。
SQL> select * from dba_enabled_traces;
TRACE_TYPE PRIMARY_ID QUALIFIER_ID1 QUALIFIER_ WAITS BINDS PLAN_STATS INSTANCE_NAME
--------------------- -------------------- -------------------- ---------- ----- ----- ---------- ----------------
CLIENT_ID easy TRUE FALSE FIRST_EXEC
SERVICE service1 TRUE FALSE FIRST_EXEC
SQL> select sid,serial# from v$session where sid = (select distinct sid from v$mystat);
SID SERIAL#
---------- ----------
66 3
SQL> exec dbms_monitor.session_trace_enable(session_id=>66,serial_num=>3,waits=>true,binds=>false);
PL/SQL 过程已成功完成。
SQL> select * from dba_enabled_traces;
TRACE_TYPE PRIMARY_ID QUALIFIER_ID1 QUALIFIER_ WAITS BINDS PLAN_STATS INSTANCE_NAME
--------------------- -------------------- -------------------- ---------- ----- ----- ---------- ----------------
CLIENT_ID easy TRUE FALSE FIRST_EXEC
SERVICE service1 TRUE FALSE FIRST_EXEC
SQL> alter session set sql_trace =true;
会话已更改。
SQL> select * from dba_enabled_traces;
TRACE_TYPE PRIMARY_ID QUALIFIER_ID1 QUALIFIER_ WAITS BINDS PLAN_STATS INSTANCE_NAME
--------------------- -------------------- -------------------- ---------- ----- ----- ---------- ----------------
CLIENT_ID easy TRUE FALSE FIRST_EXEC
SERVICE service1 TRUE FALSE FIRST_EXEC
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号