December 6, 2012 at 2:21 am
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
December 6, 2012 at 2:37 am
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, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 6, 2012 at 2:53 am
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" 😉
December 6, 2012 at 3:32 am
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
December 6, 2012 at 3:35 am
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,
December 6, 2012 at 5:10 am
and the results of the query i supplied above????
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
December 6, 2012 at 5:25 am
Has the primary been restored from a backup?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 6, 2012 at 6:18 am
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" 😉
December 6, 2012 at 9:46 pm
Gail,
No, the primary has not been restored from a backup.
December 6, 2012 at 11:42 pm
Perry Whittle (12/6/2012)
and the results of the query i supplied above????
?????????????? :Whistling:
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
December 6, 2012 at 11:55 pm
Perry,
Sorry.
We take Full backups every night so, applying a diff backup is out of question for us. Also, i have restored the secondary using a new backup of the primary. The log shipping is in sync now.
I wasn't sure if the DB state change will break the log shipping and have put out the question for any answers.
Thanks
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply