sqlplus sys/123456 as sysdba
---创建表空间
---特别注意,有些dmp文件的表空间命名是固定的,不能随便改,切记,这是我3天踩的坑,一直导入失败。
CREATE TABLESPACE 表空间 DATAFILE 'H:\xxx\xxx\xxxx.DBF' SIZE 5G AUTOEXTEND ON NEXT 200M MAXSIZE 6G EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
CREATE TABLESPACE 表空间_INDEX DATAFILE 'H:\oracle\xxx\xxxxx.DBF' SIZE 5G AUTOEXTEND ON NEXT 200M MAXSIZE 20480M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
create user 用户名 identified by 口令 default tablespace smartflow;
步骤三:创建目录路径(进入oracle命令下)
模板:create directory 自定义命名 as 'dmp存放路径';
例子:create directory data_dir as 'H:\oracle';
grant resource,connect,dba to 用户名;
grant select any dictionary to 用户名;
步骤五:退出sql环境
exit
impdp 用户名/口令 directory=data_dir dumpfile=xxxxx.dmp logfile=smartflowpsfs_impdp06.log remap_schema=xxxx:xxxx table_exists_action=replace transform=segment_attributes:n