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: export/import and sequences

Re: export/import and sequences

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: 1997/03/21
Message-ID: <33325113.32E5@bhp.com.au>#1/1

janet wrote:
>
> Hi gurus,
> i've checked dejanews but i don't see this exact topic
> covered. sorry for the newbie question.
>
> database 1:
> we have a table with a sequence. we export the table.
>
> database 2:
> we drop the table, we import it from above. (no special
> parameters)
>
> does the sequence get recreated?
> do the #'s on the 2 databases match? (this is what i really want)
> can i drop the sequence & not recreate it to make the #'s
> match?
>
> thanks
> janet

The pain with sequences is that whilst any values in columns in tables that were populated with the sequence are preserved, the sequence gets recreated starting at its initial value - so if columns with a primary keys for example, you get nasty constraint violations once you start re-using the sequence...

Before import, look at user_sequences on the source database and last_val + cache to determine a reasonable starting point for when you recreate the sequence on the destination database...

Have fun..

Cheers

-- 
Connor McDonald
Systems Administrator-Unix/Oracle
BHP Iron Ore
"You're not drunk if you can lie on the floor without holding on"
            - Dean Martin
Received on Fri Mar 21 1997 - 00:00:00 CST

Original text of this message

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