- SYS@orcl> startup nomount;
- SYS@orcl> select TRACEFILE from v$process where addr in(select paddr from v$session where sid in(select sid from v$mystat where rownum=1));
- TRACEFILE
--------------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/primary_orcl/orcl/trace/orcl_ora_2519.trc
- SYS@orcl> alter session set events '10046 trace name context forever,level 12';
-
- Session altered.
4、将数据库启动至打开状态
- SYS@orcl> alter database mount;
-
- Database altered.
-
- SYS@orcl> alter database open ;
-
- Database altered.
5、关闭10046事件
- SYS@orcl> alter session set events '10046 trace name context off';
-
- Session altered.
6、查看跟踪日志文件
- [root@test-db ~]# less /u01/app/oracle/diag/rdbms/primary_orcl/orcl/trace/orcl_ora_2519.trc
7、开始分析日志