Occasionally there will be an issue with the actual name of the database - for example, it will contain a space like "My Database" In this case
Example:
EXEC sp_MSforeachdbCleanPasswords 'USE [?];'
OR
EXEC sp_MSforeachdbCleanPasswords 'USE ''[?]'';'
depending on the need for the dynamic sql.
Jamie