Is there a SQL 2005 equivalent of the attached code to return the list of DBs in a maintenance plan?
I have heard this info may be embedded in the SSIS package and is not queryable.
Can anyone confirm?
We use LiteSpeed for our backups and have a stored proc on our SQL 2000 servers which queries a given maintenance plan name to return the list of databases that should be backed up.
This means when we change the list of databases in a maintenance plan, our proc automatically picks up the change and LiteSpeed backs up the correct databases.
Works fine, until we try it on SQL 2005 :(
select database_name from msdb..sysdbmaintplan_databases where plan_id = @planid