banner



How To Create Backup Job In Sql Server 2008

Scheduling automated backup using SQL server 2008:

It is very important to take backups for the database files on regular basis. Microsoft SQL server 2008 has made this task very easy.

  • Users can schedule the backup to be taken at a particular interval
  • Users can schedule the backup copies to be deleted at a particular interval.

Do the following tasks to take a backup of a database:

1. Go to Start –>  All Programs –>  Microsoft Server 2008 R2 –> SQL Server Management Studio , Click SQL Server Management Studio . Microsoft Server Management Studio window with Connect to Server dialog box appears (see Image-1 ).

Image-1

Image- 1

2. Enter the password of the server in Password field.

3. Click Connect . It connects to the database server and the Microsoft Server Management Studio window refreshes (see Image-2).

Image-2
Image-2

4. From the object explorer, make sure SQL server agent is running, if not start SQL Server Agent (Right click and press start).

5. Expand Management subfolder à Maintenance Plans . Right click on Maintenance Plans and select New maintenance plan

(see Image-3).

Image-3
Image-3

6.   Enter a relevant maintenance plan name that suits your plan in the popup box. This will identify your backup (see Image-4). Click OK

Image-4
Image-4

7. Maintenance plan configuration page opens (see Image-5). Note the marked areas with arrows, these are the two areas that need to be used for setting up the maintenance plan. The marked area in the right top will be used to configure the time at which the plan needs to be executed. The bottom left pane shows the tasks that can be utilized to create a SQL Maintenance plan.

Image-5
Image-5

NOTE: In the Maintenance plan configuration page (see Image-5), if Tool Box window (bottom left pane) does not appear go to View –>click on Tool Box.

8.   Click on the calendar item shown in the right side top. Job schedule properties window pops up (see Image-6). Configure the execution time/frequency of the tasks in this pop up as per your requirement. Usually database backups are taken on daily/weekly/Monthly basis. Make sure you are selecting proper time so that your databases is least used. Click OK once you finish.

Image-6
Image-6

9. From the maintenance plan tasks pane ( Image-5), on the left side, select and double click on the Back Up D atabase Task, this will be used to select the databases to be backed up and the location where to save the Backup files (see Image-7).

Image-7
Image-7

10. Double click on the Back Up Database Task, it will open a new window that allows you to configure the database configuration for the backup. Here you configure the databases that you need to backup, then specify a location for the backup, the extension for the backup files etc. (see Image-8).

          From the pop up modal window, by clicking on "Databases" drop down, you will be able to select the required databases and also configure the file location, extension for the backup file etc.

Image-8
Image-8

11. Click OK once finished. Now Backup plan configuration is over. The backup files will be created on the scheduled time in the specified folder. The name of the file will be created by appending the date so that you can identify the back up for a particular date.

Since the backup files are created frequently, it is a good practice that you delete backup files after a certain period of time. For this you need to execute clean up task along with the maintenance plan. You can configure the clean-up task as follows.

From the left side pane, drag and drop maintenance clean-up task (see Image-9).

Image-9
Image-9
Image-10
Image-10

12.    Once you click OK, then save the maintenance plan. You can either wait till the next execution time or execute it manually in order to check whether everything is working fine.

source: Microsoft, sreejukg

How To Create Backup Job In Sql Server 2008

Source: https://lakkireddymadhu.com/2013/03/01/scheduling-automated-backup-using-sql-server-2008/

Posted by: hamiltonprionat.blogspot.com

0 Response to "How To Create Backup Job In Sql Server 2008"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel