From oracle-l-bounce@freelists.org Fri Jun 25 21:43:32 2004 Return-Path: Received: from air189.startdedicated.com (root@localhost) by orafaq.com (8.11.6/8.11.6) with ESMTP id i5Q2hH405294 for ; Fri, 25 Jun 2004 21:43:27 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i5Q2h6605288 for ; Fri, 25 Jun 2004 21:43:16 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0809572C22B; Fri, 25 Jun 2004 21:26:15 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18749-73; Fri, 25 Jun 2004 21:26:14 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5FFF572C245; Fri, 25 Jun 2004 21:26:14 -0500 (EST) Received: with ECARTIS (v1.0.0; list oracle-l); Fri, 25 Jun 2004 21:24:54 -0500 (EST) X-Original-To: oracle-l@freelists.org Delivered-To: oracle-l@freelists.org Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A9F6572C09D for ; Fri, 25 Jun 2004 21:24:53 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18676-49 for ; Fri, 25 Jun 2004 21:24:53 -0500 (EST) Received: from web25202.mail.ukl.yahoo.com (web25202.mail.ukl.yahoo.com [217.12.10.62]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with SMTP id D95FC72C022 for ; Fri, 25 Jun 2004 21:24:52 -0500 (EST) Message-ID: <20040626024650.6646.qmail@web25202.mail.ukl.yahoo.com> Received: from [203.59.108.213] by web25202.mail.ukl.yahoo.com via HTTP; Sat, 26 Jun 2004 03:46:50 BST Date: Sat, 26 Jun 2004 03:46:50 +0100 (BST) From: =?iso-8859-1?q?Connor=20McDonald?= Subject: Re: Script to overcome ORA-54 during DDL To: oracle-l@freelists.org In-Reply-To: <016401c45b02$9a4e4720$7102a8c0@Primary> MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at freelists.org X-archive-position: 3747 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: hamcdc@yahoo.co.uk Precedence: normal Reply-To: oracle-l@freelists.org X-list: oracle-l X-Virus-Scanned: by amavisd-new at freelists.org 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 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@yahoo.com 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@freelists.org 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 -----------------------------------------------------------------