Link to home
Create AccountLog in
Avatar of Yeatsie
YeatsieFlag for Cyprus

asked on

How do you set the auto-delete option on SQL2005 sql agent backup jobs?

Im having difficulty knowing where to specify the deletion period for the dump files created in a SQL2005 database backup schedule in SQL Agent. It seems now to create an SSIS sub-package for the task when using the wizard options, and doesnt seem to have the "remove after x days/weeks" option that the old SQL 2000 wizard used to have:
 -UseDefDir  -DelBkUps 1WEEKS -BkExt "BAK"'

On looking at the SQL2005 backup db subtask, it seems to call a cmd exec command;

/SQL "Maintenance Plans\MaintenancePlan - backup databases" /SERVER "$(ESCAPE_NONE(SRVR))" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package\Subplan_1.Disable";false

Any ideas how you do this?
Avatar of SQL_SERVER_DBA
SQL_SERVER_DBA
Flag of United States of America image

is the . included in the .bak, check in your maintenace plan
ASKER CERTIFIED SOLUTION
Avatar of knightforce777
knightforce777

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account