Friday, September 14, 2012

SQL Server 2008 Automatic job

 
Automatic job to Backup DB in ' SQL Server 2008 '
 
 
1- Open sql server Managment Studio and connect with Account in SYSAdmin Group like 'sa'
 
 
2- make sure the SQL Server Agent in Start mode
 
 
3- go to Managment --> Maintenance Plan --> new Maintenance Plane and set Name for this Plan
 


 
4- select Calender Icon from Top Right side
 

5- configer time/date and if you want to repeat set Schedual type Recurring
 
and Frequency --> Occurs (Weekly,Daily ...)
and Daily Frequency --> Occurs Once At (time you want)
 
 
6- Tool Box in left side --> Drag Backup Database Task --> Drop in Yellow Space in right side
 
 
7- Double Click In Back Up Database Task Box And Set The Configration in below window
 
  • in Database(s) Field Select your DB you want to backup
  • in Folder Field Choose Location You want
  • then OK
 
8- now you can Save  and test it Manualy if you want by right click in maintenance plan you created now and select Execute , go to folder you select and chick if file .bak created or not.
 
 
 if you want to Delete Old Backup File like older than 1 month you must do that
 
1- Tool Box in left side --> Drag Maintenance Cleanup Task --> Drop in Yellow Space in right side
 
 
2- Double Click In Maintenance Cleanup Task Box And Set The Configration in below window
  • in Folder Field Choose the same Location in backup task
  • in File extension type the same extension in backup task
  • then OK
 
3- now Save
 

No comments:

Post a Comment