The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

I've used dbbackup and dblog for quite awhile. Mostly to make copies of our main database for testing. Lately, I've run into an error when dblogging, "The database quit abnormally the last time it was used. Database recovery must be performed before proceeding." I've run into this error before but it just seemed to go away, say when I tried to run dblog the next day. Never worried about it.

I've googled this error and reviewed some other questions related to dblog in this forum and I'm coming to understand that there is more to running a dbbackup/dblog sequence then just running that sequence. Such as using dbvalid at some point.

Wondering if anyone could provide detail on properly running this sequence: dbbackup then dblog. Again, I'm using dbbackup and dblog to:

  1. Create a test database away from the production environment.
  2. As a second backup to the Sybase event backup.

Appreciate the help.

asked 13 May '12, 07:31

zippidydo's gravatar image

accept rate: 0%


What exactly are you using DBLOG for?

Note, in order to take backups, there absolutely no need to use DBLOG - if you just want to make a backup of the transaction log (and not of the database file), this can be done with DBBACKUP -t (in combination with further options to rename/truncate the existing log).

DBLOG is usually only necessary if you want to move the log to a different location, stop (or restart) using a log or stop (or restart) using a mirror log.

(14 May '12, 03:34) Volker Barth

I run dbbackup as such: dbbackup -d -r -t -c "dsn=**" c:temp

This produces a db file and log file. The log file is still tied to the live database and directory. When I try to dbeng the database I get errors. So, I use dblog. When I dblog it says "was using [log file name and location] and is now not using [log file]". Then I can run dbeng.

I run dblog as such: dblog -n -ir -is c:tempdatabase.db

(14 May '12, 04:26) zippidydo
Replies hidden

May it be that your transaction log file is specified with an absolute path within your database - what does "DBLOG Yourdatabase.db" reveal?

If it does contain an absolute (or relative) path but should stay within the same directory as the database file, then I would recommend to use DBLOG once to change the location of the log (to be specified just as a file name without a path). After that, your database should be startable in any arbitrary directory and should expect its log file just there.

(14 May '12, 05:15) Volker Barth

I use a equal setup where the log file is on a separate disk/partition. I use this to reduce the file fragmentation on the db and the log files. When the database backup is finished my script automatically runs dblog to remove the log file path of the backup copy. These makes the handling easier.

(14 May '12, 07:11) Thomas Dueme...

I think your backup command line is wrong, I would use dbbackup -c "dsn=xx" -r C:BackupDirectory

-t is transaction log only

for incremental backups in ASA9 I use -y -r -n -t -o "LogFileName" -c "Connection Parms" "Backup Directory"

I wouldn't dblog -n the database, instead I would use -t without a path.

Finally if you ever need to use this database to recover you won't be able to if you start it without it being set to read only.


permanent link

answered 21 May '12, 18:21

J%20Diaz's gravatar image

J Diaz
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 13 May '12, 07:31

question was seen: 1,027 times

last updated: 21 May '12, 18:21

Related questions