导出库
expdp AABBCC/AABBCC directory=FILEOUTDIR dumpfile =20220424.dmp logfile=20220424.log;
导入库且替换用户名、表空间名、索引空间名
impdp DDEEFF/AABBCC@orcl directory=FILEOUTDIR dumpfile=20220424.dmp logfile=20220424.log remap_schema=AABBCC:DDEEFF remap_tablespace=AABBCC_SPACE:AABBCC_SPACE remap_tablespace=AABBCC_INDEX:DDEEFF_INDEX
链接数据库
sqlplus 用户名/密码@orcl as sysdba
创建表空间DDEEFF_SPACE
CREATE TABLESPACE DDEEFF_SPACE LOGGING DATAFILE '+data/AABBCCfile/DDEEFF_SPACE.DBF' SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
创建索引空间DDEEFF_INDEX
CREATE TABLESPACE DDEEFF_INDEX LOGGING DATAFILE '+data/AABBCCfile/DDEEFF_INDEX.DBF' SIZE 50M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
创建用户DDEEFF
create user DDEEFF identified by AABBCC default tablespace DDEEFF_SPACE quota unlimited on DDEEFF_SPACE quota unlimited on DDEEFF_INDEX;
授权DDEEFF用户权限
grant connect, resource, dba, create session, create synonym, create procedure, create trigger, create table, create sequence, create view, create type to DDEEFF;
|