Oracle之备份还原

前端之家收集整理的这篇文章主要介绍了Oracle之备份还原前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

创建表分区

createtablespaceappsdatafile'&1\apps.dbf'size10mautoextendonnext8m;
createtablespaceappsysdatafile'&1\appsys.dbf'size10mautoextendonnext8m;

创建分区表空间

createtablespaceAPPS_00datafile'&1\APPS_00.dbf'size10Mautoextendonnext8M;
createtablespaceAPPSYS_00datafile'&1\APPSYS_00.dbf'size10Mautoextendonnext8M;

删除用户

dropuserappscascade;
dropuserappsyscascade;

创建用户

createuserappsidentifiedbycapedefaulttablespaceapps;
createuserappsysidentifiedbycapedefaulttablespaceappsys;

授权

grantdbatoappswithadminoption;
grantdbatoappsys;

grantcreateanytabletoapps;
grantalteranytabletoapps;
grantdropanytabletoapps;

grantcreateanyindextoapps;
grantdropanyindextoapps;

创建目录

createorreplacedirectoryexpdp_wms_diras'D:\data_bak\';
grantread,writeondirectoryexpdp_wms_dirtoAPPS;

EXP/IMP备份与还原

expuser/pwd@SIDfile=d:\db_20101010.dmplog=d:\db_20101010.logowner=(apps,appsys)

impuser/pwd@SIDfile=D:\db_20101010.dmplog=D:\db_20101010.logfromuser=appstouser=appsfromuser=appsystouser=appsysignore=y

EXPDP/IMPDP备份还原

expdpuser/pwd@SIDdumpfile=DB20141216.dmplogfile=DB20141216.logschemas=(apps,appsys)directory=expdp_dirjob_name=expdp_jobversion=11.1.0.2

impdpuser/pwd@SIDdumpfile=DB20141216.DMPlogfile=DB20141216.logschemas=(apps,appsys)directory=impdp_dirjob_name=impdp_job

猜你在找的Oracle相关文章