ORACLE 复制环境到另外一个环境

来源:这里教程网 时间:2026-03-03 12:55:09 作者:

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 ;

相关推荐