Need to delete backup files which are restored on secondary database

  • Hi,

    I have configured log shipping on 10 databases ,

    On secondary i am facing space issue regularly as .trn files for the databases are stored on same drive.

    Now I want to delete all the .trn files that are restored on secondary after 1 hour.

    Is there any way to do that.

  • use the following to purge backup files from the secondary

    exec sys.sp_change_log_shipping_secondary_primary

    @primary_server='primary sql instance'

    , @primary_database='primary db name'

    , @file_retention_period = no_of_minutes_to_keep

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply