Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Granting privileges.
Hello Mistery Man.
"Mistery Man" <lucky_me_at_nana.co.il> wrote in message
news:90iqrq$gvm$1_at_news.netvision.net.il...
> perform query
> select GRANTEE,GRANTED_ROLE from DBA_ROLE_PRIVS
> where GRANTEE = <USERNAME>;
>
> and grant new user the privs.
Not to be to picky but you forgot the privileges in "dba_tab_privs" for object privileges and "dba_col_privs" for column privileges.
One can write a simple sql script that creates the grant lines needed for the recreation of user privileges like:
select 'grant ' || privilege || ' on ' || table_name || ' to ' || <new_user>
|| ';' from dba_tab_privs where grantee=<user_name>'
union all
select 'grant ' || role_name || ' to ' || <new_user> || ';' from
dba_role_privs where grantee=<user_name>';
I omited the dba_col_privs since its very scarsely used and I dont recall the syntax :-)
Seasons greetings from Denmark
Jesper Wolf Jespersen Received on Thu Dec 07 2000 - 14:10:52 CST