The database owner SID recorded in the master database

Easy unit testing for databases in SQL Server Management Studio

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Michelle Taylor, David Priddle

The database owner SID recorded in the master database

Postby bdill » Fri May 04, 2012 12:42 am

Error when adding a database.

X Installing Test Framework

Code: Select all
The database owner SID recorded in the master database differs from the database owner SID recorded in database 'Database'.  You should correct the situation by resetting the owner of database 'Database' using ALTER AUTHORIZATION statement.


This database is a restore from another server, so I'm used to dropping and re-adding user accounts b/c of SID issues, however the owner of the database in question is a domain account with permissions on both servers.

Based on my searching, it appears to be having trouble installing the CLR.
bdill
 
Posts: 28
Joined: Tue Feb 15, 2005 10:02 pm
Location: Nashville, TN

Postby Brian Donahue » Mon May 07, 2012 11:09 am

Thanks for your post. You are having a problem with your SQL Server because you have restored a master database from another server and the Security IDs are not going to match up, so you will have to reassociate them. You can check the ALTER AUTHORIZATION command in your SQL Server documentation or have a look at this blog post: http://blog.strictly-software.com/2009/ ... aster.html

(please note we do not take any responsibility for incorrect information in either source)
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Database vs Master SID

Postby bradwist » Mon Jun 18, 2012 9:23 pm

it strikes me that this is an odd test to run before installing this.

I can (and do) have databases on my system that have different owners, and the owners are not the owners of the master database.

The only reason that I can think of to force the SID to be the same for the Master Database and the User database is because of the CLR usage, which can sometimes run into problems if the SIDs are mismatched.

Is that the reason for this check? i'm curious.
bradwist
 
Posts: 2
Joined: Mon Jun 18, 2012 9:15 pm

Postby Brian Donahue » Tue Jun 19, 2012 10:10 am

This is a question about databases originating from a different server so the point is, all of the database security IDs will be different as they are generated by another server. Again, if you have SQL Server questions, I'd recommend asking the SQL Server community, for instance www.sqlservercentral.com.

Thanks!
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Test

Who is online

Users browsing this forum: No registered users and 0 guests