cancel
Showing results for 
Search instead for 
Did you mean: 

File software version db

2,962

How do I know which software version was created db file?You have any command line that I can use?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

There is a sys.syshistory system view which has an 'INIT' record in it that will tell you that.

Answers (3)

Answers (3)

Former Member

Maybe the better question to ask is... Why do you need to know?

So far we do know it was created with a version that has not shipped anytime in the last decade or so. Whatever do need from this exercise is probably going to require a rebuild with current releases before you can do anything with that; unless you have 9.0.2 or earlier software to work with.

0 Kudos

@Nick Elson S...

Why do you need to know?

There structure of tables that are not contained in inferior versions ASA V9 version.

example:

 IF NOT EXISTS (select constraint_name from SYSCONSTRAINT WHERE CONSTRAINT_NAME = 'xxxxxxxx') then
 //bla bla bla...   
 end if;

Displays error: Table 'SYSCONSTRAINT "not found

The system created functions that check if the table is still there trying to create it with this customer (db) that are not updated to 9.0.2.3951 EBF present error. I want to create a mechanism to detect all clients that are outdated in order to update them (have to generate a report) for technical support form an action plan (among other things).

VolkerBarth
Contributor

Well, then as stated, you simply may have to look if the database has the mentioned SYS.SYSHISTORY table - if so, it it version 9.0.1 or above (and what exact version, the row with the "INIT" record will tell, see Nick's first answer), and if not, it's v9.0.0 or below - and then would have to be upgraded. Would that not do the trick?

reimer_pods
Participant

Here's a brute force approach: with any program that allows to view binary data you scan the header block of the DB file. Here I even used Wordpad (works only for small files). Next to the copyright string you'll find the version and build of the engine that was used to create the database


Re File software version db

I've use this technique to write a batch file which automatically starts the database using the corresponding engine version by open ISQL with the proper connection parameters.

VolkerBarth
Contributor
0 Kudos

One might add that this does also work for strongly encrypted database files (at least with AES encryption).

0 Kudos

My problem is just with lower versions ASA V9. Using "brute force" see the following text:

    ÿÿÿÿÿÿÿÿv7   WATCOM Iÿÿÿÿÿÿÿÿ\x05\x04              right (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) ÿÿÿÿÿÿÿÿ94 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International Corp., Copyright (c) 1987, 1994 WATCOM International CorpNSA
Former Member
0 Kudos

That could be any version 7.0.x or earlier from what I can estimate. If it were an 8.0.x created database I would expect the version to be exposed (as I can verify from an 8.0.2 database I still have access to).

0 Kudos

That same copyright string is present in databases created with Watcom SQL 4.0 all the way up to 7.0.4. (Watcom SQL 3.2 contains a similar string with the dates 1987, 1993).

Perhaps the 'Capabilities' database property could help?

VolkerBarth
Contributor
0 Kudos

Just to add a little bit more "history": In case your database does not have a SYSHISTORY table in the system catalog, it has been created with v9.0.0 or before, as SYSHISTORY has been introduced in 9.0.1.


Furthermore, if you are interested in a programmatical method, you can also use the DBTools API function DBCreatedVersion() to get file version information, though that does only differentiate between the major versions (pre-v10, v10, v11, v12 and the like) and does not help w.r.t. to versions before v10...