创建表分区create tablespace apps datafile ‘&1\apps.dbf‘ size 10m autoextend on next 8m;
create tablespace appsys datafile ‘&1\appsys.dbf‘ size 10m autoextend on next 8m;
创建分区表空间create tablespace APPS_00 datafile ‘&1\APPS_00.dbf‘ size 10M autoextend on next 8M;
create tablespace APPSYS_00 datafile ‘&1\APPSYS_00.dbf‘ size 10M autoextend on next 8M;
删除用户drop user apps cascade;
drop user appsys cascade;
创建用户create user apps identified by cape default tablespace apps;
create user appsys identified by cape default tablespace appsys;
授权grant dba to apps with admin option;
grant dba to appsys;
grant create any table to apps;
grant alter any table to apps;
grant drop any table to apps;
grant create any index to apps;
grant drop any index to apps;
创建目录create or replace directory expdp_wms_dir as ‘D:\data_bak\‘;
grant read, write on directory expdp_wms_dir to APPS;
EXP/IMP备份与还原exp user/pwd@SID file=d:\db_20101010.dmp log=d:\db_20101010.log owner=(apps,appsys)
imp user/pwd@SID file=D:\db_20101010.dmp log=D:\db_20101010.log fromuser=apps touser=apps fromuser=appsys touser=appsys ignore=y
EXPDP/IMPDP备份还原expdp user/pwd@SID dumpfile=DB20141216.dmp logfile=DB20141216.log schemas=(apps,appsys) directory=expdp_dir job_name=expdp_job version=11.1.0.2
impdp user/pwd@SID dumpfile=DB20141216.DMP logfile=DB20141216.log schemas=(apps,appsys) directory=impdp_dir job_name=impdp_job
Oracle之备份还原
标签:oracle exp imp expdp impdp
本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉 本文系统来源:http://11046468.blog.51cto.com/11036468/1928675