Tuesday, February 5, 2008

Today's Client Question: Invalid Log

Q: If you don’t mind, I have one unrelated question; if you are busy, please feel free to ignore. In our setup we dump transaction log every 10 minutes and apply the same to the mirror site. Recently I am finding very strange behavior: I am unable to apply the Tran log to mirror site. We apply logs in sequential order and until successful, we never try applying next log file. Also, the mirror site is standby only, the ASA server is never up, it comes up for a short while only as a result of log application command dbsrv9 dbfilename -a logfilename.

While trying to apply the log I get following error – “Database cannot be started -- xxx.log is an invalid transaction log”.

I am surprised why this happens. If you have experienced this in past, please let me know what could be wrong.

Thanks!

A: Hmmmmm... you could try using dbtran on that file to see if it "sort of looks like a log file" or if it is truly messed up.

My guess is something Very Bad happened to the file.

I recommend two alternatives:

  1. Use "live log backup" which is a continuous process and requires less administrative effort.
  2. Migrate to SQL Anywhere Version 10.0.1 so you can use a mirrored database which is *really* cool, especially when switching over.

If you want more explanation about live log backup let me know. There is a little bit in my book on page 386, but it doesn't talk about the cool .BAT file with the endless GOTO loop that continuously tries to restart dbbackup on the secondary computer until the primary comes back up... that trick I learned from a client.

That reminds me of this old joke:
Question: What is a consultant?

Answer: A consultant is someone who borrows your watch to tell you the time and then keeps your watch.
I do not mind questions AT ALL, for two reasons: This is the free "after sales service" that all my clients get, PLUS you have been kind enough to beta test Foxhound!

Breck
Add to Technorati Favorites

No comments: