5

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?

0

2 Answers 2

9

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.

0
1

Fixed the issue, but not sure what caused the problem.

I detached/reattached the database and then was able to access the database properties.

It appears that this database lost its owner somehow. How does that even happen?!

1
  • 2
    The database owner might have been John Smith. John was a contractor who has now left. The system finally cottons on to his non-existence. I would not recommend detaching / reattaching - a bit risky if Aaron's solution does the trick Jan 30, 2017 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.