节点文献

达梦数据库备份与恢复子系统的设计与实现

The Design and Implementation of Backup and Recovery Subsystem in DaMeng Database

【作者】 何儒汉

【导师】 冯玉才;

【作者基本信息】 华中科技大学 , 计算机软件与理论, 2004, 硕士

【摘要】 数据库管理系统可能会因一些不可预知的软硬件故障影响事务的正确执行甚至破坏数据库,降低它的可靠性和可用性。数据库系统的备份与恢复部分正是要解决这些问题。本课题以“达梦数据库管理系统DM4”背景,系统而深入地研究了数据库的备份与恢复技术,并设计了一个备份与恢复子系统,以解决三类典型数据库故障即事务故障、系统故障和介质故障。本课题设计的子系统具有多种备份方式,采用了基于重做(REDO)日志、回滚段、操作一致性检查点的恢复技术。REDO日志记录了事务的修改信息,回滚段记录了事务修改前的信息,这为故障后的恢复提供了足够信息。操作一致性检查点定期把缓冲区中的脏页刷新到数据库和日志文件,为系统恢复提供了最近恢复点,缩短了系统恢复的时间。当事务故障发生后,利用回滚段中的撤销(UNDO)日志记录进行回滚来取消未提交事务的修改,以保证事务的原子性,实现事务恢复。当系统故障发生后,从REDO日志文件中最近的一个检查点记录开始,利用REDO日志进行重复历史的重做操作,将数据库恢复到故障发生前的状态,再利用回滚段的UNDO日志记录进行回滚,取消故障发生时的未提交事务的修改,从而保证了事务的原子性和永久性以及数据库状态的一致性,实现系统恢复。当发生介质故障时,利用数据库的后备副本将数据库还原到备份时的状态,以此为恢复点,再利用系统恢复技术进行恢复,从而实现介质恢复。设计的子系统通过备份获得后备副本,提供了脱机备份和联机备份、增量备份和完全备份等多种备份方式。对于联机备份,采用多线程技术进行了进一步改进,减少了备份时间,提高了备份效率。

【Abstract】 Some unexpected hardware or software failure may influence the correct running of transaction of DBMS,even destory the database,which will descrease the reliability and availability of DBMS。The part of backup and recovery in DBMS is to solve these problems。We have a deep research on backup and recovery teniques in the context of DM4,and design a backup and recovery subsystem to cope with the three classical database failures,which include transaction failure,system failure and media failure。The backup and recovery subsystem in DM4 has multiple backup modes and recovery tecnique based on REDO log,rollback segment and action consistent checkpoint。The REDO log records the modified data of transaction and the UNDO log in the rollback segment records the previous data,which collect enough information for the recovery。The periodic action consistent checkpoint flushs the dirty pages in buffer into databases and log files,which provides the latest recovery point and decreases the recovery time。When the transaction failure occurs,we rollback the UNDO log records in the rollback segment to undo the uncommitted transactions,which keeps the atomicity of the transaction and implements the transaction recovery。When system failure occurs,we use the REDO log records to "repeat the history” from the latest checkpoint record in REDO log files,then undo the uncommitted transaction by rolling back the UNDO log records in the rollback segment,which insures the atomicity and durability of the transactions and the consistency of databases,and implements the system recovery。When media failure occurs,we restore the database to a backup state by the copy of backup,then recovery the database by the system recovery <WP=5>tenique,which solves the media failure and implements media recovery。The copy of backup is acquired by the backup procedure,and we provide multiple backup modes such as offline backup、online backup、full backup and incremental backup。We adopts the multiple-thread tenique to decrease the time of online backup and better the effiency。

【关键词】 数据库恢复备份日志回滚段检查点
【Key words】 DatabaseRecoveryBackupLogRollback SegmentCheckpoint
  • 【分类号】TP311.13
  • 【被引频次】4
  • 【下载频次】335
节点文献中: