SQL Anywhere: can connect but tables not accessible

Hi,

I had an issue with a SQL Anywhere database, it’s solved now, but more by luck than by thought, and I’d like to understand what I need to do next time it occurs.

When opening a solution, the access to one of the databases stopped to work.
When starting up Servoy, I got the error that the tables where missing (and subsequently, several errors concerning the relations).

I checked the Preferences/DB Servers/, it showed no error. When changing the password or the URL into an invalid value → got an error, changing it back to the valid values => OK, no error.

I connected to the database with SQL Anywhere 10, no error, all tables and views were present.

In Servoy, I opened the Data Provider window, the database itself was visible, but none of its tables !!!
I tried to add a new table to this database, no issue, I could add several fields and save. I then closed and reopened Servoy and surprise surprise, the table was no longer displayed in the dataproviders !! But when checking with SQL Anywhere, I found that the table was indeed created.

Funny thing is that it happened with only one database, the other SQL Anywhere databases were still accessible.

So I presumed it had it to do with the ‘JConnect’ meta-information (and not with the java version, see below, or jdbc driver ?).

So I created a new database and performed an Unload (with SQL Anywhere) from the old to the new database. I then changed the DB Server setting in Servoy to point to the new database, and hurah, it worked again.

But, it’s not exactly a clever way to fix this. Does anybody know:
o How can one see that there is a corrupt database (assuming there something was wrong with JConnect or ?)
o and if so, can this be repaired ? (without having to create a new db)
o or am I totally on the wrong track ?

Thanks in advance, stefaan

XP 5.1 Professional, v 5.1 SP 2
Servoy 3.5.3
jre1.5.0_06
SQL Anywhere 10
Driver: com.sybase.jdbc3.jdbc.SybDriver

A hint perhaps: the day before, I performed an upgrade to jre1.6.0_03 for an other app (but the Path still pointed to jre1.5_11).
Also, I performed a backup of this database, but I can’t understand how this could have caused the corruption.
One of the things I tried is to use different java version (j2re1.4.2_06, jre1.5.0_06, and jre1.6.0_03), but with no success.

Hi,

Based on what you experienced, it looks like the database was corrupted, which explains why unloading/reloading fixed the problem. This is a typical procedure to follow when your database gets corrupted.

To ensure data integrity, we recommend that in addition to your regular backups, you also validate the database. This will give you a heads-up of any potential problems you may encounter in the future. Ideally, you want to validate your database before and after each backup.

I hope this helps!

Jose Ramos
Product Manager
Sybase iAnywhere