Subject | Re: [firebird-support] Delete global temporary table |
---|---|
Author | Nick Upson |
Post date | 2016-04-03T15:06:24Z |
Nick Upson,
Principle Operations Engineer, Telensa Ltd.
Direct
+44 (0) 1799 533252, Support Hotline +44 (0) 1799 399200
On 3 April 2016 at 11:03, Michael.Vilhelmsen@... [firebird-support] <firebird-support@yahoogroups.com> wrote:Hi
I have a routine in my program, where I create af user specific global temporary table.
Below you can see, how its created.
At some point last monday, a user had a program breakdown, which har left the database in a state, where I cannot make a backup, cannot access one of the global temporary tables.
Backup fails with this:
gbak: ERROR:database file appears corrupt (E:\DB\NYFORM\OCCEASYPOS.FDB)
gbak: ERROR: wrong page type
gbak: ERROR: page 15344590 is of wrong type (expected 6, found 7)
gbak: ERROR:gds_$compile_request failed
gbak:Exiting before completion due to errors
Accessing the table, results in this:
database file appears corrupt (E:\DATA\NYFORM\OCCEASYPOS.FDB)
wrong page type
page 15344590 is of wrong type (expected 6, found 7)
Same error, if I want to drop the table..
How do I get around this error?
I would like to drop the table.
Its Firebird 2.5. Classic. But copying the database to my local machine results in the same (Firebird 2.5 superserver).
Regards Michael
This is how I create the table:
DMTransaktionSalg.OmsStatTempTabele.Script.Add('create global temporary table OmsStat2'+Afdelingsnummer+Underafdelingsnummer+'(');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' ID int not null primary key,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' Afdeling_ID Varchar(30),');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' UAfd_Navn Varchar(30),');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' Felt1 Varchar(30),');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' Felt2 Varchar(30),');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' Felt3 Varchar(30),');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' Felt4 Varchar(30),');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' Felt5 Varchar(30),');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' Felt6 Varchar(30),');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeStk1 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeDG1 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeSpr1 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeDB1 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeKpr1 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeMoms1 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeStk2 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeDG2 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeSpr2 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeDB2 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeKpr2 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeMoms2 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeStk3 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeDG3 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeSpr3 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeDB3 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeKpr3 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' PeriodeMoms3 Float Default 0,');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' Oprettet Date Default ''NOW'',');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' SidsteBruger Varchar(40) Default Current_USer Collate None');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' )');
DMTransaktionSalg.OmsStatTempTabele.Script.Add(' On Commit preserve rows;');