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?

7

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.

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
    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 – Jack Whittaker Jan 30 '17 at 9:37
0

Just need to change the db owner to sa and it will work fine. This happens when the database owner is not defined i.e 'UNKNOWN'

Run below command for that database and it will work fine

EXEC sp_changedbowner 'sa';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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