Oracle数据泵导出导入(expdp/impdp)
一、创建表空间
create tablespace atp
logging
datafile 'D:\oracle\oradata\orcl\atp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
二、创建用户
-- Create the user
create user ATP
default tablespace ATP
temporary tablespace TEMP
profile DEFAULT
identified by atp;
-- Grant/Revoke role privileges
grant connect to ATP;
grant dba to ATP;
grant resource to ATP;
-- Grant/Revoke system privileges
grant create any view to ATP;
grant select any sequence to ATP;
grant select any table to ATP;
grant unlimited tablespace to ATP;
三、导出
1、创建逻辑目录,该命令不会在操作系统创建真正的目录,最好以system等管理员创建。
create directory expdp_dir as 'D:\home\Oracle\dump';