Cannot find the object 'spt_values', because it does not exist or you do not have permission.
sometimes when you do right click on the SQL Server database and click on the property.
you encounter screen like this.
------------------------------
Invalid object name 'master.dbo.spt_values'. (Microsoft SQL Server, Error: 208)
If you will google this error, you will come across many articles.
In many blogs I found it is updated that go ahead and execute u_tables.sql file from
C:\Program Files\Microsoft SQL Server\MSSQL14.<instanceID>\MSSQL\Install folder.
However, when you will try to execute this file, you will get an error like below.
Starting u_Tables.SQL at 22 Mar 2018 13:38:55:923
This file creates all the system tables in master.
Creating view 'spt_values'.
Msg 208, Level 16, State 1, Procedure spt_values, Line 7 [Batch Start Line 49]
Invalid object name 'sys.spt_values'.
sp_MS_marksystemobject: Invalid object name 'spt_values'
Msg 15151, Level 16, State 1, Line 62
Cannot find the object 'spt_values', because it does not exist or you do not have permission.
drop table spt_monitor ....
Creating 'spt_monitor'.
Grant Select on spt_monitor
Insert into spt_monitor ....
Finishing at 22 Mar 2018 13:38:59:417
okay, so How we will resolve this issue.
Resolution:- The Simple way to resolve this issue is...
1. Disconnect from the current session.
2. Take a DAC Connection for that instance. like below screenshot.
ADMIN:<SQL Server Instance Name>
.3. Then in the DAC Connection execute that script (u_tables.sql) file.
screenshot indicates script has executed successfully.
Now the said issue of Invalid object name 'master.dbo.spt_values'. (Microsoft SQL Server, Error: 208) will get resolve.
You will be able to see the property of databases.
Thanks for Reading.