This content has been marked as final. Show 4 replies
The requiremenet is:
I have created the new database and have taken the export of all scemas from the source DB. I also created the the all schema in target DB as per source.
but while importing lot of grant and role could not assigned and not beenm created.
So wanted to generate the grants script from the source DB and can apply to target DB in one short.
so you can generate grants script using dynamic sql like
select 'grant '||privilege||'to <user>;' from dba_sys_privs where grantee='name'; etc
you can proceed the same way for dba_tab_privs and dba_role_privs also
otherwise, while import you can use show=y which generates DDL n DML statements in a log file, from where you can copy and paste those grant commands at SQL prompt