中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

使用SQL_TRACE進行數據庫診斷

發布時間:2020-08-05 10:31:07 來源:ITPUB博客 閱讀:159 作者:不一樣的天空w 欄目:關系型數據庫

http://www.eygle.com/case/Use.sql_trace.to.Diagnose.database.htm

包dbms_system定義如下:
SQL> desc dbms_system
PROCEDURE ADD_PARAMETER_VALUE
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 PARNAME                        VARCHAR2                IN
 VALUE                          VARCHAR2                IN
 SCOPE                          VARCHAR2                IN     DEFAULT
 SID                            VARCHAR2                IN     DEFAULT
 POSITION                       BINARY_INTEGER          IN     DEFAULT
PROCEDURE DIST_TXN_SYNC
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 INST_NUM                       NUMBER                  IN
PROCEDURE GET_ENV
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 VAR                            VARCHAR2                IN
 VAL                            VARCHAR2                OUT
PROCEDURE KCFRMS
PROCEDURE KSDDDT
PROCEDURE KSDFLS
PROCEDURE KSDIND
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 LVL                            BINARY_INTEGER          IN
PROCEDURE KSDWRT
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 DEST                           BINARY_INTEGER          IN
 TST                            VARCHAR2                IN
PROCEDURE READ_EV
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 IEV                            BINARY_INTEGER          IN
 OEV                            BINARY_INTEGER          OUT
PROCEDURE REMOVE_PARAMETER_VALUE
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 PARNAME                        VARCHAR2                IN
 VALUE                          VARCHAR2                IN
 SCOPE                          VARCHAR2                IN     DEFAULT
 SID                            VARCHAR2                IN     DEFAULT
PROCEDURE REMOVE_PARAMETER_VALUE
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 PARNAME                        VARCHAR2                IN
 POSITION                       BINARY_INTEGER          IN
 SCOPE                          VARCHAR2                IN     DEFAULT
 SID                            VARCHAR2                IN     DEFAULT
PROCEDURE SET_BOOL_PARAM_IN_SESSION
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SID                            NUMBER                  IN
 SERIAL#                        NUMBER                  IN
 PARNAM                         VARCHAR2                IN
 BVAL                           BOOLEAN                 IN
PROCEDURE SET_EV
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SI                             BINARY_INTEGER          IN
 SE                             BINARY_INTEGER          IN
 EV                             BINARY_INTEGER          IN
 LE                             BINARY_INTEGER          IN
 NM                             VARCHAR2                IN
PROCEDURE SET_INT_PARAM_IN_SESSION
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SID                            NUMBER                  IN
 SERIAL#                        NUMBER                  IN
 PARNAM                         VARCHAR2                IN
 INTVAL                         BINARY_INTEGER          IN
PROCEDURE SET_SQL_TRACE_IN_SESSION
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SID                            NUMBER                  IN
 SERIAL#                        NUMBER                  IN
 SQL_TRACE                      BOOLEAN                 IN
PROCEDURE WAIT_FOR_EVENT
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 EVENT                          VARCHAR2                IN
 EXTENDED_ID                    BINARY_INTEGER          IN
 TIMEOUT                        BINARY_INTEGER          IN

一、針對別的窗口開啟sql_trace功能,此功能可以在sql執行前開啟,也可以在sql執行后開啟。

--開啟sql_trace功能
exec dbms_system.set_sql_trace_in_session(42,1853,true);


--關閉sql_trace功能
exec dbms_system.set_sql_trace_in_session(42,1853,false);

--查詢trace文件位置:
select c.value || '/' || d.instance_name || '_ora_' || a.spid || '.trc' trace
  FROM v$process a, v$session b, v$parameter c, v$instance d
 WHERE a.addr = b.paddr
   AND b.audsid = userenv('sessionid')
   AND c.name = 'user_dump_dest';

二、針對別的窗口開啟10046事件,此功能可以在sql執行前開啟,也可以在sql執行后開啟。
--開啟10046事件
exec dbms_system.set_ev(42,1853,10046,12,'');

--關閉10046事件
exec dbms_system.set_ev(42,1853,10046,0,'');

--查詢trace文件位置:
select c.value || '/' || d.instance_name || '_ora_' || a.spid || '.trc' trace
  FROM v$process a, v$session b, v$parameter c, v$instance d
 WHERE a.addr = b.paddr
   AND b.audsid = userenv('sessionid')
   AND c.name = 'user_dump_dest';


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

神农架林区| 奉化市| 元阳县| 汪清县| 弋阳县| 津市市| 冕宁县| 新野县| 明溪县| 襄垣县| 柳河县| 环江| 桂平市| 彭泽县| 邮箱| 云南省| 曲沃县| 龙川县| 都江堰市| 临海市| 阳新县| 阳曲县| 永寿县| 巫溪县| 荔波县| 镇雄县| 绥阳县| 循化| 通海县| 威远县| 科技| 和平县| 蚌埠市| 无为县| 宁都县| 靖宇县| 杭州市| 和龙市| 洪湖市| 南澳县| 大安市|