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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to restore a table with half a million rows?

Re: How to restore a table with half a million rows?

From: <kal121_at_my-deja.com>
Date: 2000/05/09
Message-ID: <8f7mgt$h6o$1@nnrp1.deja.com>#1/1

Why not back up the table first? As in:

CREATE TABLE backup
TABLESPACE tblspace_name
DEFAULT STORAGE(
INITIAL 1M -- put your own values here NEXT 1M
PCTINCREASE 0
)
AS SELECT * FROM original;

When you need to restore your original, DROP it and re-create it from your backup table:

CREATE TABLE original
TABLESPACE tblspace_name
DEFAULT STORAGE(
INITIAL 1M -- put your own values here NEXT 1M
PCTINCREASE 0
)
AS SELECT * FROM backup;

This should go faster than an exp/imp plus it's easier.

I recommend using the storage clause for that size table.

In article <8f7g2k$9uv$1_at_nnrp1.deja.com>,   wjeffery_at_my-deja.com wrote:
> Hi all,
>
> I have a table with about half a million rows. There are some
 testing
> on this table: Delete, update and add some rows . After testing. I
 want
> to restore the table to its pre-test status. I can export this table
> before testing and import this table again after testing, but there
 are
> so many rows in it. it may take a long time. Is there any quick way
> to do so?
>
> Thanks
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue May 09 2000 - 00:00:00 CDT

Original text of this message

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