Manual Delete Maintenance Plan from SQL Server 2000

  • no blocking as well...

  • hi all,

    thanks for the time and effort help given..

    just would like to know whether i can delete the MP using below stored procedure?

    sp_add_maintenance_plan ?

    however, the stored procedure is just deleting below systables from msdb.

    /* clean the related records in sysdbmaintplan_database */

    DELETE FROM msdb.dbo.sysdbmaintplan_databases

    WHERE plan_id=@plan_id

    /* clean the related records in sysdbmaintplan_jobs*/

    DELETE FROM msdb.dbo.sysdbmaintplan_jobs

    WHERE plan_id=@plan_id

    /* clean sysdbmaintplans */

    DELETE FROM msdb.dbo.sysdbmaintplans

    WHERE plan_id= @plan_id

    I notice there is another table storing the history -->msdb.dbo.sysdbmaintplan_history....

    To manual delete, can I do like below ?

    1) execute sp_delete_maintenance_plan 'xxxxx'

    2) delete from msdb.dbo.sysdbmaintplan_history where plan_id='xxxxx'

    kindly advice, thousand thanks...

  • I'd do it with the proc. If that fails, hopefully you'll have an error message!

  • means below approach is safe to go?

    1) execute sp_delete_maintenance_plan 'xxxxx'

    2) delete from msdb.dbo.sysdbmaintplan_history where plan_id='xxxxx'

  • I don't mess around with system tables.

    I don't have problems calling procs tho (but I preffer to see EM do it first just to make sure I understand what's going on).

    I don't have bol 2000 here. Read up on what the proc does just to be 100% safe and then execute. that seems like the sensible way to go.

Viewing 5 posts - 16 through 19 (of 19 total)

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