Monday, March 26, 2012

Rights assigned to Windows\Power Users in SQL Express.

Hi,

In SQL Server Express Edition, what are the rights that are assigned to a Normal Windows User and PowerUser by default ?

When I install SQL Express on a clean machine and login as Power User I can add/edit/delete data but when I login as Normal Windows User I can see the data but not change it.

Please help me in this regard.

Thanks and Regards,
Gautham.

What do you mean exactly by the ability to add/edit/delete data; what kind of data is that?

In SQL Server Express, members of Builtin\Administrators are members of the sysadmin server role. Members of Builtin\Users are only granted the connect sql permission. There is no special provisioning for Builtin\Power Users, so they would just have the same right on SQL Server Express as a "normal" user.

To verify if a principal has a special permission, you can use the has_perms_by_name builtin. For example, to check if a user has select on table t, you can execute:

select has_perms_by_name ('t', 'object', 'select')

while connected as that user.

For additional information, you can check the following catalogs:

sys.server_principals
sys.server_permissions
sys.login_token
sys.database_principals
sys.database_permissions
sys.user_token

Thanks
Laurentiusql

No comments:

Post a Comment