Re: Script to overcome ORA-54 during DDL

  • From: Connor McDonald <hamcdc@xxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Sat, 26 Jun 2004 03:46:50 +0100 (BST)

After a thorough and comprehensive tuning review...a revised version is below..

create or replace procedure do_ddl(m_sql varchar2)
as
 in_use exception ;
 pragma exception_init(in_use, -54);
begin
 while true loop
  begin
   execute immediate m_sql;
   exit;
  exception 
   when in_use then null;
--   when others then raise;
  end;
  dbms_lock.sleep(0.01);
 end loop;
end;
/

:-)


--- Jonathan Lewis <jonathan@xxxxxxxxxxxxxxxxxx> wrote: > 
> I thought it was pretty good for five minutes -
> and I did leave in a CPU-saving sleep.
> The timeout problem is left as an exercise 
> for the reader.
> 
> Held cursors shouldn't be a problem - that's
> why library cache locks are called breakable
> parse locks.  ("should" and "won't" are, of 
> course, two different words).
>  

=====
Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions"
ISBN: 1590592174

web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald@xxxxxxxxx

Coming Soon! "Oracle Insight - Tales of the OakTable"

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, 
and...he will sit in a boat and drink beer all day"

------------------------------------------------------------


        
        
                
___________________________________________________________ALL-NEW Yahoo! 
Messenger - sooooo many all-new ways to express yourself 
http://uk.messenger.yahoo.com
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: