Oracle跟踪分析数据库启动的各个阶段

演示如下:

启动到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监听已经启动了 sqlplus / as sysdba 仍然报 ERROR:ORA-12560


下一篇:Oracle数据库启动时:ORA-00119: invalid specification for system parameter LOCAL_LISTENER; ORA-00132错误解决