[[email protected] ~]# su - oracle [[email protected] ~]$ sqlplus / as sysdba SQL> select * from v$version BANNER ------------------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production CORE 11.2.0.3.0 Production TNS for Linux: Version 11.2.0.3.0 - Production NLSRTL Version 11.2.0.3.0 - Production 现在产生一个10046事件,我们来查看trace文件 SQL> alter session set events ‘10046 trace name context forever, level 12‘; Session altered. SQL> oradebug setmypid Statement processed. SQL> oradebug tracefile_name /u01/app/oracle/diag/rdbms/hxzgsjqy/HXZGSJQY/trace/HXZGSJQY_ora_15039.trc oradebug来定位10046事件生成的trace文件为HXZGSJQY_ora_15039 [[email protected] ~]$ cd /u01/app/oracle/diag/rdbms/hxzgsjqy/HXZGSJQY/trace/ [[email protected] trace]$ ll total 100 -rw-r----- 1 oracle oinstall 2458 Nov 16 02:00 alert_HXZGSJQY.log -rw-r--r-- 1 oracle oinstall 0 Nov 16 21:31 cd -rw-r----- 1 oracle oinstall 1012 Nov 16 02:00 HXZGSJQY_cjq0_6039.trc -rw-r----- 1 oracle oinstall 63 Nov 16 02:00 HXZGSJQY_cjq0_6039.trm -rw-r----- 1 oracle oinstall 21287 Nov 16 02:00 HXZGSJQY_dbrm_5983.trc -rw-r----- 1 oracle oinstall 1387 Nov 16 02:00 HXZGSJQY_dbrm_5983.trm -rw-r----- 1 oracle oinstall 953 Nov 16 19:00 HXZGSJQY_j000_14503.trc -rw-r----- 1 oracle oinstall 73 Nov 16 19:00 HXZGSJQY_j000_14503.trm -rw-r----- 1 oracle oinstall 32035 Nov 16 21:31 HXZGSJQY_mmon_5999.trc -rw-r----- 1 oracle oinstall 3136 Nov 16 21:31 HXZGSJQY_mmon_5999.trm -rw-r----- 1 oracle oinstall 2428 Nov 16 21:31 HXZGSJQY_ora_15039.trc -rw-r----- 1 oracle oinstall 121 Nov 16 21:31 HXZGSJQY_ora_15039.trm -rw-r----- 1 oracle oinstall 1267 Nov 16 02:13 HXZGSJQY_ora_9981.trc -rw-r----- 1 oracle oinstall 85 Nov 16 02:13 HXZGSJQY_ora_9981.trm
sqlplus中使用oradebug定位 alter session 10046事件产生的trace文件
时间: 2024-10-10 13:52:06