views:

19

answers:

1

Hi,

How to create a a maintenance plan for a full backup that run the first 10 days of the month in SQL 2008? THANKS!

+2  A: 

Create the maintenance plan and schedule it to run every day.

Then go into the job in "SQL Server Agent" and modify the TSQL that launches the backup - put a condition there that will only execute the backup on the first 10 days of the month.

If DatePart (dd, GetDate()) < 11 
BEGIN
    BACKUP DATABASE AdventureWorks2008R2 
        TO DISK = 'Z:\SQLServerBackups\AdvWorksData.bak'
        WITH FORMAT;
END
Raj More
Thank you for your answer.. I think I have to create a maintenance plant which runs a T-SQL script, because the backup task make use of SSIS packages and not T-SQL directly.
andrew007