Answers

Question and Answer:

  Home  MS SQL Server

⟩ Who Is the Owner of a Schema in MS SQL Server?

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 GlobalGuideLineDatabase;

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

ggl dbo

guest guest

...

The last query shows that schame "ggl" is owned by "dbo".

 142 views

More Questions for you: