数据库恢复概述
❖ 故障是不可防止的 ❖ 计算机硬件故障 ❖ 系统软件和应用软件的错误 ❖ 操作员的失误 ❖ 恶意的破坏 ❖ 故障的影响 ❖ 运行事务非正常中断,但不会破坏数据库 ❖ 破坏数据库
数据库恢复概述〔续〕
❖ 数据库管理系统对故障的对策 保证故障发生后,能把数据库中的数据从错误状态恢复 到某种逻辑一致的状态 保证事务ACID DBMS提供恢复子系统
disasters such as fire or flooding.
❖ Failure during data transfer can still result in inconsistent copies: Block transfer can result in
Successful completion Partial failure: destination block has incorrect information Total failure: destination block was never updated
Used in hardware RAID systems
2. If either copy of an inconsistent block is detected to have an error (bad checksum), overwrite it by the other copy. If both have no error, but are different, overwrite the second block by the first block.
❖ 操作系统或DBMS代码错误 ❖ 操作员操作失误 ❖ 特定类型的硬件错误〔如CPU故障〕 ❖ 突然停电
系统故障的恢复