数据泵导出和导入步骤(全库):
1、SQL> Create directory dir as 'd:\test';
SQL> Grant read,write on directory dir to pmsdba;
Expdp pmsdba/asd147@orcl full=y directory=dir dumpfile=X.dmp logfile=X.log (全库导出)
2、在虚拟机上从新创建一个数据库。
创建表空间:create tablespace pmsdba datafile ‘c:\pmsdba.dbf’ size 5G
创建用户:create user pmsdba identified by asd147 default tablesapce pmsdba
授权:grant dba to pmsdba
3、在新建的数据库上:
Create directory dir as 'c:\test';
SQL> Grant read,write on directory dir to pmsdba;
把导出的数据复制到test目录下。
4、导入数据:
impdp pmsdba/asd147@orcl full=y directory=dir dumpfile=X.dmp logfile=X.log ignore=y