Hi friends, How can I create ONE SQL Agent JOB That will 2 activities: (Using SQL 2005) 1) Backup a specified Database (Full Backup) and store the backup file in a Specified FOLDER. 2) Manage the Backup Files in the FOLDER, ie. Delete the files that are 5 week OLD. I want to schedule the JOB to run every Sunday. I am able to do this using the SQL Server Maintenance Plan and that creates a Job. But that JOB refers to the maintenance plan package. Which I dont want to be depended on. Please suggest.
Prabhat, If you search around a number of folks have provided scripts to do this sort of thing. Nigel Rivett: http://www.nigelrivett.net/SQLAdmin/BackupAllDatabases.html Ola Hallengren: http://www.sqlservercentral.com/scripts/Backup+%2f+Restore/62380/ MD: http://www.sqlservercentral.com/scripts/Backup+%2f+Restore/31932/ There are others, but this should get you started. RLF "Prabhat" wrote in message news:e6e8160a-fdf0-4d4c-ac1e-eae2c05bee23@u6g2000prc.googlegroups.com... > Hi friends, > > How can I create ONE SQL Agent JOB That will 2 activities: (Using SQL > 2005) > > 1) Backup a specified Database (Full Backup) and store the backup file > in a Specified FOLDER. > 2) Manage the Backup Files in the FOLDER, ie. Delete the files that > are 5 week OLD. > > I want to schedule the JOB to run every Sunday. > > I am able to do this using the SQL Server Maintenance Plan and that > creates a Job. But that JOB refers to the maintenance plan package. > Which I dont want to be depended on. > > Please suggest.