Hi I have 2 SQL 2005 enterprise servers and I am trying to make a read only
copy of one of our databases on the second server using log shipping. I have
set this up from the database properties page on the primary server and
everything starts working correctly.
The initial database is restored correctly and then the first of the
tranaction logs is also restored correctly but after that all additional
transaction log restores fail.
In the job History the following errors occur.
Error: Could not apply log backup file
'\\servname\logshipping\database_20061107094501.tr n' to secondary database
'databasename'.(Microsoft.SqlServer.Management.Log Shipping)
***<nl/>2006-11-07 10:15:21.05*** Error: Exclusive access could not be
obtained because the database is in use.<nl/>RESTORE LOG is terminating
abnormally.(.Net SqlClient Data Provider) ***,00:00:21,0,0,,,,0
Followed by
Error: The log backup file
'\\servername\logshipping\Databasename_20061107094 501.trn' was verified but
could not be applied to secondary database
'databasename'.(Microsoft.SqlServer.Management.Log Shipping)
***<nl/>2006-11-07 10:15:21.33Deleting old log backup files. Primary
Database: 'databasename'<nl/>2006-11-07 10:15:21.33The restore operation
completed with errors. Secondary ID:
'b115c13b-1e8d-47fc-8625-6ca4ed84bc52'<nl/>2006-11-07 10:15:21.35-- END
OF TRANSACTION LOG RESTORE --<nl/><nl/>Exit Status: 1
(Error),00:00:21,0,0,,,,0
I have tested this with the log shipping as the only actions running on the
server and the same results occur. The first restore works and the rest fail.
Any ideas as to what I can do to resolve this.
James - it looks like you have a connection to the standby database but this
is prohibited. You need to select the option to disconnect users from the
secondary database while the restore operation is underway.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
No comments:
Post a Comment