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: Simple Question for you all...

Re: Simple Question for you all...

From: Joel Garry <joel-garry_at_home.com>
Date: 28 Oct 2003 14:12:27 -0800
Message-ID: <91884734.0310281412.6754909c@posting.google.com>


Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1067044017.368279_at_yasure>...
> Joel Garry wrote:
>
> >Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1067010472.19413_at_yasure>...
> >
> >
> >>TheSensFan wrote:
> >>
> >>
> >>
> >>>I have a table in my Oracle database that I will be performing some updates
> >>>on and would like to be able to revert back to the original table if the
> >>>changes I make do not work.
> >>>
> >>>So far I am able to do an export of the table and import the table (using
> >>>exp and imp). However, I can not seem to get the import to overwrite
> >>>entries.
> >>>
> >>>
> >>>
> >>>From the looks of things I have to delete the old entries and then do an
> >>
> >>
> >>>import.
> >>>
> >>>So I guess the short of it all is. Is there a way to import a table and
> >>>force it to overwrite?
> >>>
> >>>Thanks!
> >>>
> >>>
> >>>
> >>>
> >>>
> >>Seems to me a far easier thing to do would be:
> >>
> >>CREATE TABLE mytable_bak
> >>PCTFREE 0
> >>NOLOGGING
> >>TABLESPACE <tablespace_name> AS
> >>SELECT * FROM mytable;
> >>
> >>Hard disk is hard disk. The backup table will take no more room than the
> >>export and be
> >>both faster and simpler.
> >>
> >>
> >
> >
> >Hard disk may be hard disk, but comress is beyond Oracle's ken. From
> >a data management viewpoint, you might want to keep the exported file
> >backed up elsewhere, and not impact backups on the original db.
> >
> >Of course, it only makes a difference if it is a big enough amount of
> >data to, uh, make a difference.
> >
> >jg
> >--
> >@home.com is bogus.
> >http://www.signonsandiego.com/news/uniontrib/fri/business/news_1b24gateway.html
> >
> >
> The OP wants to restore after some updates in case something goes
> terribly wrong. No mention was made of
> keeping anything. The initial backup size using CREATE TABLE isn't going

Well, he didn't say how long he was going to be working on it, nor how big the table is. Since I tend to work on things that barely fit on the hardware to begin with and may take days to process, I see things from that skew.

> to be significantly different from
> the size of the EXPORT and you are incorrect. Tables can be compressed.
>
> http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_32a.htm#2079572
>
> Might not be of any value here ... but it does exist.

You are right, and I've never used that new feature. I'd be curious as to the performance impact, the stuff I work on tends to be cpu-bound, and often surprisingly so. I can see from the docs that it is mostly for read-only and [WARNING! WARNING! TROLL ALERT! :-] the tuning guide mentions how to reorganize rows ordered into blocks to increase the compression ratio.

Of course, the OP never did mention the version, that I saw.

jg

--
@home.com is bogus. "If the entries are not set, stopping a service
will be WORSE then a shutdown abort. WindowsNT and Windows2000 will
just "clean" the memory. (This could be  compared to a 'kill -9' on a
Unix system). This is likely to make any cold  backup useless. " -
metalink note
Received on Tue Oct 28 2003 - 16:12:27 CST

Original text of this message

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