T-sql script

  • Is there any task we can use in the maintenance plan before the backup to move the old backups to different folder and take the full backup?

  • Maintenance plans generate SSIS Packages. Just edit your package(s) to add a FileSystem task to move the existing backup(s) before the backup task(s).



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • I opened the maintenance plan to edit but I didn't see file system task there.

    I am aware that in the normal SSIS packages we have the file system task but I didn't find it here

  • Aren't they scheduled through a SQL Agent job? Just add a step to the job to move the files using Powershell.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Yes. Scheduled through the sql job agent

    But needs to move the getdate()-2 backup files only. Not everything

    Thank you

  • OK. Regardless of the logic, just add a step with that logic.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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