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.

asked 09 Dec '09, 11:27

Zote's gravatar image

Zote
1.7k364050
accept rate: 43%

edited 20 Sep '11, 17:33

Volker%20Barth's gravatar image

Volker Barth
30.0k295449654

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.

(09 Dec '09, 13:54) Zote

If you think that this topic can be closed, please vote for it.

(09 Dec '09, 13:55) Zote
1

I would suggest that you answer your own question (with the contents of your fist comment) and accept this (or Reimar's) answer as "preferred answer". That should close the case:)

(09 Dec '09, 14:18) Volker Barth

@Volker nice, i'll do that.

(09 Dec '09, 15:42) Zote

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.

permanent link

answered 09 Dec '09, 15:42

Zote's gravatar image

Zote
1.7k364050
accept rate: 43%

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"

permanent link

answered 09 Dec '09, 11:52

Reimer%20Pods's gravatar image

Reimer Pods
4.2k334481
accept rate: 12%

@Reimer, dbeng9 doesn't support -ad parameter

(21 Sep '11, 17:58) Zote

Note: the -ad, -ar, and -as switches were not added until SQL Anywhere 10.

permanent link

answered 10 Dec '09, 22:01

Josh%20Savill's gravatar image

Josh Savill
510135
accept rate: 27%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×97
×72
×31
×22
×2

question asked: 09 Dec '09, 11:27

question was seen: 1,743 times

last updated: 21 Sep '11, 17:58