BUG: Error 3154 Reported in Log Shipping Restore Job Sporadically (311801)



The information in this article applies to:

  • Microsoft SQL Server 2000 Enterprise Edition
  • Microsoft SQL Server 2000 Enterprise Evaluation Edition
  • Microsoft SQL Server 2000 Developer Edition

This article was previously published under Q311801
BUG #: 355133 (SHILOH_BUGS)

SYMPTOMS

The following error message may appear in the SQL Server Log Shipping Monitor View Restore History window:
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 3154: [Microsoft][ODBC SQL Server Driver][SQL Server]The backup set holds a backup of a database other than the existing 'pubs_test' database.
[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating abnormally
The preceding error message occurs if:
  • You configure multiple databases for log shipping.
  • You back up the transaction logs for the databases to the same folder.
  • The database names only differ by "_tlog" in the name. For example, pubs_test and pubs_test_tlog.

CAUSE

The RESTORE job that runs on the secondary server incorrectly parses the transaction log backup file names and attempts to restore transaction logs that belong to a different database. This behavior does not cause any other problems on the primary or the secondary servers.

WORKAROUND

To work around this problem, create a separate folder for transaction log backups for each log shipped database. When you configure log shipping, select the folder you just created as the location for the transaction log backups.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

The database names used for testing are:
  • pubs_test
  • pubs_test_tlog
The error message occurs because by default, with a backup job, SQL Server names the transaction log backup file by using the following format:
<database name>_tlog_<datetime stamp>.trn
				
If the database name ends with the string "_tlog", the transaction log restore job incorrectly assumes that a transaction log backup taken from the pubs_test database belongs to pubs_test_tlog database and vice-versa.

Modification Type:MajorLast Reviewed:6/30/2004
Keywords:kbbug kbpending KB311801