Property Size is not available for Database '[tempdb]'
Situation:
Many times, DBA try to view the TEMPDB properties but they get the following error:
The user is unable to view the TEMPDB property even if he has proper rights on the SQL Server instance. In fact, sometimes SYSADMIN role user is also unable to view the property and getting the same error.
Solution:
For user databases, this error can be resolved by changing the database ownership. We can run this command to check the Database ownership:
sp_hepldb 'database name'
user databases ownership can be SET by using the following command:
USE 'db name'
go
sp_changedbowner 'sa'
However, you can not change ownership of SYSTEM databases (tempdb, master, model & msdb) through the sp_changedbowner command. 'sa' is the default owner of all the system databases.
I workaround this problem and found that this error frequently arises when tempdb is highly utilised and lots of contention is there on tempdb. In this scenario, SQL server is unable to read the database properties. I would recommend you to wait for some time until db contention is there and try after that.
Another reason for this error is the corrupted tempdb files. In this scenario, check db health by running DBCC CHECKDB command. In my case, I found a couple of errors that represents the corrupted tempdb files. To resolved this issue, I stopped the SQL Server service and deleted the tempdb files and then started the SQL Server service. This process would recreate the new files on the underlying disk storage system and I was able to see the db properties after that.
Comments
Post a Comment