none
Log Shipping Copy Job failed and tried to copy the transaction log which are 3 days old. RRS feed

  • Question

  • HI All , 

    We have the Log shipping configured between the 2 instances and sometimes we get the issue or alert for copy job failed.

    after check the error logs for the Job , we found that the Job is trying to take the copy the transaction logs which is 3 days old.

    We have retention period of the logs for 3 days and after that the logs gets deleted and we have 15 min of frequency.

    Today is 22Aug2019 and the error log shows below -:

    "2019-08-22 14:00:02.47 *** Error: Could not find file '\\HYSMACFLR002\GBREVE01_SQLBackup_01$\Logshipping\EVVSEXCVS01_2\EVVSEXCVS01_2_20190820124500.trn'.(mscorlib) ***"

    It clearly shows that the it is trying to copy the trn for 20 aug.

    Please help


    Thursday, August 22, 2019 1:46 PM

All replies

  • It sounds like log shipping got behind and could not catch itself up and has run up against your retention policy and deleted files the process is looking for.  If so, you will no choice but to re-initialize log shipping and essentially start over if the deleted file(s) cannot be retrieved.
    Thursday, August 22, 2019 2:06 PM
  • HI rvsc , 

    Thanks for you reply.

    I might agree with you , that we get this error message when LS is trying to copy the file which has already deleted and throws error message.

    Could you please confirm that the Copy Job in the LS tries to copy the logs from how many days.

    secondly , it does not effect any issue in log shipping process and copies the latest logs a well and later on restores as well on secondary server. Its only throwing the alerts and job fails.

    is there any other way to control the copy of the LS to copy only the latest Trasactional logs not the logs which is 3 days old.


    Thursday, August 22, 2019 3:12 PM
  • Hi Mukesh3388,

    >> Could you please confirm that the Copy Job in the LS tries to copy the logs from how many days.

    Your backup file is named contain date. You can check this through last_copied_file (The filename of the last backup file copied to the secondary server.) from sp_help_log_shipping_secondary_database.

    >> is there any other way to control the copy of the LS to copy only the latest Trasactional logs not the logs which is 3 days old.

    If you don't want the Log Shipping copy job copy the field older than 1 days, you can try to specify the "Delete files older than" property when setting backup job like below screenshot. Please refer to Configure Log Shipping (SQL Server).

    Best regards,
    Cathy 

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, August 23, 2019 7:42 AM