a. Export:
sqlplus:
1. conn system/pass@xe as sysdba
2. create directory dump as 'c:\dump';
3. grant read,write on directory dump to public;
cmd:
expdp system/pass@xe schemas=trunk dumpfile=trunk.dmp directory=dumplogfile=trunk.log;
b. Import:
sqlplus:
1. connsystem/pass@xe as sysdba
2. createdirectory dump as 'c:\dump';
3. grantread,write on directory dump to public;
4. createtemporary tablespace tem_space tempfile 'D:\dump\xe\tem_space.dbf' size50m autoextend on next 50m maxsize 20480m extent management local;
5. createtablespace sungard datafile 'c:\dump\xe\sungard.dbf' size 50M autoextend onnext 50M maxsize 20480M;
6. create user trunk identified by pass default tablespace sungard temporary tablespacetem_space;
7. grantconnect,resource,dba to trunk;
cmd:
impdpsystem/pass directory=dump dumpfile=nxg_it.dmp REMAP_SCHEMA=nxg_it:trunkfull=y;
ps: REMAP_SCHEMA = [dump文件对应的user]:[自己数据库新建的user], 同理 REMAP_TABLESPACE