Wednesday, August 22, 2012

How to check Database Owner and Change it

You can easily get all the Database Owners  by -

Use Master
SELECT SUSER_SNAME(owner_sid) DB_Owner,[name] DB
FROM sys.databases
and You can change it by -

USE YourDatabase
EXEC sp_changedbowner 'sa'

No comments:

Post a Comment