sp_add_maintenance_plan
Adds a maintenance plan and returns the plan ID.
What changes
- Input
- Not stated in the Microsoft summary.
- Output or change
- Adds a maintenance plan and returns the plan ID.
Syntax at a glance
dbo.sp_add_maintenance_plan
[ @plan_name = ] 'plan_name'
, [ @plan_id = ] 'plan_id' OUTPUT
[ ; ]
Work example
Adds a maintenance plan and returns the plan ID.
Write a proposed call on paper. Name the target, required permission, expected change, and recovery step before any lab use.
Check your work What can this procedure change or start, and what permission does it need?
Open Microsoft Learn for full syntax, permissions, and details for your version.