|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, April 28, 2013 10:23 PM
Points: 144,
Visits: 290
|
|
We have Log Shipping setup on SQL 2008 instances and everything was running fine until the primary database was accidentally taken offline. We bought the DB online but noticed that the Log Shipping restore was failing. All the logs that were generated after the primary DB state change (offline\online) were not being restored on the secondary DB. Does the database state change break the Log Shipping setup? How different would a database state change be from an instance restart?
Thanks, Ravi
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 5:49 PM
Points: 37,671,
Visits: 29,925
|
|
Ravi-156610 (12/6/2012) We have Log Shipping setup on SQL 2008 instances and everything was running fine until the primary database was accidentally taken offline. We bought the DB online but noticed that the Log Shipping restore was failing.
With what error?
Does the database state change break the Log Shipping setup?
No.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 9:47 AM
Points: 5,201,
Visits: 11,151
|
|
Ravi-156610 (12/6/2012) We have Log Shipping setup on SQL 2008 instances and everything was running fine until the primary database was accidentally taken offline. We bought the DB online but noticed that the Log Shipping restore was failing. All the logs that were generated after the primary DB state change (offline\online) were not being restored on the secondary DB. Does the database state change break the Log Shipping setup? How different would a database state change be from an instance restart?
Thanks, Ravi
how long was log shipping down for? Where the Log shipping jobs interrupted? What does the history show for the copy and restore jobs on the secondary instance?
In most cases you can take a differential backup of the primary and apply to the secondary to resume log shipping. This will only be possible if there has been no full backup on the primary since the last successful secondary restore.
Check using this query against the primary and secondary to see if the differential base LSNs are synchronised
select DB_NAME(database_id), differential_base_lsn from sys.master_files where database_id = DB_ID('yourLSdb') group by differential_base_lsn, database_id
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs"
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, April 28, 2013 10:23 PM
Points: 144,
Visits: 290
|
|
The LS_Restore job has been failing with this error:
"Error: The log backup file '\\ServerName\DBNAME_db\DBNAME_DB_20121203221511.trn' was verified but could not be applied to secondary database 'DNAME_DB'.(Microsoft.SqlServer.Management.LogShipping)"
"Error: This backup set cannot be applied because it is on a recovery path that is inconsistent with the database. The recovery path is the sequence of data and log backups that have brought the database to a particular recovery point. Find a compatible backup to restore, or restore the rest of the database to match a recovery point within this backup set, which will restore the database to a different point in time. For more information about recovery paths, see SQL Server Books Online. RESTORE LOG is terminating abnormally.(.Net SqlClient Data Provider) *"
The primary DB state change occurred at around 10:00, local server time, and then the next TRN file from 10:15 local server time failed with the above errors.
Thanks
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, April 28, 2013 10:23 PM
Points: 144,
Visits: 290
|
|
The Primary DB was offline for less than 1 minute. There were no interruptions for the LS_Copy or LS_Restore jobs.
The primary DB state change occurred at around 10:00 local server time and the LS_Restore job for the next TRN file from 10:15 local server time failed with the below errors.
"Error: The log backup file '\\ServerName\DBNAME_db\DBNAME_DB_20121203221511.trn' was verified but could not be applied to secondary database 'DNAME_DB'.(Microsoft.SqlServer.Management.LogShipping)"
"Error: This backup set cannot be applied because it is on a recovery path that is inconsistent with the database. The recovery path is the sequence of data and log backups that have brought the database to a particular recovery point. Find a compatible backup to restore, or restore the rest of the database to match a recovery point within this backup set, which will restore the database to a different point in time. For more information about recovery paths, see SQL Server Books Online. RESTORE LOG is terminating abnormally.(.Net SqlClient Data Provider) *"
Thanks,
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 9:47 AM
Points: 5,201,
Visits: 11,151
|
|
and the results of the query i supplied above????
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs"
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 5:49 PM
Points: 37,671,
Visits: 29,925
|
|
Has the primary been restored from a backup?
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 9:47 AM
Points: 5,201,
Visits: 11,151
|
|
GilaMonster (12/6/2012) Has the primary been restored from a backup? Questions, questions. It's like the Spanish inquisition here lol
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs"
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, April 28, 2013 10:23 PM
Points: 144,
Visits: 290
|
|
Gail,
No, the primary has not been restored from a backup.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 9:47 AM
Points: 5,201,
Visits: 11,151
|
|
Perry Whittle (12/6/2012) and the results of the query i supplied above???? ??????????????
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs"
|
|
|
|