Identifying Trafodion version via SQL

Asked by Tung Jin Chew

Hi,

Is there any way to identify the Trafodion version via a SELECT statement in SQL?

I'm trying to use Trafodion as the backend for an existing ODBC program, and it currently determines which SQL dialect to use by testing various SQL SELECT statements to see which dialect is applicable, e.g. 'select version()' for PostgreSQL, 'select @@version' for MS-SQL or 'select * from v$version' for Oracle.

Is there anything similar for Trafodion? The closest thing I've found is the 'VERSION' command in `trafci`, but this isn't a SELECT.

Thanks,
Jin

Question information

Language:
English Edit question
Status:
Solved
For:
Trafodion Edit question
Assignee:
No assignee Edit question
Solved by:
Tung Jin Chew
Solved:
Last query:
Last reply:
Revision history for this message
Anoop Sharma (anoop-sharma) said :
#1

There are 2 kinds of versions: trafodion release version which is the version of released software
and metadata version which is the version of current metadata.

In metadata schema, there is VERSIONS table which contains metadata and software version.
One can select these out to get the latest version.
  select major_version, minor_version from trafodion."_MD_".version where version_type = 'METADATA'
will return metadata version.
    version_type = 'SOFTWARE' will return software version.

Current metadata version is 2.3 (major version 2, minor version 3).
Current software version is 0.8 (major 0, minor 8) but due to a bug, it has not been updated correctly.
We will fix that as part of the next release.

Revision history for this message
Tung Jin Chew (tung-jin-chew) said :
#2

That's very helpful, thank you! It works for me on 0.8.3 with
  select major_version, minor_version from trafodion."_MD_".versions where version_type = 'METADATA'

('version' didn't work, but 'versions' did; assuming that's just a typo and not a planned schema change)

Revision history for this message
Anoop Sharma (anoop-sharma) said :
#3

Yes, that was a typo.
Table name is VERSIONS.

Additional note: To see all metadata tables, one can do,
  get tables in schema trafodion."_MD_";