SYS@xb> declare n number; begin for i in 1..200 loop begin execute immediate 'select count(1) frm user_tables' into n; exception when others then null; end; end loop; end; 12 /
PL/SQL procedure successfully completed.
现在观察下alert日志
1 2 3 4 5 6 7 8 9 10 11 12 13 14
PARSE ERROR: ospid=7940, error=923 for statement: select count(1) frm user_tables^@ Additional information: hd=0x9239a950 phd=0x9239add0 flg=0x28 cisid=0 sid=0 ciuid=0 uid=0 ----- pl/sql Call Stack ----- object line object handle number name 0x92342260 6 anonymous block PARSE ERROR: ospid=7940, error=923 for statement: select count(1) frm user_tables^@ Additional information: hd=0x9239a950 phd=0x9239add0 flg=0x28 cisid=0 sid=0 ciuid=0 uid=0 ----- pl/sql Call Stack ----- object line object handle number name 0x92342260 6 anonymous block
SYS@xb> select sql_text from v$sql where child_address='0000000092342260';
SQL_TEXT ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- declare n number; begin for i in 1..200 loop begin execute immediate 'select count(1) frm user_tables' into n; exception when others then null; end; end loop; end;
SYS@ora12c> declare n number; begin for i in 1..200 loop begin execute immediate 'select count(1) frm user_tables' into n; exception when others then null; end; end loop; end; 12 /
PL/SQL procedure successfully completed.
WARNING: too many parse errors, count=400 SQL hash=0x7ad2b6ab PARSE ERROR: ospid=31909, error=923 for statement: Wed Nov 28 17:15:17 2018 select count(1) frm user_tables Additional information: hd=0x7537b1c0 phd=0x756990e8 flg=0x28 cisid=0 sid=0 ciuid=0 uid=0 Wed Nov 28 17:15:17 2018 ----- pl/sql Call Stack ----- object line object handle number name 0x75793c90 6 anonymous block