Oracle导出导入表空间创建
时间:2021-07-01 10:21:17
帮助过:2人阅读
备份数据库前的sqlplus命令创建数据库dmp存入目录
sqlplus /
nolog
conn /
as sysdba
SQL> create or replace directory expdir
as ‘E:/Kxdb‘;
目录已创建。
cmd:
// 导出数据库
expdp EMMS/EMMS123 directory=expdir dumpfile=EMMS2.dmp logfile=
EMMS2.log
// 导入dmp
impdp EMMS/EMMS123 directory=expdir dumpfile=
EMMS2.dmp
//卸载
E:\app\Administrator\product\
11.2.
0\dbhome_1\deinstall\deinstall
//数据库
1. EMMS EMMS123
1:创建临时表空间
create temporary tablespace EMMS_TEMP
tempfile ‘C:\app\administrator\oradata\orcl\EMMS_TEMP.dbf‘
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
2:创建数据表空间
create tablespace EMMS
logging
datafile ‘C:\app\administrator\oradata\orcl\EMMS_DATA.dbf‘
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
第3步:创建用户并指定表空间
create user EMMS dentified by EMMS123
default tablespace EMMS
temporary tablespace EMMS_TEMP;
第4步:给用户授予权限
grant connect,resource,dba to EMMS;
Oracle导出导入表空间创建
标签: