سؤال

While running

select * from sys.server_principals

for public role, in the column is_fixed_role is shown 0

enter image description here enter image description here

But the documentation states that it is a fixed server role. enter image description here

Documentation Link

Although it is stated that public is a little bit different from other roles because we can assign permissions to it. Anyway it is mentioned as a fixed role.

Can anyone explain this dilemma?

هل كانت مفيدة؟

المحلول

One reason that I can think of why public is NOT a fixed role - is_fixed_role is that the permissions can be changed.

From BOL:

The permissions that are granted to the fixed server roles (except public) cannot be changed.

Only assign public permissions on any object when you want the object to be available to all users.

Note: public is implemented differently than other roles, and permissions can be granted, denied, or revoked from the public fixed server roles.

the other fixed server roles permissions cannot be changed.

نصائح أخرى

Public is just an odd duck.

But to apply some retroactive continuity to the documentation you might say that all these built in roles are "fixed" or unchangeable in ways that normal roles are not. The roles marked as is_fixed_role have fixed permissions and changeable membership. Public has fixed membership (everyone) and changeable permissions.

The column in sys.server_principals and sys.database_principals should be documented to clarify this.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى dba.stackexchange
scroll top