This article uses the SQL Server R2 's own maintenance plan to create a task that automatically backs up data.
First, start ? SQL Management Studio, make sure that SQL Server agent is in the startup state. If not, you can right-click to select start .
second , expand Management---Maintenance plan, and right-click Maintenance plan to select New maintenance plan, where you can fill in a meaningful name.
After clicking "OK", the following screen will open, the two places in the red box are the places we need to be aware of.
The third step , click on the right side of the calendar icon of the red box, you can configure your own "job schedule Properties", I configured here: Every day 4 o'clock in the morning repeat, click "OK" after completion.
Fourth Step : Drag and drop the "Back Up Database" task in the red box on the left in the second step to the right, and put it in the appropriate location.
Fifth , double-click the left icon in the Backup database task that you dragged and dropped. Here I select a database to be backed up in the database, where the backup is saved:
D:\Program Files\Microsoft SQL Server\mssql10_50.mssqlserver\mssql\backup, the backup extension is bak. Click "OK" when you are done.
Then click the Save icon on the toolbar.
What if the task we configured is tested successfully? Is it hard to wait till tomorrow? Of course not, you can right-click on your "maintenance plan" and select "Execute".
However, there is a problem, we configure the daily implementation of the backup plan, so the accumulation of the month, not the disk will be blown out? Don't worry, we can then configure a "cleanup maintenance" schedule to delete the earlier backup files.
If your maintenance Plan Design window is closed, right-click and select "Modify" to reopen the design interface.
In the first step , drag and drop the Purge maintenance task from the toolbox on the left to the right and put it in the right place.
Step two : Double-click the icon in the Purge maintenance task and I choose to delete the backup 4 weeks ago. Note that the folder and file extension Here is the location you specified when you selected the backup task above.
This completes the task of cleaning up the early backups. It's a comforting smile,J .
If it helps you, give it a break. J, remember, my name cents ~
?
Create an automated backup plan with SQL Server R2