Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Log Shipping failing when the primary DB is taken offline Expand / Collapse
Author
Message
Posted Thursday, December 6, 2012 2:21 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, August 23, 2014 1:58 PM
Points: 145, Visits: 331
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
Post #1393381
Posted Thursday, December 6, 2012 2:37 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:22 AM
Points: 40,632, Visits: 37,094
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

Post #1393386
Posted Thursday, December 6, 2012 2:52 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:41 PM
Points: 6,760, Visits: 14,413
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"
Post #1393390
Posted Thursday, December 6, 2012 3:32 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, August 23, 2014 1:58 PM
Points: 145, Visits: 331
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
Post #1393407
Posted Thursday, December 6, 2012 3:35 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, August 23, 2014 1:58 PM
Points: 145, Visits: 331
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,
Post #1393411
Posted Thursday, December 6, 2012 5:10 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:41 PM
Points: 6,760, Visits: 14,413
and the results of the query i supplied above????

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1393446
Posted Thursday, December 6, 2012 5:25 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:22 AM
Points: 40,632, Visits: 37,094
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

Post #1393452
Posted Thursday, December 6, 2012 6:18 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:41 PM
Points: 6,760, Visits: 14,413
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"
Post #1393472
Posted Thursday, December 6, 2012 9:46 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, August 23, 2014 1:58 PM
Points: 145, Visits: 331
Gail,

No, the primary has not been restored from a backup.
Post #1393846
Posted Thursday, December 6, 2012 11:42 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:41 PM
Points: 6,760, Visits: 14,413
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"
Post #1393877
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse