时间:2021-07-01 10:21:17 帮助过:9人阅读
1、首先创建表空间
CREATE SMALLFILE
TABLESPACE "NNC_DATA01"
LOGGING
DATAFILE ‘D:\NCOracle\nc633sd\NNC_DATA01.ora‘ SIZE 500M AUTOEXTEND
ON NEXT 10M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO ;
CREATE SMALLFILE
TABLESPACE "NNC_DATA02"
LOGGING
DATAFILE ‘D:\NCOracle\nc633sd\NNC_DATA02.ora‘ SIZE 500M AUTOEXTEND
ON NEXT 10M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO ;
CREATE SMALLFILE
TABLESPACE "NNC_DATA03"
LOGGING
DATAFILE ‘D:\NCOracle\nc633sd\NNC_DATA03.ora‘ SIZE 500M AUTOEXTEND
ON NEXT 10M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO ;
CREATE SMALLFILE
TABLESPACE "NNC_INDEX01"
LOGGING
DATAFILE ‘D:\NCOracle\nc633sd\NNC_INDEX01.ora‘ SIZE 300M AUTOEXTEND
ON NEXT 10M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO ;
CREATE SMALLFILE
TABLESPACE "NNC_INDEX02"
LOGGING
DATAFILE ‘D:\NCOracle\nc633sd\NNC_INDEX02.ora‘ SIZE 300M AUTOEXTEND
ON NEXT 10M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO ;
CREATE SMALLFILE
TABLESPACE "NNC_INDEX03"
LOGGING
DATAFILE ‘D:\NCOracle\nc633sd\NNC_INDEX03.ora‘ SIZE 300M AUTOEXTEND
ON NEXT 10M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO ;
2、创建用户
用系统管理员账号登陆,执行语句
CREATE 用户名username IDENTIFIED BY 密码
赋予权限
grant dba to 用户名;
再执行数据泵还原目录语句
create or replace directory BACKUP
as ‘C:\app\admin\orcl\backup‘;
要先把数据库dmp文件放入此目录中
4、导入数据库
运行—CMD—>impdp nc633sd/nc633sd@orcl DUMPFILE=20161109.DMP remap_schema=NC633_20160415:nc633sd directory=backup
>impdp 登陆用户名/密码@orcl DUMPFILE=20161109.DMP remap_schema=导出数据库用户:导入数据用户 directory=backup
NC 创建表空间数据库
标签:导入数据库 创建 rac directory ogg oracle table man tab