cancel
Showing results for 
Search instead for 
Did you mean: 

The database could not be validated.

huber1
Participant
8,521

Hi

When running VALIDATE DATABASE from Sybase Central (or in Interactive SQL as command) I get the following messages:

Page 0000037d of database file "E:\\SQLAnywhere12\\databases\\Hades.db" references a physical index (1295, 1) that doesn't exist
Orphaned page (00000695) found in database file "E:\\SQLAnywhere12\\databases\\Hades.db"
Page 00000df8 of database file "E:\\SQLAnywhere12\\databases\\Hades.db" references a physical index (1295, 1) that doesn't exist
Orphaned page (00000ecc) found in database file "E:\\SQLAnywhere12\\databases\\Hades.db"
Page 00000efa of database file "E:\\SQLAnywhere12\\databases\\Hades.db" references a physical index (1295, 1) that doesn't exist
Orphaned page (00000efc) found in database file "E:\\SQLAnywhere12\\databases\\Hades.db"
java.sql.SQLException: [Sybase][ODBC Driver][SQL Anywhere]Run time SQL error -- Database validation failed for database file "E:\\SQLAnywhere12\\databases\\Hades.db"
The database 'Hades' could not be validated.

Any hint how to cure that problem?

Thanks, Robert

Accepted Solutions (1)

Accepted Solutions (1)

jason_noack
Associate
Associate

Hello Robert,

I believe that the errors are likely real and likely caused by an old bug in the software. The cause of the errors is that there are some pages in the database file that seem to still be allocated to an object (index in this case) that no longer exists. These pages haven't been freed and thereby cannot be re-used for another purpose. They are essentially leaked pages in the database file. They don't actually present a problem other than the validation errors that they cause. Rebuilding the database (unloading and reloading) will solve the issue for you. I'd recommend using a more recent build to prevent this from occurring again as I do recall some issues that could cause this behavior.

Jason Noack

huber1
Participant
0 Kudos

Jason,

Thanks a lot for your answer, I am relieved to hear that. At a good moment, I will do what you suggest.

Regards, Robert

huber1
Participant
0 Kudos

I am still a bit uncertain what to understand by Rebuilding (unload and reload) the database. I did it with Sybase Central, menu Tool > SQL Anywhere 12 > Unload Database then followed the on-screen messages to the screen Connect ot the Database which I unchecked and that created a database file and a log file to the desktop. Which I put after shutting down the database into the correct folder. Now validation was ok. Is that one of the correct ways to rebuild a database? I assume so, but would be glad to hear it's correct.

Robert Huber

justin_willey
Participant
0 Kudos

Yes - Unloading and Reloading are the processes need to Rebuild a database. You can also do the same thing with command line tools - see dbunload.exe

jason_noack
Associate
Associate
0 Kudos

Yes Robert that is precisely the mechanism I was referring to.

Good luck to you!

huber1
Participant
0 Kudos

Did rebuild the productive database – validates correctly (again 🙂 Thanks!

Answers (0)