Collections:
Who Is the Owner of a Schema in SQL Server
Who Is the Owner of a Schema in SQL Server?
✍: FYIcenter.com
When you create a schema in a database, SQL Server will assign a owner (a database user) to this schema. If your login name is mapped to the owner of a schema at the database level, you have the full permission on all objects in this schema.
The following tutorial exercise shows you how to see who is the owner of a schema:
-- Login with "sa" USE FyiCenterData; GO SELECT s.name, u.name AS owner FROM sys.schemas s, sys.database_principals u WHERE s.principal_id = u.principal_id; GO name owner ------------------- -------------------- dbo dbo fyi dbo guest guest ...
The last query shows that schema "fyi" is owned by "dbo".
⇒ "ALTER AUTHORIZATION" - Changing the Ownership of a Schema in SQL Server
⇐ Default Schema of Your Login Session in SQL Server
2016-10-22, 1453🔥, 0💬
Popular Posts:
Where to find answers to frequently asked questions on CREATE, ALTER and DROP Statements in MySQL? H...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
How To Create a Stored Program Unit in Oracle? If you want to create a stored program unit, you can ...
How To Drop an Index in Oracle? If you don't need an existing index any more, you should delete it w...