How to Change Ownership of a Database in SQL Server
In the following example we will change the ownership of Sales database.
By using the both way we can change the ownership. In that example we changed the ownership to sa.
--EXEC sp_changedbowner 'New Owner Login'
EXEC sp_changedbowner 'sa'
ALTER AUTHORIZATION ON Database:: Sales TO [SA]