on 2015 May 25 1:52 PM
Hi, all. I have a strongly encrypted db and need to run dbunload for it (Sybase 16). As I understand connection string should be something like this: "DBA=dba;PWD=sql;DBF=mydb.db;DBKEY=theKey". But there is a workflow for dbeng16 to load theKey from file, which could be encrypted with dbfhide. The question is: is it possible to specify encryption key to dbunload via file instead of doing this explicitly?
another question is: how to decrypt from command line file encrypted with dbfhide? is there a command to the utility?
another question is: is it possible to clean up transaction history and clean up logically deleted parts of the data base without using dbunload utility (e.g. via some sql code)?
Request clarification before answering.
If you have separate questions, usually it's a better idea to post multiple questions on the forum. In this case, I know the answers to the first two questions but not the third.
dbunload @myparmsfile.txt
. Edited to add: Or you can do what Mark suggested and use an encrypted FileDSN.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To put the database encryption key in a file and then use the file as part of a connection string (for the purposes of autostarting a database) you need to use a FILEDSN.
E.g. Put these lines in a file (say "mydb.key"):
[ODBC]
DBKEY=theKey
Then use the connection string:
"DBA=dba;PWD=sql;DBF=mydb.db;FILEDSN=mydb.key"
If you want you may then obfuscate the file containing the key. Example:
dbfhide mydb.key mydb.key.hidden
You would then use this connection string:
"DBA=dba;PWD=sql;DBF=mydb.db;FILEDSN=mydb.key.hidden"
There is no command to de-obfuscate the obfuscated file created by dbfhide (that would defeat the purpose, wouldn't it!).
I think your last question is about recovering space in your database file? If this is the question then the only way to "shrink" the database file is to rebuild it (e.g. via dbunload -an|-ar). But note that there is rarely a reason to do this since the unused space in the database file will get reused when you add more data into the database.
Note: In the future I would suggest that you put each of your questions in a separate question on this forum. This makes it easier for people to answer your questions as well as future visitors to find answers to their questions that are similar to yours.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting, I tested my steps on both Windows and Linux using exactly the file names that I posted and it worked. I also checked the code and there is no dependency on the extension of the file (at least not for Windows NT and Linux/Unix). However I did find a requirement on Windows CE that the FILEDSN file name be given an ".dsn" extension. Are you using CE? If not then you should be able to use any file name that you like.
User | Count |
---|---|
52 | |
10 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.