What is a job
A job is a schedule that SQL Server executes at timed intervals.
SQL Server Maintenance plan and job relationships
A maintenance plan is a system-predefined job, such as a backup, restore database, and empty log maintenance plans.
General tab
Open the SQL Server database, click the SQL Server Agent, locate the job under the agent, and right-click the job to select new job.
Steps to read
On the General tab, you need to enter the name, owner, category, and description of the job, and check the enabled status on it: When you're done, click the OK button.
END
Steps tab
Click the Steps tab and choose the New button here to create the contents of the job.
When you click New, in the pop-up window, enter the step name, execution type, run as, database, and command script. : After entering, click the OK button.
END
Schedule tab
After you set up the steps, you need to control the steps you have created, which is called executing the commands on time, clicking on the Schedule tab, and tapping the new button.
Click the New button to enter the time, period, etc. to execute the command in the popup window. When you're done, click the OK button.
END
Alerts tab
After you open the Alerts tab, click the New button, where the action is to set an alert when a problem occurs when the command is executed.
When the Alert Settings window opens, enter a name, type, definition, criteria, and so on. When you're done, click the OK button.
END
Notification tab
Notification tab, you can configure the actions to be performed when the job finishes, such as sending e-mail, paging, writing to the Windows Application event log, auto-deleting jobs, and so on.
END
Destination tab
The Target tab can be set to a local server or multiple servers, if more than one is required to configure the appropriate operation.
Once all the operations are complete, click the OK button in the window and the job is created.
T-SQL for the database family (job and maintenance plan)