database & table privileges in Netezza database:
select GROUPNAME,
OBJECTNAME,
DATABASENAME,
OBJECTTYPE,
case when GOPOBJPRIV = 0 then 'None'
when GOPOBJPRIV = 1 then 'List'
when GOPOBJPRIV = 2 then 'Select'
when GOPOBJPRIV = 3 then 'List, Select'
else GOPOBJPRIV||' Undefined'
end privileges
from _v_group_priv
where GOPOBJPRIV <= 3
and DATABASENAME NOT in ('SYSTEM')
and OBJECTTYPE in ('TABLE','VIEW')
order by DATABASENAME;
users associated with group in Netezza database
select groupname, username from _V_GROUPUSERS where groupname <> 'PUBLIC'
order by groupname, username;
user Read write Privilges on database
select USERNAME,
OBJECTNAME,
DATABASENAME,
OBJECTTYPE,
case when UOPOBJPRIV = 0 then 'None'
when UOPOBJPRIV = 1 then 'List'
when UOPOBJPRIV = 2 then 'Select'
when UOPOBJPRIV = 3 then 'List, Select'
else UOPOBJPRIV||' Undefined'
end privileges
from _v_user_priv
where UOPOBJPRIV <= 3
and DATABASENAME not in ('SYSTEM')
and OBJECTTYPE in ('TABLE','VIEW')
order by DATABASENAME;
select GROUPNAME,
OBJECTNAME,
DATABASENAME,
OBJECTTYPE,
case when GOPOBJPRIV = 0 then 'None'
when GOPOBJPRIV = 1 then 'List'
when GOPOBJPRIV = 2 then 'Select'
when GOPOBJPRIV = 3 then 'List, Select'
else GOPOBJPRIV||' Undefined'
end privileges
from _v_group_priv
where GOPOBJPRIV <= 3
and DATABASENAME NOT in ('SYSTEM')
and OBJECTTYPE in ('TABLE','VIEW')
order by DATABASENAME;
users associated with group in Netezza database
select groupname, username from _V_GROUPUSERS where groupname <> 'PUBLIC'
order by groupname, username;
user Read write Privilges on database
select USERNAME,
OBJECTNAME,
DATABASENAME,
OBJECTTYPE,
case when UOPOBJPRIV = 0 then 'None'
when UOPOBJPRIV = 1 then 'List'
when UOPOBJPRIV = 2 then 'Select'
when UOPOBJPRIV = 3 then 'List, Select'
else UOPOBJPRIV||' Undefined'
end privileges
from _v_user_priv
where UOPOBJPRIV <= 3
and DATABASENAME not in ('SYSTEM')
and OBJECTTYPE in ('TABLE','VIEW')
order by DATABASENAME;
No comments:
Post a Comment