DBA对于这种工作会经常处理,如果只是简单导入导出,没有特殊的权限及角色就不用过多的处理,如果复制的用户还有其他权限或角色,就需要在创建新用户时提前授权了,
否则在导入会报一些没有权限的错误,导致处理时间的浪费,下面是这次的处理流程,谨记。
expdp insightdb/insight directory=DATA_PUMP_DIR schemas=INSIGHTDB dumpfile=INSIGHTDB_20190129.dump compression=all parallel=4;
impdp insight_pro/insight_pro directory=DATA_PUMP_DIR dumpfile=INSIGHTDB_20190129.dump parallel=4 remap_schema=INSIGHTDB:INSIGHT_PRO remap_tablespace=TBS_INSIGHT_DATA:TBS_INSIGHT_PRO
create tablespace tbs_insight_pro datafile '/oradata/tbs_insight_pro01.dbf' size 8G;
select * from dba_data_files;
/*drop user insight_pro cascade;
drop tablespace tbs_insight_pro including contents and datafiles;*/
create user insight_pro identified by insight_pro default tablespace tbs_insight_pro;
grant resource,connect to insight_pro;
grant read,write on directory DATA_PUMP_DIR to insight_pro;
grant CREATE VIEW to insight_pro;
grant CREATE DATABASE LINK to insight_pro;
grant UNLIMITED TABLESPACE to insight_pro;
grant CREATE SYNONYM to insight_pro;
grant SELECT ANY TABLE to insight_pro;
grant DEBUG CONNECT SESSION to insight_pro;
grant SELECT ANY DICTIONARY to insight_pro;
grant CREATE MATERIALIZED VIEW to insight_pro;
grant dba to insight_pro ;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/69908786/viewspace-2565127/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/69908786/viewspace-2565127/