Script to overcome ORA-54 during DDL 2004-06-25 - By Connor McDonald
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@(protected) > 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@(protected)
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@(protected)
put 'unsubscribe ' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
|
|