June 2, 2009 at 10:30 am
How I can I find out who created DB Maintence Plan?Thank you
June 2, 2009 at 12:43 pm
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.
June 2, 2009 at 1:43 pm
Thank you,but there is no table as sysmaintplan_plans
June 2, 2009 at 1:53 pm
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.
June 2, 2009 at 1:57 pm
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
June 2, 2009 at 2:22 pm
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