Sql-server – Cannot access Properties page of a database

corruptionsql serversql-server-2005

I'm in the process of decommissioning a database server and migrating the databases from one server to another. I was attempting to get the the properties of the database and received a SQL Error popup.

Property Owner is not available for Database '[database name]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

Facts:

  • Server 2003 Standard with SP2
  • SQL Server 2005 Standard – 9.0.1399
  • I'm a sysadmin, so it shouldn't be perms issue
  • Had another sysadmin perform the operation with the same error
  • DBCC CheckDB listed no errors
  • Able to backup w/o error
  • Took DB offline/online w/o error

Any suggestions or tests that I can perform and report on?

Best Answer

You could probably have just set the database owner to [sa] (or any valid login really) rather than detach / re-attach.

ALTER AUTHORIZATION ON DATABASE::dbname TO [sa];

This probably happened because the login responsible for creating, attaching or restoring the database initially no longer exists. The UI isn't smart enough to fail gracefully when there isn't a valid owner.