Property Owner is not available for Database ‘[database_name]’ Error

I came across this issue for some of our databases today when trying to view database information through the GUI


After investigation, i have found that this happens because the owner of the database has been removed from the domain or access to the server for that person has been removed. this can happen if a colleague who created the database or was the DB Owner leaves etc.

The problem this causes is that the sid in the server_principals system table becomes NULL for this user, preventing a match against the owner_sid in the sys.databases table.

To find out if any of your databases have this occurance –

SELECT databases.NAME,server_Principals.NAME
FROM sys.[databases]
LEFT JOIN sys.[server_principals]
[databases].owner_sid = [server_principals].sid

To resolve, use the following syntax to change the database owner to a user that exists. e.g.

USE [CMS3000Train]
EXEC sp_changedbowner ‘sa’


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: