Hi
Today i faced a wiered issue, One of my database on sql server 2005 was offline.
Scenerio:One fo my database was offline , I checked in
1. SSMS (GUI) -- DB is offline
2. sys.databases (status) -- offline
3. Job is using DATABASEPROPERTYEX and its ignoring databases as status is offline.
And we also know (observed) if we change status from online to offline , Message come as below
/******************************************/
Setting database option OFFLINE to ON for database "dbname".
SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
/******************************************/
And when we change from offline to online , message is like
/******************************************/
Setting database option ONLINE to ON for database "dbname".
/******************************************/
Issue : Now When i change database status from offline to online (online to on), below message generated. This only happen once and i am not able to regenerate same
/******************************************/
Setting database option ONLINE to ON for database "dbname".
SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
/******************************************/
Confusion: Why cache stores are flushed while taking database online ??
Thanks Saurabh Sinha http://saurabhsinhainblogs.blogspot.in/ Please click the Mark as answer button and vote as helpful if this reply solves your problem