If I create a new schema and set the schema owner to another schema, for example dbo, what is the meaning of that in regards to my new schema?
Does my new schema inherit the same permissions from it's owner dbo?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityA Schema's owner is always a User (or Database Role). There may be a Schema with the same name as a User, because in very old versions of SQL Server a User and a Schema were the same thing. So there's still a User called dbo
and a Schema called dbo
in every database.
A Schema's owner is a User who has full control of the schema, and who will be the default owner of every object added to the schema. Owning an object suppresses permissions-checking on the object, and plays an important role in Ownership Chains.
ALTER AUTORIZATION ON OBJECT::SomeObject TO UserWhoIsNotSchemaOwner
such that the object owner is different than the schema owner. The schema owner will not be inherited in that case.
Sep 11, 2019 at 11:03
ALTER AUTHORIZATION ON SomeSchema.SomeTable
to switch the owner of a single object. It then no longer inherits ownership from the schema. But as @DanGuzman this functionality is so obscure that it's actually dangerous, given the serious security implications of Ownership Chains.
Sep 11, 2019 at 12:41