change the owner of SQL database

How to change the owner of SQL database

 

1. Go to SQL Server Management

2.Select the database ID for which you want to change the owner

3.Execute the query as below (Click on New Query)

exec sp_changedbowner ’sa’

It is using Windows authentication for SQL login.

The above query will change the database owner to ’sa’ all Sytem Administrators.