Re: dbexport miracle
Posted in 1999
Topics: Migration, Import/Export & Data Conversion
No,
dbexport checks indexes and if it has problem,get error and fails.
Babak
> From klaus.mueller@sni.be Fri May 7 16:41:21 1999
> From: Klaus Mueller <klaus.mueller@sni.be>
> To: informix-list@iiug.org
> Subject: Re: dbexport miracle
> Date: Fri, 07 May 1999 11:58:42 +0200
> X-List-Gateway: comp.databases.informix
>
>
>
> mhiller@my-dejanews.com wrote:
>
> > Hi,
> > i 'dbexport'ed a database and dropped it.
> > When i try to 'dbimport' i get err 239:
> > "Could not insert new row - duplicate Value in
> > a unique index column".
> > The particular table only contains a unique indexed int field
> > and a text field.
> > I checked the unload file and actually there
> > were double columns!
> >
> > How can this be?
> >
> > (Online 5.02, SCO 3.2v5.0.2)
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
> Hi;
>
> dbexport will not do checks; it exports the data only (with unload:
> sequential
> read, therefore no access to the indexes).
> Before doing a dbexport of a certain database: check the database with the
> tbcheck-cmds (esp. tbcheck -cI ...).
>
>
Sorry, but my expereience is a different one;
try the following simple test(!):
- create a table with (p.e.) an integer-field
- insert several sentences with the same value
- create an index on that table (a duplicate one)
- change in the sysindexes the idxtype for that index from "D" to "U"
==> dbexport will terminate without any problems: if you look into the dbexport-
created sql-file, you will see that he creates an unique index therein for that
table.
What does that prove ?
1: dbexport uses the system-table-information for creating the resp.
SQL-statements.
2: a comparison with the information in the tablespace-tablespace for the resp.
table seems not to be done.
3: also if dbexport recognizes a unique index, he will not try to verify, if the
information in the resp. field is really
unique. You could say: ok, he will only do a comparison of the
table-contents, if he recognizes in the tablespace-
tablespace for that table, that the index is unique.
In fact: i changed this information in slot4 of the tablespace-tablespace to
a unique index (handish).
dbexport didn't care about it.
There is (i think) only one source of errors, which can be detected by dbexport:
that are inconsistencies in the
system-tables of INFORMIX. If you have such problems, dbexport will be able to
recognize it.
My experience: run oncheck with all his options, before doing a dbexport of a
database.
Marc
Babak Bayati wrote:
> No,
> dbexport checks indexes and if it has problem,get error and fails.
> Babak
> > From klaus.mueller@sni.be Fri May 7 16:41:21 1999
> > From: Klaus Mueller <klaus.mueller@sni.be>
> > To: informix-list@iiug.org
> > Subject: Re: dbexport miracle
> > Date: Fri, 07 May 1999 11:58:42 +0200
> > X-List-Gateway: comp.databases.informix
> >
> >
> >
> > mhiller@my-dejanews.com wrote:
> >
> > > Hi,
> > > i 'dbexport'ed a database and dropped it.
> > > When i try to 'dbimport' i get err 239:
> > > "Could not insert new row - duplicate Value in
> > > a unique index column".
> > > The particular table only contains a unique indexed int field
> > > and a text field.
> > > I checked the unload file and actually there
> > > were double columns!
> > >
> > > How can this be?
> > >
> > > (Online 5.02, SCO 3.2v5.0.2)
> > >
> > > -----------== Posted via Deja News, The Discussion Network ==----------
> > > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
> >
> > Hi;
> >
> > dbexport will not do checks; it exports the data only (with unload:
> > sequential
> > read, therefore no access to the indexes).
> > Before doing a dbexport of a certain database: check the database with the
> > tbcheck-cmds (esp. tbcheck -cI ...).
> >
> >