November 16, 2004 at 7:57 am
The Public Role captures default database permissions. How can I determine what are those default database permissions?
Thanks in advance, Kevin
November 16, 2004 at 9:51 am
Select the public role, right click, properties, then permissions button.
November 16, 2004 at 9:56 am
select object_name(id),case action when 26 then 'REFERENCES'
when 178 then 'CREATE FUNCTION'
when 193 then 'SELECT'
when 195 then 'INSERT'
when 196 then 'DELETE'
when 197 then 'UPDATE'
when 198 then 'CREATE TABLE'
when 203 then 'CREATE DATABASE'
when 207 then 'CREATE VIEW'
when 222 then 'CREATE PROCEDURE'
when 224 then 'EXECUTE'
when 228 then 'BACKUP DATABASE'
when 233 then 'CREATE DEFAULT'
when 235 then 'BACKUP LOG'
when 236 then 'CREATE RULE'
end as permission , case protecttype when 204 then 'Grant_w_Grant'
when 205 then 'Grant'
when 206 then 'Revoke'
end as type
from sysprotects a join sysusers b on a.uid = b.uid and b.name = 'public'
The above should give you all the permissions for public.
November 17, 2004 at 3:54 am
exec dbo.sp_helprotect null,'public'
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply