Oracle 11g数据库导入SQL语句

首先,将导出的.DMP文件放置于E:\app\Yulin\admin\ORCL\dpdump目录下

--创建表空间,路径:位于E:\app\Yulin\oradata\ORCL下

CREATE TABLESPACE NNC_DATA01 DATAFILE 'E:\app\hp\oradata\orcl\nnc_data01.dbf' SIZE 500M AUTOEXTEND ON NEXT 50M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K ;
CREATE TABLESPACE NNC_INDEX01 DATAFILE 'E:\app\hp\oradata\orcl\nnc_index01.dbf' SIZE 500M AUTOEXTEND ON NEXT 50M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K ;

--创建用户:  
create user NC65 identified by NC65 default tablespace users Temporary TABLESPACE Temp;
--授权
grant connect,resource,dba to NC65; 
--创建用户
CREATE USER NC63 IDENTIFIED BY NC63 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;

--授权
grant connect,resource,dba to NC65; 

--cmd命令下执行,导入语句
 impdp NC65/NC65@orcl DUMPFILE=NC65_18010401.DMP REMAP_SCHEMA=C##YJL1222:NC65;
 impdp NC63/NC63@orcl DUMPFILE=nc633_170630.DMP REMAP_SCHEMA=NC633:NC63;
--删除表空间
drop tablespace NNC_DATA01 including contents and datafiles cascade constraint;
drop tablespace NNC_INDEX01 including contents and datafiles cascade constraint;
--删除用户
drop user NC65 cascade;

你可能感兴趣的:(Oracle)