Logshipping Backup Files Management

  • Comments posted to this topic are about the item Logshipping Backup Files Management

  • You do not need to manually manage the log shipping backup files, they are managed by the log shipping system stored procedures and the agent jobs.

    Personally i would recommend that you do not manually trim files from the primary and secondary locations as, if they are trimmed too soon you will likely break your log shipping scenario.

    The following will show the retention periods in use currently


    backup_retention_period column from

    exec sys.sp_help_log_shipping_primary_database

    @database = 'yourprimarydb'

    file_retention_period column from

    exec sys.sp_help_log_shipping_secondary_database

    @secondary_database = 'yoursecondarydb'

    the following will set the retention periods to the values specified


    for the primary

    exec sys.sp_change_log_shipping_primary_database

    @database = 'yourprimarydb'

    , @backup_retention_period = numberofminutes

    for the secondary

    exec sys.sp_change_log_shipping_secondary_primary

    @primary_server = 'primary_server',

    @primary_database = 'primary_database',

    @file_retention_period = numberofminutes

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

    "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