欢迎来到天天文库
浏览记录
ID:21771025
大小:149.00 KB
页数:8页
时间:2018-10-24
《控制文件丢失的恢复》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、一般怡况下数据库的DBA都会对controlfile进行多路父用,这样可以保证控制文件的安全性,对F数掘库而宮只要数掘文件和redolog、archivelog不丢,数据都足可以恢J{的,以足controlfile丢失,会比较麻烦。环境:controlOl.ctl、control02.ctl、control03.ctl1、3个controlfilc中的-个或杏两个丢失,关闭数裾库后,从没有没丢失的那个controlfile进行拷W。2、3个控制文件全丢失,nJ■以进行重构控制文件,一般情况下我们会对投制文件进行二进制文件备份(alterdatabase
2、backupcontrolfiletotraceas’**林备份成二进制文件)(alterdatabasebackupcontrolfileto’*料’按备份校制文件)以下是备份出來的二进制文件的内容:有W种情况,1、完全恢S的时候川(红色)2、不>'£?全恢女的时候用(紫红)—ThefollowingarecurrentSystem-scopeREDOLogArchivalrelatedparametersandcanbeincludedinthedatabaseinitializationfilo.~LOG_ARCHIVE_DEST=’’—LOG_
3、AKCHIVE_DUPLEX_DKST=’’—LOGARCHIVEFOR.LT=%t^%s%r.dbf—DBUNIQUEJ4、e/oradata/orcl/arch,—LOGARCHIVEDEST1=OPTIONALRE0PEN=300NODELAY’--LOGARCHIVEDEST1=ARCHNOAPTIRMNOEXPEDITENOVERIEYSYNC’~LOG_ARCIIIVE_DEST_1=,REGISTERNOALTERXATENODEPENDENCY’—LOGARCHIVEDEST_1=’NOMAXJ'AlLURENOQUOTASIZENOQLOTAUSEDNODBJJNWUENAME’—LOGARCHIVEDEST1=VALIDFOR=(PRIMARYROLE,O5、NLINELOGFILES)’―LOG_ARCHIVE_DEST_STATE_1^ENABLE—BelowaretwosetsofSQLstatements,eachofwhichcreatesanew~controlfileandusesittoopenthedatabase.Thefirstsetopens——thedatabasewiththeNORESETLOGSoptionandshouldbeusedonlyifthecurrentversionsofallonlinelogsareavailable.Thesecond—setopenst6、hedatabasewiththeRESETLOGSoptionandshouldboused—ifonlinelogsareunavailable.Theappropriatesetofstatementscanbecopiedfromthetraceintoascriptfile,editedasnecessary,andexecutedwhenthereisa--needtore-createthecontrolfile.--Setftl.NORESETLOGScase—Thefollowingcommandswillcreateanewcont7、rolfileanduseit—toopenthedatabase.—DatausedbyRecoveryManagerwillbelost.—Additionallogsmayberequiredformediarecoveryofoffline—Usethisonlyifthecurrentversionsofallonlinelogsare—available.—Aftermountingthecreatedcontrolfile,thefollowingSQL--statementwillplacethedatabaseintheappropr8、iate—protectionmode:—ALTERDATABASESETSTANDBYDAT
4、e/oradata/orcl/arch,—LOGARCHIVEDEST1=OPTIONALRE0PEN=300NODELAY’--LOGARCHIVEDEST1=ARCHNOAPTIRMNOEXPEDITENOVERIEYSYNC’~LOG_ARCIIIVE_DEST_1=,REGISTERNOALTERXATENODEPENDENCY’—LOGARCHIVEDEST_1=’NOMAXJ'AlLURENOQUOTASIZENOQLOTAUSEDNODBJJNWUENAME’—LOGARCHIVEDEST1=VALIDFOR=(PRIMARYROLE,O
5、NLINELOGFILES)’―LOG_ARCHIVE_DEST_STATE_1^ENABLE—BelowaretwosetsofSQLstatements,eachofwhichcreatesanew~controlfileandusesittoopenthedatabase.Thefirstsetopens——thedatabasewiththeNORESETLOGSoptionandshouldbeusedonlyifthecurrentversionsofallonlinelogsareavailable.Thesecond—setopenst
6、hedatabasewiththeRESETLOGSoptionandshouldboused—ifonlinelogsareunavailable.Theappropriatesetofstatementscanbecopiedfromthetraceintoascriptfile,editedasnecessary,andexecutedwhenthereisa--needtore-createthecontrolfile.--Setftl.NORESETLOGScase—Thefollowingcommandswillcreateanewcont
7、rolfileanduseit—toopenthedatabase.—DatausedbyRecoveryManagerwillbelost.—Additionallogsmayberequiredformediarecoveryofoffline—Usethisonlyifthecurrentversionsofallonlinelogsare—available.—Aftermountingthecreatedcontrolfile,thefollowingSQL--statementwillplacethedatabaseintheappropr
8、iate—protectionmode:—ALTERDATABASESETSTANDBYDAT
此文档下载收益归作者所有