版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Oralcle数据库备份恢复运维实践第一章备份恢复介绍第二章rman备份恢复数据泵的应用第三章目 录第一章:什么是备份 备份的相关术语 备份的概念备份的重要性第二章备份的手段RMAN介绍RMAN的使用RMAN的应用场景第三章 数据泵介绍 数据泵的使用数据泵相关参数介绍目标通过这门课,掌握如下知识:掌握基本的备份恢复概念熟悉简单的RMAN备份命令熟悉数据泵的应用第一章 : 备份恢复介绍归档模式 和非归档01一致备份 或者非一 致备份03冷备份热 备份04物理备份 和逻辑备 份05完整或者 部分数据 库备份02重要的备份术语Cold Backup(冷备份)主要指在关闭数据库的状态下 进行的数据库完
2、全备份,备份内容包括所有数据 文件、控制文件、联机日志文件、ini文件。Hot Backup(热备份) 指在数据库处于运行状态下, 对数据文件和控制文件进行备份,要使用热备份 必须将数据库运行在(Archive Log)归档方式下。Export(逻辑备份) 是利用SQL语言从数据库中抽取 数据并存于二进制文件的过程。归档和非归档ObjectivesAfter completing this you should be able to do the following:Describe the basics of database backup, restore and recovery.Lis
3、t the types of failure that may occur in an Oracle Database.Identify the importance of checkpoints, redo log files, and archived log files.Configure ARCHIVELOG mode.Backup and Recovery IssuesThe administrators duty is to:Protect the database from failure wherever possible.Increase the Mean-Time-Betw
4、een-Failures (MTBF). Decrease the Mean-Time-To-Recover (MTTR).Minimize the loss of data.Categories of FailuresFailures can generally be divided into the following categories:User ErrorsMedia Failurethe otherUser ErrorsTypical CausesPossible SolutionsDelete * from table where ;Flashback query:select
5、* from emp as of timestamp to_timestamp(2008- 09-02 08:00:00,YYYY-MM-DDHH:MI:SS) where last_name=TROY;Drop table flashback table cube_scope to before drop rename to cube_scope_oldMedia FailureTypical CausesPossible SolutionsFailure of disk drive1.Restore the affected file from backup.2.If necessary,
6、 inform the database of a new file location.Failure of disk controller3.If necessary, recover the file by applying redo information.Deletion or corruption of database filethe other reasonTypical CausesPossible SolutionsPower outageRestart the instance using the “startup” command. Recovery from insta
7、nce failure is automatic including rolling forward changes in the redo logs and then rolling back any uncommitted transactions.Investigate causes of failure using the alert log, trace files, and Enterprise Manager.(remote disaster recoveryHardware failureFailure of one of the background processes;OR
8、A-600Adventure disasters;Instance RecoveryInstance or crash recovery:Is caused by attempts to open a database whose files were not synchronized on shutdownIs automaticUses information stored in redo log groups to synchronize filesInvolves two distinct operationsRolling forward: Data files are restor
9、ed to their state before the instance failed.Rolling back: Changes made but not committed are returned to their original state.Data files out- of-syncRoll forward (redo)Committed and non-committed data in filesRoll back (undo)Committed data in filesDatabaseSGAInstanceBa1c4k6g.r5ound ProcessesData Fi
10、leSCN: 99Data FileSCN: 129Data FileSCN: 140Control FileSCN: 143Control FileSCN: 143Redo Log GroupSCN 74-101Redo Log GroupSCN 102-143Phases of Instance RecoveryTuning Instance RecoveryDuring instance recovery the transactions between the checkpoint position and end of redo log must be applied to the
11、data files.Tune instance recovery by controlling thedifferencebetweenthecheckpointpositionandend of redolog.End of redo logTransactionsCheckpoint positionInstance recoveryConfiguring for RecoverabilityTo configure your database for maximum recoverability:Schedule regular backups Multiplex control fi
12、les Multiplex redo log groupsRetain archived copies of redo logsControl FilesProtect against database failure by multiplexing control files.At least two copies (Oracle suggests three)Each copy on a separate diskAt least one copy on a separate disk controllerControl FilesRedo Log FilesMultiplexing re
13、do log groups to protect against media failure and loss of data.At least two members (files) per group Each member on a separate disk driveEach member on a separate disk controller Redo logs heavily influence performanceGroup 1Group 2Group 3Member 1Member 2Member 1Member 2Member 1Member 2Disk 1Disk
14、2Archived Log FilesTo preserve redo information, create archived copies of redo log files.Specify archived log file naming convention. Specify one or more locations to archive logs to. Switch the database to ARCHIVELOG mode.Online Redo Log FilesArchived log filesARCHIVELOG Mode调整归档模式 shutdown immedi
15、ate; startup mount;alter database archivelog; alter database open; archive log list;修改归档路径alter system set log_archive_dest_1=location=/app/oracle/data;%t_%s_%r.dbf%t: 重做线程编号. %s: 日志序列号: %r归档名称 log_archive_formatRESETLOGS的ID值SummaryIn this lesson you should have learned how to:Describe the basics of
16、 database backup, restore and recovery List the types of failure that may occur in an Oracle Database Identify the importance of checkpoints, redo log files, andarchived log filesConfigure ARCHIVELOG modeDescribe ways to tune instance recovery第二章 RMAN备份ObjectivesAfter completing this lesson you shou
17、ld be able to do the following:Create consistent database backupsBack up your database without shutting it downAutomate database backupsRMAN界面备份全库 /表空间/数据文件/控制文件/spfile backup database;backup tablespace ; backup datafile #; backup controfile; backup spfile ;rman常用的语法介绍:log /home/oracle/backfull-date
18、 +%Y%m%d-%H%M.logoraclebys001 $ cat fullback.sh #!/bin/shsource /home/oracle/.bash_profile/u01/app/oracle/product/11.2.0/dbhome_1/bin/rman select * from dba_datapump_jobsexpdp / as sysdba attach=查询到的JOB_NAME impdp / as sysdba attach=查询到的JOB_NAME 交互模式下常见命令:stop_job start_job status kill停止,停止后可以再启动。 启动查看状态kill,kill后无法再启动。如何查看导出导入的进度 v$session_lomgopstotalwork:显示作业的总估算量(MB)为单位 sofar:显示作业中迄今为止移动的字节 opname:作业的名字TIME_REMAINING:还需要的时间(预估)# 全库逻辑导出 删除两天
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 市政声屏障清洁及构件更换方案
- 2026上半年中学教师资格证考试《语文学科知识与教学能力》真题卷及答案
- 船舶压载水处理系统运维规程
- 雕刻机安全操作规程
- Oracle高频面试题及详细答案(实战版)
- OCA认证考试真题及详细答案解析
- 地铁盾构隧道病害整治方案
- 添加剂留样管理员操作规程
- 仓管员入职试题及答案
- 双盲应急演练实施方案
- 死囚漫步五步陷阱课件
- 防雷安全隐患排查治理制度
- 2025届吉林省吉林市高三下学期10月一模考试-化学试题(含答案)
- 2025年国家基本公共卫生服务项目培训试题(附答案)
- 2025至2030年中国聚甲醛(POM)板材市场现状分析及前景预测报告
- 《电工(五级)理论知识考核要素细目表》
- 临床试验医学经理核心能力体系
- 锚定效应在认知心理学中的研究-全面剖析
- 仓库三级安全教育培训
- 统编小学语文四年级上册第四单元整体作业设计
- 2025年贵州茅台酒股份限公司和义兴酒业分公司维修工招聘10人高频重点提升(共500题)附带答案详解
评论
0/150
提交评论