Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to dump users grants to .sql file

Re: How to dump users grants to .sql file

From: Lee Kyoung Rok <tunnel_at_hananet.net>
Date: Fri, 17 Dec 1999 00:51:58 +0900
Message-ID: <WV764.1102$jz5.36496@news.hananet.net>

Marc Cluet <mcluet_at_worldonline.es>ÀÌ(°¡) ¾Æ·¡ ¸Þ½ÃÁö¸¦ news:3858c3ec.9307713_at_news.worldonline.es¿¡ °Ô½ÃÇÏ¿´½À´Ï´Ù.
> Hi
>
> Someone knows how to dump all the grants I've given to a specific user
> as SQL commands to a .sql file so I can execute it on another server
> to give the same permissions to the same user?
> Thank you!
> Marc
>

Data dictionaries about privileges is like below

 USER_SYS_PRIVS
 USER_TAB_PRIVS
 USER_TAB_PRIVS_RECD
 USER_ROLE_PRIVS

sqlplus> spool tunnel
sqlplus> select 'grant '||privilege||' to '||user

        2> from USER_SYS_PRIVS;

sqlplus> spool off

Like above !!! Received on Thu Dec 16 1999 - 09:51:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US