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, 3071🔥, 0💬
Popular Posts:
What Happens If the UPDATE Subquery Returns Multiple Rows in SQL Server? If a subquery is used in a ...
How To Select All Columns of All Rows from a Table in Oracle? The simplest query statement is the on...
What Privilege Is Needed for a User to Delete Rows from Tables in Another Schema in Oracle? For a us...
Where to find Oracle database server tutorials? Here is a collection of tutorials, tips and FAQs for...
Where to find answers to frequently asked questions on INSERT, UPDATE and DELETE Statements in MySQL...