March 17, 2008 at 2:10 pm
Dear collogues,
I encountered and interesting trivia question. The initial database name in question has had lower case (NewDatabase) then when I restored it I placed it in upper case (NEWDATABASE) Well the existing maintenance plan before the restore,reflected both the old name and new restored name in Caps. NewDatbase is checked and is backing up nightly, however NEWDATABASE is not checked, which is fine.
Question: When I run the following query in msdb
SELECT plan_name, database_name
FROM msdb.dbo.sysdbmaintplans
INNER JOIN msdb.dbo.sysdbmaintplan_databases
ON msdb.dbo.sysdbmaintplans.plan_id = msdb.dbo.sysdbmaintplan_databases.plan_id
Result set:
plan_name database_name
------------------------------ ------------------------------
DB Maintenance Plan master
DB Maintenance Plan model
DB Maintenance Plan msdb
DB Maintenance Plan NewDatabase
DB Maintenance Plan ProjectDB
Why do I not see NEWDATBASE? How does it reflect in the maintenance plan but not here ? As expected if I created a new maintenance plan NewDatabase is no longer an option , just NEWDATABASE with caps.
March 18, 2008 at 1:48 am
The probable reason for this might be the update of the table msdb.dbo.sysdbmaintplans do not happne when you restore the database.
When first you have created the maintenance plan it's taking the name from sysdatabases. After restore name in sysdatabases changes and when you create the new plan it's in cap.
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
March 18, 2008 at 1:14 pm
I agree with you that the information is taken from sysdbmaintplans and also enterntain the thought that the update from the system table did not occur, however the observation that crushes that thought is that after the restore the maintaince plans reflects the new database with upper case and also reflects the same database with its prior name in lower case. How would it see the restore name if it is not updating? :hehe:
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply