My laptop screwed up badly today. After several failed restarts, my desktop was stable and somewhat responsive, so I tried to continue normally.
SSMS’s Object Explorer is now broken. Expanding any node produces this error message:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Database ‘msdb’ cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details. (Microsoft SQL Server, Error: 945)
To fix this, I had to restart SQL Server.
Start a new PowerShell session as Administrator and run the following:
Restart SSMS and the Object Explorer will work again.