Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: "rename" fails, can I trap the error and try again?
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
![]() |
![]() |