Fw: Role, Grant script

Fw: Role, Grant script

 

  

Hi Kevin,

Here is a script I've used in the past to grant roles to users. Hope this
helps a bit. Haven't used it in awhile, so please check it out first.
Joan

REM
REM create sql statements to grant oracle roles to users
REM
set newpage 0
set space 0
set pagesize 0
set echo off
set feedback off
set heading off
accept SID char prompt 'Enter SID you are running this script on '
spool create_&&SID._all_role_privs.sql
select 'GRANT '||granted_role||' to
'||grantee||decode(admin_option,'YES',' with
admin option','NO',null)||';'
from dba_role_privs;
/
spool off
----- Forwarded by Joan Griffith/Staff/Guilford on 10/07/2004 10:24 AM
-----

"O Donnell Kevin (Contractor) "
<oracledba-ezmlmshield-x51307935.[Email address protected]
10/07/2004 10:13 AM

To
"LazyDBA Discussion" <[Email address protected]
cc

Subject
Role, Grant script






Hello DBA's
I am feeling a bit lazy this morning... Does anyone have a good script
that will generate the create role and grant statements? I need to
propagate
some roles and the grants to a production database...

Thanks

Kevin O'Donnell
Oracle Database Administrator
Information Delivery Systems


Oracle LazyDBA home page