We perform maintenance operations on SQL Server using Maintenance Plan. In this article I will describe the process of running a sql server job. I will share links to articles of other processes that can be done using the Maintenance Plan at the end of the article.
From the Management tab under SSMS, we select Maintenance Plans and Maintenance Plan Wizard as shown below.
On the next screen, select “Do not show this starting page again” as follows and click Next.
We give a name to the Maintenance Plan from the Name section as follows on the incoming screen. I named ExecuteJob.
Then click Change in the Schedule section. A screen appears as follows.
From Occurs you can choose Daily, Weekly or Monthly.
- Select Daily if you want this maintenance plan to run daily
- Select Weekly if you want this maintenance plan to run weekly
- Select Monthly if you want this maintenance plan to run monthly
In the Schedule section, we click on Change to set it to run once every week on Sunday at 00:00.
On the next screen, we select Execute SQL Server Agent Job as follows and click next.
When we get on the screen below, we select the jobs we want to run.
In the next screen, if you select “Write a report to a text file” as below, it will create a report in the folder you selected in Folder location.
If you select the E-mail report option, it will send the reports to the e-mail address you specified in the To: section.
Since I have no operator defined on my server, I got an error like the following.
There are no operators defined on the system.
You may want to read my article “How To Create An Operator On SQL Server” to get detailed information about the operator. Finish the process by clicking Next and Finish.
You can find more articles about Maintenance Plans below.