SQL Server 2016 – Log Shipping Restore Job Stuck

sql serversql-server-2016

SQL server 2016 log shipping restore job will run every 15mins, Database size is 1TB, Job will not take two minutes, Yesterday job was running for last 13 hours and the database is in "InRecovery" state, The job status is InProgress, couldn't see any blocking on the server and SPID of the restore is in suspended state, anyhow killed the restore job reconfigured the log shipping, I just want to know the possible reasons to create RCA to this issue, I do not see any info in event or SQL error logs since i killed the job manually.We do not have IO or storage issues also.

Best Answer

It probably could be for various reasons-

  1. Compare the volume of data that might would have generated additional log backup size as compared to normal days. Compare the difference between good and bad durations vs amount of data u see.

  2. I am not sure what is the recovery mode- do you allow secondary in read mode by keeping standby ? If yes I have seen issues and slowness based on LS logic to keep switching between no recovery mode and standby mode.

  3. You need to have baseline for other metrics like CPU memory and storage numbers for good vs bad run.