Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

LOG BACKUP is TRUNCATING in Log Shipping

$
0
0

I had configured Log shipping from INSTANCE1 to INSTANCE2. For the past few days, am able to find that the log backup is truncating only at the midnight. Due to this, LSRestore Job in INSTANCE2 got failed continuously after T-log truncation.

I used the following query to find the history of backup taken for a DB.

select  top 60 a.server_name, a.database_name, backup_finish_date, a.backup_size,
CASE a.[type]
 WHEN 'D' THEN 'Full'
 WHEN 'I' THEN 'Differential'
 WHEN 'L' THEN 'Transaction Log'
 ELSE a.[type]
END as BackupType
 ,b.physical_device_name
from msdb.dbo.backupset a join msdb.dbo.backupmediafamily b
  on a.media_set_id = b.media_set_id
where a.database_name Like 'ADMIN%'
order by a.backup_finish_date desc

As a result of above query, i able to find that LOCATION is NUL for truncated T-Log file. Due to this LSN Mismatch is occurring while performing restore.

We are unable to find that why it is truncating and appearing as NUL. Is there is any solution to stop truncating the T-LOG File.

And i had observed that the T-Log Backup is happening irrespective of the LSBackup Schedule. For example, LSBackp runs of 12:00 AM for the first time and the next schedule is on 12:40 AM that is it runs every 40 mins. But at this time (12:10 AM), a separate backup is happening which is truncating (backup path is appearing as NUL). And this backup is not by LSBackup Job because there is no log output in the job which i had verified. And also i had checked that there are no separate backups happening to that Database.



Viewing all articles
Browse latest Browse all 4689

Trending Articles