xp_sqlmaint is an obsolete feature in SQL Server that Microsoft has announce will be no longer supported in future versions of SQL Server.
Even thought it is deprecated xp_sqlmaint is still included in SQL Server 2016.
Problems with sp_sqlmaint. Master..sp_sqlmaint
It is a way to run maintenance plans that was available before the current concept of maintenance plans was available.
As for the problems with this way of using sp_sqlmaint, first off, it is obsolete, deprecated, Microsoft has stated the following.
“This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. ”
That alone is usually enough of a reason to move to something else.
Next, it can run for a very long time because all of the options are run serially (one after another).
- First CheckDB is run.
- Then the backup is run.
- Then the verification of the backup is run.
- Then the statistics are regenerated (all of them).
One problem with this is that the first and last steps in the list above are the items that can most negative performance impact users on the system.