Tlog and Backup Device

  • Hi All,

    I have a policy of daily full backup with INIT

    and Tlog backup every hour.

    now problem is that , i dont want to keep Tlog backup older than yesterday !!!

    how can i specify Retention in my Tsql ??

    one buddy told me to use Backup Device , here you can specify retention easier but it didnt give me choice to schedule job per hour basiss 🙂

    can any body help me out here ??

    how can i do this with Tsql , i am not an expert on Tsql

  • Setup a maintaince plan to do a cleanup of t-log backups older than 1 day.

  • you need to write t-sql code on that folder which will delete the file older than the number of days you want.

    You need to use the cursor which will go in individual folder and then another cursor which will check every file within that folder and will delete the file older than n number of days.

    ----------
    Ashish

  • Thanks, but i am not expert enough to use cursors

    i will try maintainance plan to clean up Tlog prior to yesterday...

Viewing 4 posts - 1 through 3 (of 3 total)

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