Determining the database owner is
important if you want to take advantage of cross-database-ownership-chaining.
If databases have different owners, then you have issues with accessing objects
between databases.
To find the database owners:
SELECT SUSER_SNAME(owner_sid)
FROM sys.DATABASES
FROM sys.DATABASES
To change the owner of a database:
USE DATABASE
EXEC sp_changedbowner 'sa'
EXEC sp_changedbowner 'sa'
The standard owner for databases is
usually sa.
No comments:
Post a Comment