What is the difference between jobs and maintenance plan in sql server?
I am confused about where I should use job and where maintenance plan.
A maintenance plan is a set of measures (workflows) taken to ensure that a database is properly maintained and routine backups are scheduled and handled.
The Maintenance Plan Wizard creates a maintenance plan that Microsoft SQL Server Agent can run on a regular basis. This allows you to perform various database administration tasks, including backups, database integrity checks, or database statistics updates, at specified intervals.
Jobs can run repetitive or scheduled tasks, and they can automatically notify users of job status. Stored procedureSQL provides the stored procedure mechanism to simplify the database development process by grouping Transact-SQL statements into manageable blocks.
A job is a specified series of operations performed sequentially by SQL Server Agent. A job can perform a wide range of activities, including running Transact-SQL scripts, command prompt applications, Microsoft ActiveX scripts, Integration Services packages, Analysis Services commands and queries, or Replication tasks.
Jobs are user defined scheduled tasks (could be stored procedures, emails and more).
Maintenance plans are used to optimize the database.
From MSDN:
Maintenance plans create a workflow of the tasks required to make sure that your database is optimized, is regularly backed up, and is free of inconsistencies.
A maintenance plan may use jobs as part of the workflow.
A job may be part of a maintenance plan.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With