Microsoft KB Archive/298967

= PRB: Unable to Load Transaction Log Backup on Secondary Server While Using Log Shipping Tool =

Article ID: 298967

Article Last Modified on 2/2/2002

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q298967



SYMPTOMS
When the Log Shipping tool is installed and log shipping is established between the primary and secondary servers, the following error message may be generated when an attempt to load a transaction log backup to the secondary database is made while users are accessing the secondary database:

Error on loading file TestDB1_tlog_200105151200.TRN : [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 3101: [Microsoft][ODBC SQL Server Driver][SQL Server]Database in use. The system administrator must have exclusive use of the database to run the restore operation.



CAUSE
SQL Server disallows application of a transaction log backup to a database when the database is in STANDBY (read-only) mode and users are accessing it.



RESOLUTION
Disconnect users from the database before the transaction log backup is applied.



STATUS
This behavior is by design.



MORE INFORMATION
The Log Shipping tool is an unsupported add-on utility provided with BackOffice Resource Kit 4.5. For additional information on the Log Shipping tool, see the BackOffice Resource Kit documentation.

The Log Shipping tool provides a way to set up a warm backup server to which transaction logs can be shipped and restored. A complete database backup is restored on the secondary backup server with either the NORECOVERY or STANDBY option. The utility does not provide functionality to restore transaction log backups with the NORECOVERY option; the transaction log backups are always applied with STANDBY option. This enables users to perform read-only operations to the warm backup database.

If any of users are still connected when an attempt is made to restore a transaction log, the error mentioned above is generated. Because a transaction log backup loaded with the NORECOVERY option renders the database inaccessible, it would be possible to get around this problem. However, the Log Shipping tool does not implement functionality to load transaction log backups with the NORECOVERY option.

