Value cannot be null, Parameter name: viewInfo

sql-server, sql-server-2008, ssms

Solution

Check the environment value for Temp and TMP.

`C:\Users\buck>set t`

`TEMP=C:\Users\buck\AppData\Local\Temp\2`

`TMP=C:\Users\buck\AppData\Local\Temp\2`

Make sure the directory listed exist and your id has appropriate permission to write to that directory. Alternatively, through the control panel (`Control Panel-> System and Security-> System -> Advanced system settings`), you can change the default directories that are assigned to TEMP and TMP.

Problem

After installing SP2 to an existing SQL Server 2008 R2 I lost access to all my databases and started facing the error in the screenshot. Any ideas?

Original source