Database Administration (MOSC)

MOSC Banner

catch the queries causing ORA-01652 (unable to extend temp segment by 128 in tablespace TEMP).

edited Jan 29, 2014 2:40AM in Database Administration (MOSC) 3 commentsAnswered
Hello,
 I try to catch the queries causing ORA-01652 (unable to extend temp segment by 128 in tablespace TEMP).

 I use this trigger (failed_to_extend_temp), but when ora-01652 occured,  No rows inserted :-(. 

CREATE OR REPLACE TRIGGER  failed_to_extend_temp
   after servererror on database
declare             
   begin
       if ( is_servererror(1652) )
       then
           insert into Temp_TS_usage values ( 'ora_sysevent = ' || ora_sysevent );
           insert into Temp_TS_usage values ( 'ora_login_user = ' || ora_login_user );
           insert into Temp_TS_usage values ( 'ora_server_error = ' || ora_server_error(1) );
           insert into Temp_TS_usage select 'open cursor ' || rownum || ' ' || sql_text

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center