June 30, 2011 at 8:45 am
Hi Folks
I am trying to figure out why SMS is smart enough to remove a database from a Maintenance Plan when a database is deleted, but dumb when it comes to running the plan. By That I mean, the database was in the MP and it ran fine, then the database was deleted and SMS removed it from the MP, BUT, when the MP runs, it stlil thinks the database is still part of the MP.
So I don't get it.
Does something have to be re-cycled ?
Anyone with more experience than myself care to chime in ?
Thanks
Jim
June 30, 2011 at 9:24 am
How many subplans are in our maintenance plan? Do you have explicit databases selected in each of the subplans? How about the setting that says basically ignore it if its not available? Why don't you go into some detail about your plans.
CEWII
July 7, 2011 at 12:54 pm
H ielliot
apparently my reply did not go throuigh last week
How many subplans are in our maintenance plan?
1
it does dbcc, rebuild index, full backup
Do you have explicit databases selected in each of the subplans?
Yes
I am selectign Specific databases for this plan
How about the setting that says basically ignore it if its not available?
I do not see that in 2005
Why don't you go into some detail about your plans.
My maint plans are set up for full and differential of specific databases (non-system and non adventureworks and northwind) those have their own plans
its funny that my differential plan works fine with the same databases selected
Thanks
Jim
July 8, 2011 at 7:25 am
Some information got orphaned, take a look at the following:
--RUN AGAINST msdb database
select * from sysjobs --this will give you the job id
select subplan_id from dbo.sysmaintplan_subplans where job_id = 'job_id' --this will supply the subplan_id
delete from dbo.sysmaintplan_log where subplan_id = 'subplan_id'
delete from dbo.sysmaintplan_subplans where job_id = 'job_id'
delete from dbo.sysjobs where job_id = 'job_id'
Chris Powell
George: You're kidding.
Elroy: Nope.
George: Then lie to me and say you're kidding.
July 11, 2011 at 9:52 am
Hi Chris
thanks, but i do not want to delete the maint plan as I am using it everyday
the plan runs but generates a message complaining that a database does not exist
but is included in the set of specific databases i have seleted when in fact it does not
Message:
One or more selected databases no longer exist on server.
Database 'SS66_WSS_Search1' is not valid to be included in the maintenance plan.
SQL Server is smart enough to know the database does not exist but not smart enough to know that it is NOT in the maint plan. It still thinks it is for some reason
Thanks
Jim
July 11, 2011 at 10:04 am
The maintenance plans are fairly basic and resolve the database names when the plan is built. It's one reason why so many people avoid them as they advance in their knowledge
July 11, 2011 at 10:10 am
you'll need to edit or rebuild your plan, i think.
I just created a new main plan, and when i look a tthe details, depending on how you set it up at the beginning, selecting all databases, or selecting all the options for each database affected the built plan, obviously.
I think specific databases were selected, so you can see it's actually just writing the commands to do the maintenance as of the day you create the plan;
the "all databases" selection seems to make a cursor to look through items in the metadata.
Eliiot mentioned the 2008? option to ignore if it is not available, which might be helpfula s well.
Lowell
July 11, 2011 at 11:05 am
Hi Steve
i agree, but until I can get there myself, I need to rely on these Maint Plans
It seems to me that something so basic should work correctly
This is just one of the many issues I have with MS and their software regarding maint plans
Thanks
Jim
July 11, 2011 at 11:09 am
Thanks Elliot
I did not want to do that as I have added a lot of Notifications and T-SQL to the plans
What really bugs me is that the Differential plan uses the same database selections of databases as the Full and it has no issues.
I wil figuire out something
Thanks again
Jim
July 11, 2011 at 2:58 pm
You might check out Ola's scripts. Lots of people use them instead of maintenance plans
http://www.sqlservercentral.com/scripts/Backup+%2f+Restore/62380/
July 12, 2011 at 2:51 pm
Hi Steve
thanks
I had been looking at them when I was emailing Brent Ozar a while back
He also recommened her scripts
Jim
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply