Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: "rename" fails, can I trap the error and try again?

Re: "rename" fails, can I trap the error and try again?

From: Steinar Orset <steinar_at_quasar.no>
Date: Tue, 03 Oct 2000 16:18:56 GMT
Message-ID: <39DA06E9.48EF65C3@quasar.no>

Hello,
Have you tried with :

drop table DTMP1;
commit;
rename DTABLE to DTMP1;

Steinar.

Haral Tsitsivas wrote:

> At periodic intervals I need to rename a large table (to avoid copying
> thousands of records) and start gathering data in a new table. I try
> this as follows:
>
> drop table DTMP1;
> rename DTABLE to DTMP1;
> create table DTABLE as select * from DTMP1 where 1 = 2;
> ...process records from DTMP1...
>
> However, occasionally (when the database is busy) the rename will fail with:
>
> ORA-00054: resource busy and acquire with NOWAIT specified
>
> How can I trap or retry until the rename succeeds before continuing?
>
> Thanks
>
> --
> --Haral Tsitsivas (haral_at_unisol.com)
Received on Tue Oct 03 2000 - 11:18:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US