Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Block DML!?
JZ wrote:
> Oracle 9205 on Linux 2.1
>
> Our app INSERTs into DB 24*7, around 200 rows per second (only insert
> into 1 target table). What I want to do is to block the INSERT
> temporarily, and during the block period, I want to do:
>
> 1. rename the target table:
> rename target to old_target;
>
> 2. create new empty target table:
> create table target as select * from old_target where 1=2;
>
> So when INSERT resumes, the records can be inserted into the NEW
> target table.
>
> And during block period, I don't wanna get any error messages, like
> 'target tables doesn't exist'. Basically I don't want to lose any data
> from INSERT fired by our app.
>
> How can I do this?
>
> Thanks a lot!
There is no need to block inserts.
Look at the demo of DBMS_REDEFINITION at http://www.psoug.org.
Click on Morgan's Library.
Click on DBMS_REDEFINITION
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Thu Aug 05 2004 - 21:31:27 CDT