Re: Sequence value after data refresh

From: onedbguru <onedbguru_at_yahoo.com>
Date: Fri, 1 Apr 2011 14:15:05 -0700 (PDT)
Message-ID: <6c6933a1-a645-48db-9233-ab668d8a89a4_at_k7g2000yqj.googlegroups.com>



On Mar 31, 1:56 pm, sankarKK <xta..._at_gmail.com> wrote:
> hi ,
>
> after refreshing testdb from proddb  I'm having an issue
>
>  We have 100 records in a table in testdb. Sequence=100.
>     200 records have been copied over from proddb. Sequence is still
> 100.
> When we try to insert next record, trigger tries to insert  value 101
> for the
> sequence, and it causes error (value not unique). So, value of
> sequence has be
> be taken from the db where we get data.
> I'am confused that user has been dropped with cascade, so all objects
> have been dropped in testdb, imported newly from proddb,
> how sequence value is showing old nextval.
>
> thanks
> tcy

Now let's think about this... you said that you "imported" from the proddb - correct?? Import will create the user and ALL of it's objects including the sequences with the PRODDB values - even if you only created an empty schema. Test it and see.

Not sure the concept is that difficult as to cause such confusion. Received on Fri Apr 01 2011 - 16:15:05 CDT

Original text of this message