Extended stored procedure xp_sqlmaint

  • Hi,

    Can anyone let me know, what is the significance of

    xp_sqlmaint extended stored procedure??

    Where exactly it is used?

    Thanks

  • Calls the sqlmaint utility with a string that contains sqlmaint switches. The sqlmaint utility performs a set of maintenance operations on one or more databases.

    From BOL

    In the following example, xp_sqlmaint calls sqlmaint to perform integrity checks, create a report file, and update msdb.dbo.sysdbmaintplan_history.

    EXEC xp_sqlmaint '-D AdventureWorks -PlanID 02A52657-D546-11D1-9D8A-00A0C9054212

    -Rpt "C:\Program Files\Microsoft SQL Server\MSSQL\LOG\DBMaintPlan2.txt" -WriteHistory -CkDB -CkAl'

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • Thanks for the quick response.

    I would like to know in the above example , am assuming you have created a "Integrity check" maintenance plan.Right???

    or else by seeing at the above command, can you we say it is "Integrity check" plan?

  • The example is calling an existing maintenance plan

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • Thanks.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply