Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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

asked 27 Jan '13, 16:43

robert's gravatar image

robert
853475468
accept rate: 0%

edited 27 Jan '13, 17:00

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050

Make sure there are no other users connected when you run the validation.

(27 Jan '13, 17:01) Breck Carter

Is the database used by other connections (and are these possibly doing transactions)? - If so, note that validation should be done on a "quite" database, otherwise false positives may be shown.

(27 Jan '13, 17:02) Volker Barth
2

@Volker: I assume you meant to write "quiet" :-)

(28 Jan '13, 03:46) Reimer Pods

@Breck: There are no other users connected when I run the validation. I should also mention that I validated all tables and indexes, and got no errors reported. I am wondering what a physical index is? What other indexes exist?

(28 Jan '13, 07:49) robert
Replies hidden

A physical index is the real thing. If two logical indexes (the kind you create with CREATE INDEX, PRIMARY KEY, UNIQUE constraint, etc) refer to the same columns in the same order then they will implemented by the same single physical index. Otherwise, no difference.

(28 Jan '13, 09:06) Breck Carter

Time to call tech support, or recover from a backup.

(28 Jan '13, 09:07) Breck Carter
showing 4 of 6 show all flat view

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

permanent link

answered 28 Jan '13, 13:26

Jason%20Noack's gravatar image

Jason Noack
93111218
accept rate: 69%

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

(30 Jan '13, 08:21) robert

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

(24 Sep '13, 10:20) robert
Replies hidden

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

(24 Sep '13, 10:57) Justin Willey

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

Good luck to you!

(24 Sep '13, 11:09) Jason Noack

Did rebuild the productive database – validates correctly (again :-) Thanks!

(25 Sep '13, 04:23) robert
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×30

question asked: 27 Jan '13, 16:43

question was seen: 8,229 times

last updated: 25 Sep '13, 04:23