Re: "Duplicated key" errors after importing schema

"Martin Cordova" <[email protected]>
Newsgroups gmane.comp.db.maxdb
Message-ID <[email protected]>
I did not touch the sequence value (not before/not after), so I think
is this option:

"a bug in the sequence import or export code"

I noticed that export does not export functions either...

I remember someone discussed this subject in the list months ago, but
I cannot find that msg thread.

Best regards,
Martin

On 3/30/07, Robert Klemme <[email protected]> wrote:
> 2007/3/29, Martin Cordova <[email protected]>:
> > Hello:
> >
> > I am using MaxDB 7.6.0.34.
> >
> > I have noticed that after importing a schema, If I use a sequence to
> > feed a primary
> > keys during inserts, the first time an insert is executed, i receive a
> > "duplicated key...." error, which happens only the first time. After
> > that inserts proceed normally.
> >
> > Is there a way to avoid this behaviour?
> >
> > I am importing the schema using something like:
> >
> > TABLELOAD USER
> >         CATALOG INSTREAM '/dbbackup/catalog.dat'
> >         DATA INSTREAM '/dbbackup/data.dat'
>
> Did you import the sequence or create it differently?
>
> I can think of a number of reasons for the behavior you see:
>
> - before the schema was exported, the value that would be nextval was
> manually inserted into the table
>
> - a bug in the sequence import or export code
>
> - if you manually created the sequence you probably initialized it to
> a wrong start value
>
> Kind regards
>
> robert
>
>
> --
> Have a look: http://www.flickr.com/photos/fussel-foto/
>


-- 
Dinamica - RADical J2EE framework
open source, easy and powerful
http://www.martincordova.com

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.