The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

Hi all,

I'm not able to restore a database from a 5.5 version to a 12 version. I'm getting the following error:

The database archive 'E:\MICHAEL LS\VANDEMOORTELE\Vdm.db' could not be restored on the server '_sc069543125'.
Error during backup/restore: unable to open device E:\MICHAEL LS\VANDEMOORTELE\Vdm.db (Unknown err status reading HDR labels)
[Sybase][ODBC Driver][SQL Anywhere]Error during backup/restore: unable to open device E:\MICHAEL LS\VANDEMOORTELE\Vdm.db (Unknown err status reading HDR labels)

asked 10 Jul '12, 02:53

michaelvanwyngaerden's gravatar image

accept rate: 0%

retagged 18 Nov '12, 10:38

Nica%20_SAP's gravatar image

Nica _SAP

The RESTORE DATABASE statement only works for backups created with the BACKUP DATABASE TO format of the BACKUP statement, which is intended to create an all-in-one-single-file backup of both database and transaction log in a single file on magnetic tape.

The BACKUP statement didn't exist in version 5.5, so by definition your file 'E:MICHAEL LS\VANDEMOORTELE\Vdm.db' is NOT a "database archive", which is SQL-Anywhere-speak for a tape backup.

Instead, your file 'E:\MICHAEL LS\VANDEMOORTELE\Vdm.db' is a much simpler "image backup", which is actually a copy of the original database.

So... you don't need to run any kind of "restore" process, but you do have to "upgrade" the database to Version 12; sadly, unlike versions 6, 7, 8 and 9, versions 10 through 12 can't start a version 5 database until it has been upgraded.

The following script demonstrates how to upgrade using the version 12 dbunload utility.

REM If you're a command-line kinda guy, here is my template Windows 
REM batch file run_dbunload_upgrade_v5_to_v12.bat. It does the 
REM unload-reload-all-in-one-dbunload-step, then starts dbeng12 
REM and dbisql so you can make sure the new database is up and running.

REM Be sure to stop *all* database engines on the computer you're using, 
REM before starting the upgrade.

REM dbunload...
REM -an ...  where to put new database
REM -ap ...  new database page size
REM -c ...   old database startup connection string
REM -o ...   where to put unload console display text file
REM -v       verbose mode for console display


  -an ddd12.db^
  -ap 4096^
  -c "DBF=sademo.db;UID=dba;PWD=sql"^
  -o dbunload_log_sademo.txt^

PAUSE dbunload/reload done...

  -f "%SQLANY12%\bin32\dbeng12.exe"^
  -o dbeng12_log_ddd12.txt^

PAUSE dbeng12 started...

  -c "ENG=ddd12;DBN=ddd12;UID=dba;PWD=sql"

PAUSE dbisql running...
permanent link

answered 10 Jul '12, 05:55

Breck%20Carter's gravatar image

Breck Carter
accept rate: 21%

edited 10 Jul '12, 05:57

V12 supports only V10 and later databases. Use 5.5 server.

permanent link

answered 10 Jul '12, 05:27

Dmitri's gravatar image

accept rate: 11%

thanks for the help. I've indeed restored the database in my sql anywhere 12 version but I'm not able to connect with jdbc to the database.

I'm using the following jdbc url (with and without the databasename) with a user and password to get a connection but I'm receiving a login failed:


yet I'm able to run the dbisql.exe in command line

dbisql.exe -c "ENG=test;DBN=test;UID=$USERID;PWD=$PASSWORD"

could someone tell what I'm doing wrong when trying to connect?

permanent link

answered 16 Jul '12, 08:11

michaelvanwyngaerden's gravatar image

accept rate: 0%

I suggest you post this as a new question rather than as an answer to the original - that way it's much more likely to be noticed by someone who can help.

(16 Jul '12, 10:33) Justin Willey

IMHO, the jConnect URL seems somewhat unusual, cf. this sample from the docs:


or - when specifying a particular database on the server


(16 Jul '12, 10:48) Volker Barth

If you're really attempting to use jTDS as your JDBC driver, you should review the answer to this question - it likely will not work as you expect.

Trying jTDS within SQuirreL SQL also does not connect successfully for me to a version 12 SQL Anywhere database - it immediately disconnects.

If you wish/need to use a Type-4 JDBC driver with SQL Anywhere, we would instead recommend using jConnect.

If you can move to a mixed native-managed solution, the Sybase SQL Anywhere JDBC Type-1 driver is generally more efficient when accessing the SQL Anywhere database server. See the technical document page here and the blog entries here and here for more information.

For a historical list of how the iAnywhere JDBC driver has been used (which may help clarify older documentation), see the blog entry here.

(16 Jul '12, 13:18) Jeff Albion
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: 10 Jul '12, 02:53

question was seen: 4,987 times

last updated: 18 Nov '12, 10:38