SQL SERVER – Find Owner of Database – Change Owner of Database


 

Recently I had the opportunity to help a client with Comprehensive Database Performance Health Check, and while working together we ended up in a very interesting situation where they had one database without an owner. As there was no owner, it was not possible to open that database in the SSMS. We had to find Owner of the Database and change it later on. Let us see how we can do that with the help of T-SQL Script.

Script – Find Owner of Database SELECT name AS [Database Name], suser_sname( owner_sid ) AS [Database Owner Name] FROM sys.databases

Now