cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

analyse database

Former Member
0 Likes
5,321

Hi,

I've got a database file (*.db) from a customer who asks me to analyse its content. All what he knows is that it's a SQL Anywhere database, but no version number.

I've already downloaded SQL Anywhere Developer version 12 and 10. But both products reports a connection error, that this database was created with another version.

So how can I detect the database version to download the right developer suite ?

View Entire Topic
Former Member

1) Open db file in text editor 2) in first lines you will see text strings with database version and codepage.

MarkCulp
Participant
0 Likes

Yep, that is an easy method as well.... make sure you don't attempt to "save" the file using your text editor since this will likely corrupt it.

Note that the issue with this approach is that the text within the file records the version that created the file initially and does not reflect any changes made to the file format due to database upgrades. E.g. I could create a database using v10 and then upgrade the file to v12 - the text in the header page of the file will still say v10 but the database file format will actually be v12.

Breck_Carter
Participant

"the database file format will actually be v12"... are you suuuure of that? or is it just the catalog stuff that gets upgraded? (go ahead, rock my world 🙂

MarkCulp
Participant

Perhaps I was not clear saying "file format will actually be v12"? Most of the time when an upgrade is performed on a database it is only the catalog that is modified - add new tables and add new columns to existing tables, update views, etc - but once in a while the upgrade will also set a capability bit in the database that will mean "this database supports X" where X will be some new feature or file format that is only present in the file when the capability bit is set. In fact it is now common practice to always have two bits per release - one saying that the db was created by version Y and another bit saying that the db has been upgraded to version Y (and hence has all of the wonderful new things that Y can have when an upgrade has been done) - the features that can only be supported if the db was created by version Y get both of these two bits but any database that has been upgrade to Y only get the second bit. I cannot think of a specific non-schema change example at the moment... since I don't think we've had one (that I can remember?) since switching to the new major file format in v10. Perhaps someone else on the SA eng team can think of an recent example?