How to Find Out Owner of Any Database in SQL Server - SQL Server DBA Tutorial

In this video you will learn how to find out owner of any database in SQL Server instance? you will learn following ways to accomplish this task.
1- How to find owner of any database in SQL Server using Store Procedure
2- How to find owner of any database in SQL Server using System views

Scripts:

--Finding owner of database using Store Procedure
sp_helpdb

--Finding out Owner of databse using sysdatabses system view 
select name as DatabaseName,SUSER_SName(sid) as Database_Owner from sysdatabases

--Where name = 'Your desired database name'

--Finding owner of database using sys.databases system view
Select name as DatabaseName, SUSER_SNAME(Owner_sid) as Database_Owner from sys.databases
--Where name = 'Your desired database name'



How to Find Out Owner of Any Database in SQL Server - SQL Server DBA Tutorial

1 comment:

  1. TODAY I GOT MY DESIRED XMAS LOAN AMOUNT $520,000.00 FROM A RELIABLE AND TRUSTED LOAN COMPANY. IF YOU NEED A LOAN NOW EMAIL CONTACT drbenjaminfinance@gmail.com

    Hello, I'm here to testify of how i got my loan from BENJAMIN LOAN FINANCE(drbenjaminfinance@gmail.com) I don't know if you are in need of an urgent loan to pay bills, start business or build a house, they offer all kinds of loan. So feel free to contact Dr. Benjamin Owen he holds all of the information about how to obtain money quickly and painlessly without cost/stress via Email: drbenjaminfinance@gmail.com

    Consider all your financial problems tackled and solved ASAP. Share this to help a soul right now THANKS.

    ReplyDelete