Change Database Owner in MS SQL Server / SQL Server / Change Database Owner in MS SQL Server

You can change the owner of an MS SQL Server database using SQL Server Management Studio. Connect to your MS SQL instance, create a new query, and run the following Transact-SQL query:


This is the recommended method.

Alternatively, you can use the built-in changedbowner procedure to change the owner:

USE [yourdbname]
EXEC sp_changedbowner 'POWERADM\Alex'

This method is deprecated and will be removed in future versions of SQL Server. ( ):

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use ALTER AUTHORIZATION instead.

To find out the current owner of a Microsoft SQL Server database, run the query:

USE [master]
SELECT as [Database Name], [SQL Login Name] from sys.databases db left join sys.server_principals sp on db.owner_sid=sp.sid where'yourdbname'

Or you can list all databases and their owners:

SELECT [name], SUSER_SNAME(owner_sid)
FROM sys.databases

You can also change the owner from the SSMS GUI:

  1. Open the database properties;
  2. Navigate to the Files tab;
  3. The current owner is listed here. To change it, click the button with three dots and select a new account from the Logins section. MS SQL server change database owner


Leave a Reply

Your email address will not be published. Required fields are marked *