3

What query or command to determine Sybase SQL Anyware version?

I use sqlsh + freetds as interactive client (in Emacs).

gavenkoa
  • 45,285
  • 19
  • 251
  • 303

1 Answers1

3

For databases, you can use the SYSHISTORY system view to find out what version the database was created at.

select version from SYSHISTORY where object_id = OBJ_ID_OF_DB

If you databases were migrated from earlier installations, and don't show the version number you expect, you probably could just create a small database, and take a look at the version history information.

Mike Gardner
  • 6,611
  • 5
  • 24
  • 34
  • 2
    I issue `select version from SYSHISTORY;` as don't know *OBJ_ID_OF_DB*. Great! +1 – gavenkoa May 27 '14 at 18:01
  • could not execute statement column 'OBJ_ID_OF_DB' not found sqlcode=143, odbc3 state=4252 – gg89 May 23 '15 at 19:27
  • t could not execute statement select version from SYSHISTORY where object_id = OBJ_ID_OF_DB column 'OBJ_ID_OF_DB' not found sqlcode=143, odbc3 state=4252 for the statement Actually all object_ID values for my database are 0(zero) for syshistory rows However the next statement works select version,* from SYSHISTORY where operation in ('INIT', 'UPGRADE') – gg89 May 23 '15 at 19:43