创建表分区
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原文链接:https://www.f2er.com/oracle/209111.html