Start SQL Server Agent: Configure SQL Server 2012

SQL Server Agent automates a variety of administrative tasks for a SQL Server database.

This information is specific to SQL Server 2012. See Automating Database Administration with SQL Server Agent for previous versions.

of 06

Starting SQL Server Agent in SQL Server 2012

SQL Server Configuration Manager

Open Microsoft SQL Server Configuration Manager and click the SQL Server Services item in the left pane. Then, in the right pane, locate the SQL Server Agent service. If the status of that service is RUNNING, you do not need to do anything. Otherwise, right-click on the SQL Server Agent service and select Start from the pop-up menu.

of 06

Switch to SQL Server Management Studio

Object Explorer
Object Explorer.

Close SQL Server Configuration Manager and open SQL Server Management Studio. Within SSMS, expand the SQL Server Agent folder.

of 06

Create a SQL Server Agent Job

Creating a Job

Right-click the Jobs folder and select New Job from the start-up menu. You'll see the New Job creation window. Fill in the Name field with a unique name for your job (being descriptive will help you manage jobs better down the road!). Specify the account that you wish to be the owner of the job in the Owner text box. The job runs with the permissions of this account and may only be modified by the owner or sysadmin role members. 

After you've specified a name and owner, choose one of the predefined job categories from the drop-down list. For example, you might choose the "Database Maintenance" category for routine maintenance jobs

Use the large Description text field to provide a detailed description of the purpose of your job. Write it in such a way that someone (yourself included!) would be able to look at it several years from now and understand the purpose of the job. 

Finally, ensure that the Enabled box is checked.

of 06

View the Job Steps

Job Steps Window

On the left side of the New Job window, locate the Steps icon under the Select a page heading. Click this icon to see the blank Job Step List.

of 06

Create a Job Step

Creating a New Job Step

Next, add the individual steps for your job. Click the New button to create a new job step. 

Use the Step Name textbox to provide a descriptive name for the Step. 

Use the Database drop-down box to select the database that the job will act upon. 

Finally, use the Command textbox to provide the Transact-SQL syntax corresponding to the desired action for this job step. Click the Parse button to verify the syntax you've entered. 

After successfully validating the syntax, click OK to create the step. Repeat this process as many times as necessary to define your desired SQL Server Agent job.

of 06

Schedule Your SQL Server Agent 2012 Job

Scheduling SQL Server Agent Jobs

Finally, set a schedule for the job by clicking the Schedule icon in the Select a Page portion of the New Job window.

Provide a name for the schedule in the Name text box and choose a schedule type from the drop-down box. Then use the frequency and duration sections of the window to specify the job's parameters. When you are finished click OK to close the Schedule window and OK to create the job.

mla apa chicago
Your Citation
Chapple, Mike. "Start SQL Server Agent: Configure SQL Server 2012." ThoughtCo, Dec. 6, 2021, Chapple, Mike. (2021, December 6). Start SQL Server Agent: Configure SQL Server 2012. Retrieved from Chapple, Mike. "Start SQL Server Agent: Configure SQL Server 2012." ThoughtCo. (accessed June 1, 2023).