We have a user running ASA 7 on a linux server they have a 1GB DB file in one location with a 15GB DB space in another location. We are looking at moving this over to a Windows server and updating to ASA10.
When we move the file we cannot access the DB using DBEng or DBSrv as the path in the DBSpace uses / as opposed to we need to change the path of the DB space before we can connect to unload and reload into ASA 10. Is there a way to alter this path if we cannot connect to the DB?
We would try to put the DB file and DB space into the same folder and alter the path on the Linux box so that the path is relative and does not have a / but the server does not have enough space for both together. Once we have the DB Windows ready we can unload remove the DBSpace and reload into one ASA10 DB file on a Windows server.
Any ideas on how we can alter the DBSpace path? I have no Linux experience and I am relying on a customer at the other end of a telephone to carry out the Linux work for me.
asked 10 Jun '11, 09:39
Yes, you should be able to direct the engine to this path with the "-ds" database switch.
If you're trying to reload the version 7 file on Windows with SQL Anywhere 10 via dbunload on the command-line, you can try something like the following:
dbunload -c "UID=dba;PWD=sql;DBF=c:\path\to\old\database.db;DBS=-ds c:\path\to\old" -an c:\path\to\new\database.db
[Note, I have not tried this myself, and I'm not sure whether it will work on ASA 7...]
According to the docs, you might be able to change the dbspace's location (aka renaming the dbspace file) on the Linux system to a path/file that is not really existing. AFAIK, if the dbspace is already open (say, as you have accessed data from tables located in that dbspace), the engine will not try to open the renamed file until the database is stopped and restarted.
So you might be able to change the file path to something that will work on Windows, possibly something like (if the engine accepts the backslash as path separator on Linux)
ALTER DBSPACE dbspace2 RENAME 'C:\example\DBspace.db';
or at least to the current directory (by just supplying a file name without a path)
ALTER DBSPACE dbspace2 RENAME 'DBspace.db';
Now only the system catalog is changed, and stopping the database and copying the whole database to Windows (and adapting the dbspace filename, if necessary) should lead to a startable database there.
answered 11 Jun '11, 08:32