目录
演示如下:
启动到nomount状态
[email protected]> 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
[email protected]> oradebug setmypid;
Statement processed.
[email protected]> oradebug tracefile_name;
/oracle/app/oracle/diag/rdbms/kyeupdbfs/kyeupdbfs/trace/kyeupdbfs_ora_13343.trc
[email protected]> alter session set events ‘10046 trace name context forever,level 12‘;
Session altered.
启动数据库到mount状态并打开
[email protected]> alter database mount;
Database altered.
[email protected]> alter database open;
Database altered.
查阅trace
路径:/oracle/app/oracle/diag/rdbms/kyeupdbfs/kyeupdbfs/trace/kyeupdbfs_ora_13343.trc
查阅trace的另外方法 v$diag_info 视图
[email protected]> 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
原文:https://www.cnblogs.com/kyeup/p/9286684.html