It seems our sql database is corrupted

sybase-sql-anywhere

Is there a way to completely check a SQL-Anywhere database (5.5.05) integrity?

"Validate" won't help: we had databases that were broken but "validate" always told us that everything is o.k.

I had the idea to simple read every record in every table (first "select count(*) from. ", second "select * from. ") Number of readed records must be same as the number of records reported by the "count(*)".

This works ok (I can report errors) – but I have found a database that will "hang" on the "Count(*)" (seems to loop forever, CPU-Usage 100% for >20Min (than I stopped it)

Any other ideas?

Best Answer

Try unloading and then reloading the database - if that runs OK then the re-built database will be OK. Look at the docs for details of the dbunload.exe utility.

If you need more help then you can try posting on the dedicated SQL Anywhere forum http://sqlanywhere-forum.sap.com/, but don't forget that v5.5 hasn't been officially supported since 2002 - current version is v16!