Subject | Re: Generator Problems |
---|---|
Author | L |
Post date | 2006-04-08T15:10:58Z |
I think I have solved the problem
The tables in question have what I would call a design flaw... the
RECID is not an integer, but a FLOAT. Some tables were migrated from
Paradox, where Numberic type was used and not converted to Integer. My
RECID was > 16,500,000 what ever the magic nuymnber that starts
messing up the representation of FLOAT.
I ran several data loads and generator is doing what is supposed to do.
I guess that is why I no longer use the types FLOAT, DOUBLEPRECISION
in new db's I design in favor of various standard NUMBERIC(x,y)
depending on what is being stored.
I am now using IBPUMP to move data from old DB to NEW DB and it should
get me going once I review some delphi code and make sure no datasets
have the RECID in the design time objects.
- Lou
The tables in question have what I would call a design flaw... the
RECID is not an integer, but a FLOAT. Some tables were migrated from
Paradox, where Numberic type was used and not converted to Integer. My
RECID was > 16,500,000 what ever the magic nuymnber that starts
messing up the representation of FLOAT.
I ran several data loads and generator is doing what is supposed to do.
I guess that is why I no longer use the types FLOAT, DOUBLEPRECISION
in new db's I design in favor of various standard NUMBERIC(x,y)
depending on what is being stored.
I am now using IBPUMP to move data from old DB to NEW DB and it should
get me going once I review some delphi code and make sure no datasets
have the RECID in the design time objects.
- Lou
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
>
> --- In firebird-support@yahoogroups.com, "L" <lfeliz@> wrote:
> >
> > Help!
> >
> > Loading data into a table. Table has a Before Insert trigger that sets
> > RECID = Gen_Id(Gen,1);
>
> I assume you mean:
>
> NEW.RECID = Gen_ID(Gen, 1);
>
> >
> > When loading 45000 records, 23,000+ have duplicate values in columns
> > that should be unique per generator assignment. The field value is
> > null on insert.
>
> Is it possible that the trigger as been de-activated by someone. Even
> so, the NULL should be rejected by the PK index.
>
> >
> > Background:
> >
> > PRocess ran fine on FB Win32 SS 1.0.3.972
> >
> > Upgr to Win32 SS 1.5.3.4870
> > a) BAckup 1.0.3 database, using 1.0.3 GBAK as well as a copy using
> > winzip with service stopped.
> > b) un-install FB 1.03
> > c) Install FB 1.5.3
> > d) Restore database backup
> >
> > Run process to load records, inspect data and records do not have
> > unique record id. Come similar records have
> >
> > My next step is to re-build database using SQL script and then try
> > again. If anyone is interesting in helping, I an provide Databases,
> > but they are large 1.2 GB+.
>
> Too large sorry. Do you get the same issue if you do a 'meta-data
> only' backup/restore? I believe there was an issue in 1.0.x where you
> could disable a PK index (1.5+ prevents this). If the index is
> disabled, then NULLs (and duplicates) will be legal. If the trigger is
> also inactive you will get this issue.
>
> >
> > I have tried just have 1.5.3 server open original FDB file. Also
> > restored badkup to much faster server (win 32 dual xeon) running
> > 1.5.3 Classic. and same problem occurs.
> >
> > Tried on a dev workstation that was upgraded from 1.0.3 to 1.5.3 and
> > process works fine and triggers / gen_id function correctly .
> >
> > Cannot reliably reproduce problem, but thought I would report here.
> >
> > - Lou
> >
>
> Adam
>