Re: How to exit from pl/sql

From: Mark D Powell <>
Date: Wed, 30 Jan 2008 10:51:54 -0800 (PST)
Message-ID: <>

On Jan 30, 12:01 pm, wrote:
> Thanks David for responding.
> 500 is just a test number. What we are trying to do:
> - we have a table that has a high amount of DML all the time (24x7) in
> fact every second
> - at midnight we want to truncate the table. the reason for the pl/sql
> procedure is to get around the ORA-00054 resource busy error.
> Your suggestion for select count(*) may not work in this scenario.

If the table is used 24x7 are you sure you can in fact truncate the table without losing data that has not been processed?

With 10g the new DDL_WAIT_FOR_LOCKS parameter, which is listed as being session alterable, might be of interest. You should be able to make the truncate wait instead of issuing an immediate 00054 error.

HTH -- Mark D Powell -- Received on Wed Jan 30 2008 - 12:51:54 CST

Original text of this message