We have a few SQL Server 2008 R2 databases where its member domain was changed (i.e. it was connected to DOMAINA and is now on DOMAINB). We have three databases where the owner of the database is DOMAINA\User, which no longer exists.
I have tried logging on to SQL Server as DOMAINB\Administrator and sa and run the following command:
ALTER AUTHORIZATION ON DestDB TO sa
Error:
Msg 15151, Level 16, State 1, Line 1
Cannot find the object 'DestDB', because it does not exist or you do not have permission.
I was under the (obviously incorrect) assumption that sa could do virtually anything on the server.
How can I get ownership of these databases back?