on 2011 Jun 10 10:39 AM
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.
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Volker is correct - the "-ds" switch specifies the local path that the database server should use to locate the dbspaces -- ignoring any full paths specified in the system catalog. This will 'override' the absolute path "forward-slashes" you have specified on Linux. Once the database is started on Windows, you can 'rename' the DBSPACE paths if you wish, using the 'ALTER DBSPACE ... RENAME" statement.
Alternatively, always setting the dbspace paths to be relative will make them cross-platform.
Final note as an FYI/sidebar: Windows does actually respect the "forward-slash" as a path separator in many instances.
[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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.