Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.


I would like to upgrade an SQL Anywhere 11 database to version 12. I started the version 11 database file with a version 12 database server. I then used Sybase Central to unload the database. I used Tools > SQL Anywhere 12 > Unload Database... I then followed the screen messages, starting with the first choice: Unload a database running on a curent version of the server. Then I chose Unload and reload into a new database. I saved it into a new database file (with Unload structure and data etc. set). As a result I got a database file and the log file. I assume this is now a real version 12 database and log file?

Best regards, Robert

PS: By the way, how can I verify the db file version it is/was built?

asked 15 Apr '11, 12:22

robert's gravatar image

accept rate: 0%

edited 15 Apr '11, 12:23

Yes this should be a version 12 database.

You can verify that by looking at the SYS.SYSHISTORY system view.

permanent link

answered 15 Apr '11, 12:36

Glenn%20Paulley's gravatar image

Glenn Paulley
accept rate: 43%

Thank you. As the table sys.syshistory doesn't have a database (file) column, it can't show the database file version, can it?

Best regards, Robert

(15 Apr '11, 13:20) robert
Replies hidden

If you look in the SYSHISTORY table, you should see a line with operation='INIT'. The value of the version column will tell you which server version executed the operation. As long as the version is 12.0.0 or higher, then you have a version 12 database file.

(15 Apr '11, 14:36) Chris Kleisath

See this page on DCX for more info on the SYSHISTORY view.

(15 Apr '11, 14:41) Chris Kleisath

Thanks for detailing it. I am still a bit uncertain about the UPGRADE info. Concerning a database file, Sybase differentiates between upgrade and rebuild (unload/reload) in their docu, saying only rebuild gives access to all new features and speed enhancements. In what sense is the UPGRADE info in the sys.syshistory table meant? Does it mean the file is "only" upgraded, not rebuilt or does it mean it was either upgraded or rebuilt? I am of course also wondering why upgrade exists. Shouldn't we rebuild a database file in any case for a new version, as we would like to get all new features, not only some of them?

(16 Apr '11, 08:46) robert
Replies hidden

I'll try to answer these comment questions in my answer below.

(16 Apr '11, 16:47) Volker Barth


I am trying to leave a comment on your article

but I always get get an error message: Invalid Data: Please go back and try again.

Please help, best regards, Robert

(20 Apr '11, 12:44) robert
Replies hidden

Robert, I can confirm the behaviour.

I guess that blog comments are disabled for older blog articles - but don't know the valid timespan. As said, I guess...

(20 Apr '11, 12:51) Volker Barth
showing 3 of 7 show all flat view

I would generally recommend to rebuild a database for a new version if that is possible. It's the only way to get access to all new features of the new version.

However, it makes it necessary to put down the database for a certain time, and rebuilding a huge database will need some time. Therefore that may be not easily doable for a database used 24x7. If you can't afford the time needed for a complete reload, you can alternatively

  1. just run the database unchanged on a new database engine (as long as that combination is supported - e.g. a v12 engine can run v10-v12 databases, but not older ones, whereas a v9 engine can run v5-v9 databases) - or

  2. upgrade the database to the current version. That will make some of the new features available but not all - usually not those ones that require a different physical data storage.

As you can see, these alternatives have different trade-offs to give you several choices.

As to SYSHISTORY, the "INIT row" will name the version the database will be built with - for a reloaded database that's the version it was rebuilt with.

The "UPDGRADE row" will tell to which version(s) the database was upgraded to.

If you are not sure whether your database was successfully rebuilt with v12 (though the Sybase Central Wizard should tell you a failure), the "INIT row" should assure you that your version is build with v12.

permanent link

answered 16 Apr '11, 16:52

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

The picture is getting clearer and clearer - thanks! So the UPGRADE row in sys.syshistory table is really (only) an upgraded database file, whereas the INIT row shows a rebuilt database file. Is my assumption then correct, as there is only one INIT row in the syshistory table (the first one), after rebuilding a database file, the syshistory is reset and starts with the INIT row showing the rebuild version?

(17 Apr '11, 05:24) robert
Replies hidden
Comment Text Removed

A database will only ever have one INIT root - the "INIT" comes from "dbinit" which is the tool to "initialize" (aka create) a new database. When you "rebuild" a database, a new database is "initialized" and then all of the data from your original (old) database is unloaded and reloaded into the new database.

So the INIT row in the syshistory table shows you the version of the software that was used to created the database and other other rows (START, UPGRADE, etc) show you how the database has been used and what modifications (UPGRADEs) have been made to it since it was created.

(17 Apr '11, 20:23) Mark Culp
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 15 Apr '11, 12:22

question was seen: 7,484 times

last updated: 20 Apr '11, 12:51