The use of sp_MSforeachdb can have unintended results. It will occasionally miss databases. There are better methods (such as a cursor - and considering msforeachdb is just a loop, a cursor is ok).
Here is an article talking about the behavior and a workaround.
Here is a different version of msforeachdb by Gianluca that is what I prefer to use.
http://spaghettidba.com/2011/09/09/a-better-sp_msforeachdb/
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events