PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : interbase page type?



Andislack
12-02-2003, 13:42
hi!

ich hab mit interbase noch null erfahrung und bekomme diese fehlermeldung, wenn ich auf eine interbase datenbank connecten will:


Warning: InterBase: database file appears corrupt () wrong page type page 24672 is of wrong type (expected 3, found 0) in /DatenI/Homepage/mbm/test/interbase_test.php on line 11

Warning: ibase_query(): no InterBase link resource supplied in /DatenI/Homepage/mbm/test/interbase_test.php on line 13

Warning: ibase_fetch_object(): supplied argument is not a valid InterBase result resource in /DatenI/Homepage/mbm/test/interbase_test.php on line 14

Warning: ibase_free_result(): supplied argument is not a valid InterBase result resource in /DatenI/Homepage/mbm/test/interbase_test.php on line 17

Warning: ibase_close(): 0 is not a valid InterBase link resource in /DatenI/Homepage/mbm/test/interbase_test.php on line 18


die datenbank ist aus einem wawi programm GDI

hier mal mein connect code:





<?php

$host = 'localhost:/DatenI/Homepage/mbm/test/test_db/GDI.GDB';
$username = 'sysdba';
$password ='masterkey';

$dbh = ibase_connect($host, $username, $password);
$stmt = 'SELECT * FROM ARTIKEL';
$sth = ibase_query($dbh, $stmt);
while ($row = ibase_fetch_object($sth)) {
echo $row->ARTTEXT, "\n";
}
ibase_free_result($sth);
ibase_close($dbh);

?>



was fehlt da wegen dem page code? bzw. welchen muss ich angeben?

hoffe ihr könnt mir helfen...danke!

andi

netzmeister
12-02-2003, 13:50
Hallo Andi,

versuchst Du möglicherweise auf eine mit einer anderen Interbaseversion erstellte
Datenbank zuzugreifen?

Viele Grüße

Eicke

Andislack
12-02-2003, 23:48
hi eicke!

also die db läuft auf windows in verbindung mit einem firebird server version 1.0.0
auf meinem linux-server ist eine version installiert, die von dem wawi GDI direkt dafür angegeben wird für den betrieb unter linux.
FirebirdSS-1.0.0.796-0

die db soll eigentlcih 1:1 zu übernehmen sein (von win -> linux) hat man mir gesagt...


woran könnte der fehler liegen?

gruss andi

Andislack
13-02-2003, 07:28
Also meinst du das die Interbase DB mit einer anderen Version erstellt wurde, als nun auf meinem Server läuft?

Ist es denn Hilfreich die neuste Version zu installieren, also ist es abwärtskompatibel?

Mattburger
13-02-2003, 08:19
Hi ,

ich hatte mal das selbe Problem.
Hier hilft eigentlich nur ein backup der "anderen" Version und ein Import der aktuellen IB-Version.

Gruesse
Mike

Hans-Georg Normann
13-02-2003, 21:12
Stecke selbst noch in den Kinderschuhen, verzeiht mir deshalb eine vielleicht blöde Frage: Wenn ich eine Datenbank von einem Server auf einen anderen kopieren will, kann ich das mit gbak machen. Muß ich die Datenbank mit der Vresion exportieren, mit der die Originaldatenbank läuft oder kann ich das mit (fast) jedem beliebigen zur Serversoftware gehörenden gbak machen?

Hans

Mattburger
14-02-2003, 09:48
Ich bin mir nicht 100% sondern nun 98.5% sicher,

- aber das sollte eigentlich mit jeder Versin funktionieren.
Ich hab einige Stellen in der Doku gefunden bei dehnen Interbase stolz auf das Backup-Format war welches die Protierung auf unterschiedliche Platformen erlauben soll.
Probiers doch einfach mal aus. Bisher hats bei mir immer funktioniert. Ich muss allerdings dazu sagen, das ich die Backup-Funktionalitaet selten benutzt habe. Meine Programme sind grundsaetzlich fuer mehrere Datenbanken geschrieben und die Portierung von einer DB in die andere erfolgt duch ein eigenes Backup-Format.

Gruesse aus Reutlingen

Mike

Andislack
24-04-2003, 22:39
hi!

ein kleines feedback:
so kann man seine db wieder reparieren...zumindest kann man es so versuchen:

Problem:
When trying to access a database the error occurs:

database file appears corrupt (wrong type page)
page xxxx is of wrong type (expected x, found x)


Solution:
Corruption has most likely occurred in the database. There are a few
options to try, but some data may be lost. You can take steps to
salvage the data (discussed later), but a fresh database will have
to be made. A gbak of the database is not sufficient in most cases,
because suttle corruption can be propagated through a gbak backup
and restore.

To remedy the corrupted database, one can either run gfix against the
database or copy the data to a new database. Copy data table by table,
committing each, until all data has been copied.


Steps to fix database:
--------------------------------
1) always work with a copy of the database in case further damage
occurs. Working with a copy also gives you exclusive access
which is required to perform the following operations:

2) gfix -v -f database.gdb

3) if previous step reports corruption: gfix -m -i database.gdb

4) repeat step 2 to see if the corruption was fixed

Steps to salvage data
-------------------------------
1) create a new database with the same metadata structure:

A) gbak -m will backup only the metadata. It can then
be restored to create a new database.

B) isql -x -a will extract the metadata to a script file.
isql -i scriptfile will then create the new database.

2) copy the data to the new database:

A) Delphi's datapump can be used to copy data from all tables
to a new database.

B) use isql to perform a table by table copy of the data.

http://bdn.borland.com/article/0,1410,25136,00.html

meine db ließ sich so nicht reparieren...hab dann nochmal die db neu erstellen lassen und dann gings ohne probleme.

gruss andi