1.创建表空间
CREATE TABLESPACE a8v6space2 DATAFILE 'c:\oadata\oa_data.dbf' SIZE 500M AUTOEXTEND ON NEXT 100M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 512K;
//表空间名:a8v6space2
2.创建用户并授权表空间
CREATE USER daa8v6 IDENTIFIED BY daa8v6 DEFAULT TABLESPACE a8v6space2 TEMPORARY TABLESPACE temp;
//daa8v6 用户名 daa8v6 密码
3.授权daa8v6权限
GRANT connect,dba to daa8v6;
create directory DUMPDIR as 'E:\rdata';
grant create any directory to daa8v6;
grant read,write on directory DUMPDIR to daa8v6;
grant create session to daa8v6;
grant create table to daa8v6;
4.导出数据库
expdp daa8v6/daa8v6 directory=DUMPDIR logfile=daa8v6_20180405.log dumpfile=daa8v6_20180405.dmp;
5.导入数据库
impdp daa8v6/daa8v6 directory=DUMPDIR dumpfile=daa8v6_20180409.dmp;
重要记住:导出和导入时候,表空间,用户名,密码都要对应一样