“public” role access in SQL Server

微笑、不失礼 提交于 2019-12-08 16:03:02

问题


Can anybody let me know that what permission does public have in sql server.

Thanks


回答1:


By default the public role can't do anything*. Some DBAs will grant the public role additional rights (to see or change data or run stored procs) if they want everyone to have those rights.

* -- Well, almost anything. They can look at some system views and run queries that don't touch any data (like "select 'a'").

To see the specific rights, right click on the role (In SQL 2005 it's Databases > {Your Database} > Security > Roles > Database Role) and select Properties.

Edit: You might also want to check out the server-level public role. Which is at Security > Server Roles > public




回答2:


Every database user belongs to the public database role.

When a user has not been granted or denied specific permissions on a securable object, the user inherits the permissions granted to public on that object.

The public server role is granted VIEW ANY DATABASE permission and the CONNECT permission on the default endpoints.

Actually, The public server role is not a fixed server role, because the permissions can be changed, but every user belongs to the public database role by default.

you can check this here : https://msdn.microsoft.com/en-us/library/ms188659.aspx



来源:https://stackoverflow.com/questions/410396/public-role-access-in-sql-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!