分析一个400多秒的大sql。
set long 1000000
set longchunksize 1000000
set lin 200
set pages 1000
set trim on
set trimspool on
set echo off
set feedback off
select dbms_sqltune.report_sql_monitor(sql_id=>'&sqlid',type=>'text',report_level=>'all') mon_rpt from dual;
输入 sqlid 的值: cwx04v3hzfkwy
原值 1: select dbms_sqltune.report_sql_monitor(sql_id=>'&sqlid',type=>'text',report_level=>'all') mon_rpt from dual
新值 1: select dbms_sqltune.report_sql_monitor(sql_id=>'cwx04v3hzfkwy',type=>'text',report_level=>'all') mon_rpt from dual
error:
ora-27163: 内存不足
ora-06512: 在 "sys.dbms_sqltune", line 13969
ora-06512: 在 "sys.dbms_sqltune", line 14265
ora-06512: 在 line 1
sql> !oerr ora 27163
27163, 0000, "out of memory"
// *cause: the program ran out of memory when allocating a temporary
// data structure.
// *action: increase the amount of memory on the system.
sql> !sqlplus -v
sql*plus: release 11.2.0.3.0 production
sql> alter session set events '31156 trace name context forever,level 0x400';
sql>
select dbms_sqltune.report_sql_monitor(sql_id=>'&sqlid',type=>'text',report_level=>'all') mon_rpt from dual;sql>
输入 sqlid 的值: cwx04v3hzfkwy
原值 1: select dbms_sqltune.report_sql_monitor(sql_id=>'&sqlid',type=>'text',report_level=>'all') mon_rpt from dual
新值 1: select dbms_sqltune.report_sql_monitor(sql_id=>'cwx04v3hzfkwy',type=>'text',report_level=>'all') mon_rpt from dual
mon_rpt
------------------------------------------------------------------------------------------------------------
sql monitoring report
sql text
------------------------------
insert into xxx ( acccode , --科目编码 accno , --会计机构 accountno , --账户号 amortno
...
阅读(8146) | 评论(0) | 转发(0) |