oracle

 
 
-- 创建临时表空间
create temporary tablespace ocs_temp
tempfile 'E:apporacleocs_temp.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;
-- 创建数据表空间
create tablespace ocs_data
datafile 'E:apporacleocs_data.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;
-- 创建用户并指定表空间
create user ocs identified by ocs_2018
default tablespace ocs_data
temporary tablespace ocs_temp;  
-- 给用户授予权限
grant connect,resource,dba to ocs; 

 --导入导出

imp 用户名/密码@监听器路径/数据库实例名称 file='d:数据库文件.dmp' full=y ignore=y

例:imp ocs_old/ocs_old_2018@localhost/ORCL file='G:ocs_2018.dmp' full=y ignore=y


exp 用户名/密码@监听器路径/数据库实例名称  dumpfile=导出的文件名.dmp logfile=导出的日志名.log

例:exp ocs_old/ocs_old_2018@localhost/ORCL file='G:ocs_2018.dmp' full=y ignore=y
 
 
 
原文地址:https://www.cnblogs.com/liuq1991/p/10122871.html