已阅读5页,还剩41页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
User-Managed Complete Recovery,Objectives,After completing this lesson, you should be able to do the following: Describe media recovery Perform recovery in Noarchivelog mode Perform complete recovery in Archivelog mode Restore datafiles to different locations Relocate and recover a tablespace by using archived redo log files Describe read-only tablespace recovery,Media Recovery,Used to recover a lost or damaged current datafile or control file Requires explicit invocation Operates as follows: Files are restored from backups Redo data is applied to the restored files from archived redo log files and online redo logs,Online Redo log,Recovery Steps,Restored datafiles,Database containing committed and uncommitted transactions,Recovered database,Redo applied,Undo applied,5,4,3,2,1,Archived Redo log,Restoration and Datafile Media Recovery with User-Managed Procedures,Restore files using operating system commands Recover files using the SQL*Plus RECOVER command,Archivelog and Noarchivelog Modes,Instance,SGA,Redo log buffer,Data buffer,Large pool,Locks,Shared pool,Data dict. cache,Shared SQL and PL/SQL,ARCn,User process,Server process,PGA,User process,Server process,PGA,Database,Parameter file,Password file,Recovery in Noarchivelog Mode,In Noarchivelog mode, you must restore the following database files: Datafiles Control files You may also restore the following files: Redo log files Password file Parameter file,Recovery in Noarchivelog Mode,Advantages Easy to perform, with low risk of error Recovery time is the time it takes to restore all files. Disadvantages Data is lost and must be reapplied manually. The entire database is restored to the point of the last whole closed backup.,Password File,Parameter File,Password File,Parameter File,Datafile 3,Redo log File 2,Data File 2,Control Files,Redo log File 1,Datafile 1,Database,145,146,146,146,146,146,Recovery in Noarchivelog Mode With Redo Log File Backups,Backup,Restore from the most recent backup,Database,Password File,Parameter File,Recovery in Noarchivelog Mode Without Redo Log File Backups,1. Shut down the instance. 2. Restore the datafiles and the control file from the most recent whole database backup. 3. Perform cancel-based recovery. 4. Open the database with the RESETLOGS option.,Recovery in Archivelog Mode,Complete Recovery Uses redo data or incremental backups Updates the database to the most current point in time Applies all redo changes Incomplete Recovery Uses backup and redo logs to produce a noncurrent version of the database,Complete Recovery,Make sure that datafiles for restore are offline. Restore only lost or damaged datafiles. Do not restore the control files, redo log files, password files, or parameter files. Recover the datafiles.,Complete Recovery in Archivelog Mode,Advantages Only need to restore lost files Recovers all data to the time of failure Recovery time is the time it takes to restore lost files and apply all archived log files Disadvantages Must have all archived log files since the backup from which you are restoring,Determining Which Files Need Recovery,View V$RECOVER_FILE to determine which datafiles need recovery View V$ARCHIVED_LOG for a list of all archived redo log files for the database View V$RECOVERY_LOG for a list of all archived redo log files required for recovery,User-Managed Recovery Procedures: RECOVER Command,SQL RECOVER DATABASE; OR SQL RECOVER DATAFILE 2 /ORADATA/u03/users01.dbf;,Recover a mounted database:,SQL RECOVER TABLESPACE users; OR SQL RECOVER DATAFILE 3;,Recover an open database:,Using Archived Redo Log Files During Recovery,To change archive location, use the ALTER SYSTEM ARCHIVE LOG. . . command. To apply redo log files automatically: Issue the SET AUTORECOVERY ON command before starting media recovery Enter auto when prompted for an archived log file Use the RECOVER AUTOMATIC. . . command.,Restoring Datafiles to a New Location with User-Managed Procedures,Use operating system commands to restore the datafile to the new location. Use the ALTER DATABASE RENAME FILE command to record the change in the control file.,Complete Recovery Methods,Closed database recovery for: System datafiles Undo segment datafiles Whole database Open database recovery, with database initially opened (for file loss) Open database recovery with database initially closed (for hardware failure) Datafile recovery with no datafile backup,Complete Recovery of a Closed Database,Closed database recovery is used for: System tablespace datafiles Rollback segment datafiles Whole database,Shut down the instance,1,Datafile 3,Redo log file 2,Datafile 2,Control files,Redo log file 1,Datafile 1,Closed Database,Archived log file,144,Closed Database Recovery Example,Restore datafile 1 (Log Sequence 144),2,Open the database,4,Datafile 3,Redo log file 2,Datafile 2,Control files,Redo log file 1,Datafile 1,Mounted Database,3,Datafile 3,Redo log file 2,Control files,Redo log file 1,Datafile 1,Recovered Database,146,145,146,146,146,Datafile 2,146,3,3,Open Database Recovery When the Database Is Initially Open,Use this method when: The database is currently open The database will remain open during the recovery The media failure does not affect the SYSTEM tablespace,1,Datafile 3,Redo log file 2,Datafile 2,Control files,Redo log file 1,Datafile 1,Open Database Recovery Example,2,4,Datafile 3,Redo log file 2,Datafile 2,Control files,Redo log file 1,Datafile 1,146,145,146,144,146,146,3,3,3,Datafile 3,Redo log file 2,Control files,Redo log file 1,Datafile 1,146,145,146,146,146,Datafile 2,146,Take datafile 2 offline,Restore datafile 2 (Log Sequence 144),Bring datafile 2 online,Archived log file,144,Open Database,Open Database,Recovered Database,Open Database Recovery When the Database Is Initially Closed,Use this method when: The database is currently closed The database will be opened during recovery The media failure does not affect the SYSTEM tablespace,Take datafile 2 offline,2,Open Database Recovery Example,Restore datafile 2,4,Bring datafile 2 online,6,1,Mount the database,3,Open the database,Datafile 3,Redo log file 2,Datafile 2,Control files,Redo log file 1,Datafile 1,Datafile 3,Redo log file 2,Control files,Redo log file 1,Datafile 1,146,145,146,146,146,Datafile 2,146,Closed Database,Recovered Database,Datafile 3,Redo log file 2,Datafile 2,Control files,Redo log file 1,Datafile 1,146,145,146,144,146,146,5,5,5,Archived log file,144,Open Database,Recovery of a Datafile Without a Backup,Datafile is lost that was never backed up Cannot be used when it is a file from the SYSTEM tablespace,Datafile 3,Redo log file 2,Datafile 2,Control files,Redo log file 1,Datafile 1,146,145,146,146,146,146,Open Database,Datafile 3,Redo log file 2,Datafile 2,Control files,Redo log file 1,Datafile 1,146,145,146,144,146,146,Archived log file,144,Open Database,Recovery Without a Backup Example,Bring the datafile or tablespace online,4,1,Take the datafile or tablespace offline,2,Re-create the datafile,Datafile 4,3,3,3,Datafile 4,146,Datafile 3,Redo log file 2,Datafile 2,Control files,Redo log file 1,Datafile 1,146,145,146,146,146,146,Recovered Database,Datafile 4,146,Read-Only Tablespace Recovery,Backup 2,Recovery,Case 1,Case 2,Case 3,Backup 1,Read-Only,Read-Write,Read-Only,Read-Only,Read-Write,Read-Only Tablespace Recovery Issues,Special considerations must be taken for read-only tablespaces when: Re-creating a control file Renaming data files Using a backup control file,Loss of Control Files,You may need to create control files if: All control
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026乳制品行业上游原奶供应下游渠道营销投资未来前景分析评估规划报告
- 2026中国丝绸文物残损修复技术实验分色描绘工艺规范
- 2026中国生物制药CDMO行业增长动力与竞争格局报告
- 2026人工智能算法应用效果与市场需求评估规划分析报告
- 2026中国玩具用毛绒材料行业市场现状供需分析及投资评估规划分析研究报告
- 欧盟文化例外原则在数字服务贸易中的适用边界与合规路径-基于《视听媒体服务指令》与流媒体平台声明的文本分析
- 2026中国智能线上线下行业市场现状供需分析及投资评估规划分析研究报告
- 宫颈癌共识会议总结2026
- 2026中国制药行业市场竞争现状与行业发展趋势展望分析报告
- 2026生物制药生产工艺现状竞争需求供应评估技术投分析研究报告
- 内蒙古森工集团笔试内容题目及答案解析
- 2026芯片设计标杆企业组织效能报告
- 2026年新疆医科大学第四附属医院(新疆维吾尔自治区中医医院)招聘编制外工作人员(125人)笔试备考题库及答案详解
- 2026-2030智能语音行业市场深度调研及发展趋势与投资前景研究报告
- 2026年全国保密教育线上培训考试题库(含标准答案)
- 检修班组长安全职责与管理能力提升培训
- (正式版)T∕CSNAME 195-2025 船舶修理企业危险作业安全监测要求
- GB/T 47551-2026塑料有害物质限量要求多溴联苯和多溴二苯醚
- 南京社区工作者考试题库答案
- 2025年融资担保公司《担保业务知识》真题及答案解析
- 2025年铁路桥隧工(技师)职业技能鉴定考试题库(含答案)
评论
0/150
提交评论