I have tried reloading from the db file, but it shows me an error:
I also tried unloading the db file, but it shows me this error:
The reason I need to do this reloading is that I want to be able to query and mess around with it in a test development environment (for data analysis and the likes). I have access to the server that is running the database, but I prefer not working on it since it is very important for the company I work for.
Any help will be appreciated. Thank you in advance.
asked 06 Jul '15, 18:47
The SQL Anywhere 16 version of the dbunload.exe utility must be used to upgrade a V9 database file to V16.
There are a couple of roadblocks to this process...
First, the V16 dbunload utility cannot connect to a running V9 database, so dbbackup must be used to make a copy of the V9 database.
Second, the V16 dbunload utility can read a V9 database file, but NOT on the same computer where dbeng9.exe or dbsrv9.exe is running, so the dbbackup copy must be created on (or moved to) a different computer from the running V9 database.
That means Step 2 below must be run on a different computer from the running V9 database.
It also means that either (a) Step 1 below is run on a different computer from the running V9 database, or (b) the copydir\ddd9.db and copydir\ddd9.log files must be moved to a different computer.
When the rules are broken, the error messages are confusing; for example:
SQL Anywhere Unload Utility Version 126.96.36.1992 Connecting and initializing ***** SQL error: Cannot access file 'unloadold.sql' -- No such file or directory Either an old version of the server is running, or the database "ddd9" was start ed in an old version of the server. Please shut it down before running the unlo ad.
Here's a sample of the Windows commands to upgrade a running V9 database to V16, using the "old school" technique of separate unload/dbinit/reload steps:
REM 1. Make a V9 backup in a subfolder. "%ASANY9%\win32\dbbackup.exe"^ -c "ENG=ddd9;DBN=ddd9;UID=dba;PWD=sql"^ -y^ copydir REM 2. Use V16 to unload V9 "%SQLANY16%\bin64\dbunload.exe"^ -c "DBF=copydir\ddd9.db; UID=dba; PWD=sql"^ -r reload.sql^ -y^ data REM 3. Create a V16 database. "%SQLANY16%\bin64\dbinit.exe"^ ddd16.db REM 4. Start the V16 database. "%SQLANY16%\bin64\dbspawn.exe"^ -f "%SQLANY16%\bin64\dbsrv16.exe"^ ddd16.db REM 5. Load the schema and data. "%SQLANY16%\bin64\dbisql.com"^ -c "ENG=ddd16; DBN=ddd16; UID=dba; PWD=sql;"^ READ ENCODING Cp1252 reload.sql REM 6. Start an ISQL GUI session.. "%SQLANY16%\bin64\dbisql.com"^ -c "ENG=ddd16; DBN=ddd16; UID=dba; PWD=sql" PAUSE
Please, everyone, downvote this reply! :)
Stop doing complex things, and just (a) make a file copy of the original database .db and .log files then (b) start the .db file using dbsrv16.exe.
If you get an error, show us the command you tried to run.