2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

31
vdh/get_granted_roles.sql Normal file
View File

@@ -0,0 +1,31 @@
-- give a tree view of the directly / indirectly granted roles
-- pass the grantee name (user or role) as first argument
set verify off
set pages 50000
set linesize 250
column role format a200 heading "Role"
select
lpad(' ', 2*level-1) || sys_connect_by_path(usr.name, '/') role
from
sys.sysauth$ sau,
sys.user$ usr
where
sau.privilege# = usr.user#
connect by
prior privilege# = grantee#
start with
grantee# =
( select
user#
from
sys.user$
where
name = '&1'
)
;
undef 1