Hi everyone
I have the folowing situations with my backups.
With Database Maintenance Plan is created backup strategy. Full Backup
is performing every day at 1.00 am. And Romove files older than: is
checked on 2 days, and it's working fine.
I am interested how can i perform this action with tsql, without using
DMPlan.
I tryed this:
BACKUP DATABASE TEST TO DISK 'C:...' WITH INIT, RETAINDAYS = 2
I put this statement into job but it is not working. I tryed after that
with (WITH NOINIT) but in that case .bak file grow and files older than
2 days are not deleted.
How can i delete files older then 2 days.
Thanks
acko
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
I have the folowing situations with my backups.
With Database Maintenance Plan is created backup strategy. Full Backup
is performing every day at 1.00 am. And Romove files older than: is
checked on 2 days, and it's working fine.
I am interested how can i perform this action with tsql, without using
DMPlan.
I tryed this:
BACKUP DATABASE TEST TO DISK 'C:...' WITH INIT, RETAINDAYS = 2
I put this statement into job but it is not working. I tryed after that
with (WITH NOINIT) but in that case .bak file grow and files older than
2 days are not deleted.
How can i delete files older then 2 days.
Thanks
acko
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment