Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sql Help granting roles /privileges to users
"Tyler Smith Watu" <watuni2000_at_yahoo.co.nz> wrote in message
news:2f3438a4.0402181102.41002215_at_posting.google.com...
| watuni2000_at_yahoo.co.nz (Tyler Smith Watu) wrote in message
news:<2f3438a4.0402180716.6ce6fe66_at_posting.google.com>...
| > unix hp oracle ver 8.1.7.4
| >
| > I am working on a script that I will use to recreate users
| >
| > The part that I need help on will be the script to grant user
privileges
| >
| > The output should be a file containing statements like this
| >
| >
| > grant connect to jpajim;
| > grant resource to jpajim;
| >
| >
| >
| >
| > Thanks for your time
| >
| > TY
|
| Thought there would be an easy way out which I did find
|
| select 'grant '||granted_role ||' to ' ||grantee||';'
| from dba_role_privs
| grantee in (select username from dba_users where username not
in('SYS','SYSTEM' ))
| ~
don't forget to process DBA_TAB_PRIVS