on 2009 Dec 09 11:27 AM
I loose my database file. To recovery, I'm getting last full backup and trying to apply the only one transaction log backup and current log.
I'm using dbeng9 database.db -a backup_log.log
and dbeng9 database.db -a current_log.log
I'm successfully appling backup log. I can see "Recovery Complete" message in server log. But, when I try to apply current log, I', getting this message:
"Cannot open transaction log file -- Can't use log file "current_log.log" since it has been used more recently than the database file". Of course log is newer than database!
How can I recover by database? Using dbtran and executing sql file is the last option.
Request clarification before answering.
I found my fault! I was missing an little log (16k with only 2 comments) between 1st and 2nd logs.
I think if sybase change message to something like 'waiting log with start offset XXXXX, current is YYYY' will help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
AFAIK if a database is modified and closed any previous transaction log will be "not matching". But you might try to apply both log files in one operation (untested):
dbeng9 database.db -a backup_log.log -a current_log.log
Another method would be using the -ad parameter: put all logfiles in one directory and specify that like
dbeng9 database.db -ad "C:\\Database\\MyLogDir"
The engine should scan the directory for transaction logs to apply and should process them in the appropriate order.
Help Topic: "dbeng11, command line"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Reimer, dbeng9 doesn't support -ad parameter
Note: the -ad, -ar, and -as switches were not added until SQL Anywhere 10.
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.