一、表空间建立:
create tablespace nnc_data01 datafile 'D:data nc_data01.dbf' size 1024M autoextend on next 100M extent management local uniform size 256K;
create tablespace nnc_data02 datafile 'D:data nc_data02.dbf' size 1024M autoextend on next 100M extent management local uniform size 256K;
create tablespace nnc_data03 datafile 'D:data nc_data03.dbf' size 1024M autoextend on next 100M extent management local uniform size 256K;
索引:
create tablespace nnc_index01 datafile 'D:data
nc_index01.dbf' size 1024M autoextend on next 100M extent management local uniform size 128K;
create tablespace nnc_index02 datafile 'D:data nc_index02.dbf' size 1024M autoextend on next 100M extent management local uniform size 128K;
create tablespace nnc_index03 datafile 'D:data nc_index03.dbf' size 1024M autoextend on next 100M extent management local uniform size 128K;
二、--创建用户信息
CREATE USER NC633 IDENTIFIED BY "123" DEFAULT TABLESPACE NNC_DATA01;
--对用户进行授权
GRANT DBA,RESOURCE,CONNECT TO NC633;
三、导入数据库
imp NC633/123@orcl file=C:MCCmcctest1_2018-04-29MCCTEST1_2018-04-29.DMP full=y
impdp NC63/123@orcl dumpfile=MCCTEST1_2018-04-29.DMP
impdp MCC/123@ORCL directory=exp dumpfile=MCCTEST_2018-04-25.DMP logfile=mcctest_2018-04-25.log schemas=leftfist table_exists_action=replace
假设将dmp放到/data目录下,
首先在数据库中创建directory目录
SQL> create directory exp as '/data/'
在操作系统命令执行导入命令。
impdp system/***** directory=exp dumpfile=scott.dmp logfile=imp.log
高版本导出导入低版本,导出时一定加版本号(要导入oracle的版本号)