DB Maintence Plan

  • How I can I find out who created DB Maintence Plan?Thank you

  • Did a profiler when I clicked through the GUI Maintenance plans and got this query which returns what you are looking for:

    SELECT

    s.name AS [Name],

    s.create_date AS [CreateDate],

    s.owner AS [Owner]

    FROM

    msdb.dbo.sysmaintplan_plans AS s

    ORDER BY

    [Name] ASC

    It's interesting that the table/view of msdb.dbo.sysmaintplan_plans is not visible from the SSMS GUI when the MSDB table/view list is explanded.

  • Thank you,but there is no table as sysmaintplan_plans

  • No, it is not a table. It is a view, a view that you can not see from the management studio.

    But if you run the query, it should return the results.

    And if you run

    select * from msdb.sys.objects

    where name like '%sysmaintplan_plans%'

    You should be able to see that it is a view.

  • What version of SQL do you have? The query above is correct for SQL 2005 if your running SQL 2000 try this

    s.plan_name AS [Name],

    s.date_created AS [CreateDate],

    s.owner AS [Owner]

    FROM

    msdb.dbo.sysdbmaintplans AS s

    ORDER BY

    [Name] ASC

  • Thank you that worked

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

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