data pump expdp/impdp丢失权限角色 grant role的问题

对于使用data pump的 数据迁移,expdp/impdp可能存在丢失权限角色 grant role的问题

对于此类问题 , 可以考虑使用 下面的expdp/impdp脚本仅仅导出希望导出的用户的权限和相关角色

 

JOB_NAME=EXPDP_USERS
DIRECTORY=DTPUMP
FULL=Y
DUMPFILE=users_privs.dmp
LOGFILE=users_expdp.log
INCLUDE=SCHEMA:”IN (SELECT USERNAME FROM dba_users where default_tablespace NOT in(‘SYSAUX’,’SYSTEM’))”,ROLE,USER,SYSTEM_GRANT,ROLE_GRANT,DEFAULT_ROLE,TABLESPACE_QUOTA

impdp file should look like this:

JOB_NAME=IMPDP_USERS
DIRECTORY=DTPUMP
DUMPFILE=users_privs.dmp
LOGFILE=users_impdp.log
EXCLUDE=TABLE


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *