Transaction Log Backup Problem

  • Im trying to perform a transaction log backup to the same *.bak file holding the Full Database Backup. Im getting this error "BACKUP LOG cannot be performed because there is no current database backup."

    I opened the backup file to view its contents and the the database is in there as a FULL backup.

    When the database backups run it's marking the expiration date as 7 days from the execution date. I'm also backing up the master and msdb in the same backup file.

    The backup order goes like this:

    1. master (full backup)

    2. msdb (full backup)

    3. Our Application Database. ( full backup unless the database name is found in the backup file then it uses a Transaction Log Back instead)

    Anyone else run into this situation? Is it possible to store a FULL and Transaction Log backup in the same Backup File?

  • Bob Shaw (6/2/2009)


    Im trying to perform a transaction log backup to the same *.bak file holding the Full Database Backup. Im getting this error "BACKUP LOG cannot be performed because there is no current database backup."

    I opened the backup file to view its contents and the the database is in there as a FULL backup.

    When the database backups run it's marking the expiration date as 7 days from the execution date. I'm also backing up the master and msdb in the same backup file.

    The backup order goes like this:

    1. master (full backup)

    2. msdb (full backup)

    3. Our Application Database. ( full backup unless the database name is found in the backup file then it uses a Transaction Log Back instead)

    Anyone else run into this situation? Is it possible to store a FULL and Transaction Log backup in the same Backup File?

    The error you have received indicates that a full backup of the database needs to be accomplished before you can run a transaction log backup of the database. Have you recently changed the recovery model of the database in question?

  • No, the database isnt changing. The backup is running in a application and for troubleshooting the problem.

    I deleted the backup file so a new one will be created when the application runs.

    Ran the application to create a backup.

    Checked the backup file contents to make sure the database backup is in the backup file.

    Then I ran the application backup routine again so it will perform a TL backup.

    I still get the error. The application is perform the merge replication sync so the backup execute before each sync attempt. Thats why Im trying to use TL backups so the backup file size doesnt get out of hand and to be able to restore to a specific time.

  • Verify the recovery model of the database. Also, run this query: select * from msdb.dbo.backupset where backup_start_date > '20090602'

  • Recover model is set to FULL and the query you gave me pulls 66 records and the database in question is in the results.

  • What is the value of the is_copy_only column?

  • the value in that column is 0.

  • Is there a chance that the full backup procedure does an explicit truncate on the log at some point after the backup is taken? It would invalidate the use of the full backup as a staring point for rolling forward with the logs. Not a very likely scenario, but it's the only thing I can think of that might explain the problem.


    And then again, I might be wrong ...
    David Webb

  • David Webb (6/4/2009)


    Is there a chance that the full backup procedure does an explicit truncate on the log at some point after the backup is taken? It would invalidate the use of the full backup as a staring point for rolling forward with the logs. Not a very likely scenario, but it's the only thing I can think of that might explain the problem.

    Good thought, David. I hadn't thought about that myself.

  • That was the issue, there was a call to shrink the database files using NoTruncate so they wouldnt hog up the hard drive space. But right after that though there was another call to truncate the log.

    I removed the truncate log call and the backups are running fine.

    Thank You so much for the help Lynn and David.

  • You might want to remove the call to shrink the database files as well. See - http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply