You are currently offline, waiting for your internet to reconnect

BUG: Expired transaction log backups may not be deleted by maintenance plan

This article was previously published under Q303292
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 353593 (SHILOH_BUGS)
A maintenance plan job to backup transaction logs may fail. The "Transaction Log Backup Job for DB Maintenance Plan 'DB Maintenance Plan1'" job history may show the following error message:
The job failed. The Job was invoked by Schedule 3 (Schedule 1). The last step to run was step 1 (Step 1).
The job step details history contains this error message:
sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step failed.
If the Write history to the table msdb.dbo.sysdbmaintplan_history reporting option is selected the history of the plan contains an entry similar to:
Backup can not be performed on this database. This sub task is ignored
If the Write report to a text file in directory reporting option is selected the report file contains this entry:
Backup can not be performed on database 'pubs'. This sub task is ignored.
In addition, expired transaction log backups may not be deleted. Although the maintenance plan job fails, all backups are performed correctly.

This behavior occurs under the following circumstances:
  • Multiple databases are backed up in a single Maintenance Plan.
  • The Maintenance Plan is configured to perform transaction log backups.
  • The recovery model of at least one of the databases in the Maintenance Plan is set to SIMPLE.
Selecting the "Backup the transaction log as part of the maintenance plan" option directs SQLMaint.exe to execute a BACKUP LOG command on each database in the plan.

Issuing a BACKUP LOG command against a database in SIMPLE recovery mode causes this error message:
Server: Msg 4208, Level 16, State 1, Line 1
The statement BACKUP LOG is not allowed while the recovery model is SIMPLE.
Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP LOG is terminating abnormally.
SQLMaint.exe interprets this as a non-fatal error and continues to back up the transaction logs of other databases in the Maintenance Plan. However, after the log backups are complete SQLMaint exits without removing expired backups.
To work around this problem either:
  • Create two Maintenance Plans. One Maintenance Plan contains only databases that use the FULL or BULK LOGGED recovery models. The second Maintenance Plan contains databases in SIMPLE recovery mode. Do not perform transaction log backups in the second Maintenance Plan.
  • Change the recovery model of the databases from SIMPLE to either FULL or BULK LOGGED and perform a full database backup on the databases.
Microsoft has confirmed this to be a problem in SQL Server 2000.
The SIMPLE recovery model is equivalent to selecting the Select Into/Bulk copy and Trunc. log on Chkpt options in previous versions of SQL Server. You cannot perform a transaction log backup for databases that have their recovery model set to SIMPLE.


For more information, refer to the "Selecting a Recovery Model" topic in SQL Server Books Online.

Article ID: 303292 - Last Review: 12/06/2015 03:53:06 - Revision: 3.2

Microsoft SQL Server 2000 Developer Edition, Microsoft SQL Server 2000 Enterprise Edition, Microsoft SQL Server 2000 Standard Edition, Microsoft SQL Server 2000, Workgroup Edition, Microsoft SQL Server 2000 Personal Edition

  • kbnosurvey kbarchive kbbug kbpending KB303292