Oracle跟蹤分析數據庫啟動的各個階段
阿新 • • 發佈:2018-07-10
設置 event base size ont buffers lte alt ces
目錄
- 啟動到nomount狀態
- 設置trace
- 啟動數據庫到mount狀態並打開
- 查閱trace
- 查閱trace的另外方法 v$diag_info 視圖
演示如下:
啟動到nomount狀態
SYS@kyeupdbfs> startup nomount; ORACLE instance started. Total System Global Area 1720328192 bytes Fixed Size 2253944 bytes Variable Size 754977672 bytes Database Buffers 956301312 bytes Redo Buffers 6795264 bytes
設置trace
SYS@kyeupdbfs> oradebug setmypid;
Statement processed.
SYS@kyeupdbfs> oradebug tracefile_name;
/oracle/app/oracle/diag/rdbms/kyeupdbfs/kyeupdbfs/trace/kyeupdbfs_ora_13343.trc
SYS@kyeupdbfs> alter session set events ‘10046 trace name context forever,level 12‘;
Session altered.
啟動數據庫到mount狀態並打開
SYS@kyeupdbfs> alter database mount;
Database altered.
SYS@kyeupdbfs> alter database open;
Database altered.
查閱trace
路徑:/oracle/app/oracle/diag/rdbms/kyeupdbfs/kyeupdbfs/trace/kyeupdbfs_ora_13343.trc
查閱trace的另外方法 v$diag_info 視圖
SYS@kyeupdbfs> select * from v$diag_info where name like ‘%Trace%‘; INST_ID NAME VALUE ---------- -------------------- -------------------------------------------------- 1 Diag Trace /oracle/app/oracle/diag/rdbms/kyeupdbfs/kyeupdbfs/ trace 1 Default Trace File /oracle/app/oracle/diag/rdbms/kyeupdbfs/kyeupdbfs/ trace/kyeupdbfs_ora_13343.trc
Oracle跟蹤分析數據庫啟動的各個階段