How To Find SQL Server Database Owner for All Databases


SQL Server recommends ‘sa’ as database owner for all sql server databases. Where as when you create sql database it takes your login as database owner by default.
Its DBA’s responsibility to regularly audit sql databases and make sure there owner is sa.

Below is quick scripts to find database owner for all SQL Server databases.

/********************************************/
SELECT suser_sname( owner_sid ) as db_owner, name FROM sys.databases
/********************************************/






No comments:
Write comments

Please do not enter spam links

Meet US

Services

More Services