不完全恢复后打开数据库的注意事项
2017-05-02 10:46
435 查看
Incomplete Recovery 15.2.1.2 不完全恢复
Incomplete recovery, or point-in-time recovery, uses a backup to
produce a
noncurrent version of the database. In other words, you do not
apply all of the redo
records generated after the most recent backup. You usually perform
incomplete
recovery of the whole database in the following situations:
● Media failure destroys some or all of the online redo logs.
● A user error causes data loss, for example, a user inadvertently
drops a table.
● You cannot perform complete recovery because an archived redo log
is
missing.
● You lose your current control file and must use a backup control
file to open
the database.
不完全恢复(incomplete recovery),也被称为按时间点恢复(point-in-time
recovery),指没有将数据库恢复到当前时间点的恢复。换句话说,用户没有
将最近一次备份之后产生的所有重做日志应用到复原的数据库上。用户通常
在下列情况出现时对数据库进行不完全恢复:
● 介质故障(media failure)导致部分或全部联机重做日志(online redo
log)损坏。
● 用户操作失误(user error)导致数据丢失,例如,用户由于疏忽而移
除了表。
● 由于归档重做日志(archived redo log)丢失而无法进行完全恢复
(complete recovery)。
● 当前控制文件(control file)丢失,必须使用备份的控制文件打开
(open)数据库。
088 To perform incomplete media recovery, you must restore all
datafiles from backups
created prior to the time to which you want to recover and then
open the database
with the RESETLOGS option when recovery completes. The RESETLOGS
operation
creates a new incarnation of the database—in other words, a
database with a new
stream of log sequence numbers starting with log sequence 1.
执行不完全介质恢复(incomplete media recovery)时,用户需要使用指定恢复
时间点之前的备份复原(restore)数据文件,并在恢复(recovery)结束打开
(open)数据库时使用 RESETLOGS 选项。RESETLOGS 选项的含义是使当前
的数据库及重做日志有效,即令数据库使用一套新的日志序列号(从 1 开
始
Before using the OPEN RESETLOGS command to open the database in
read/write
mode after an incomplete recovery, it is a good idea to first open
the database in readonly
mode, and inspect the data to make sure that the database was
recovered to the
correct point. If the recovery was done to the wrong point, then it
is easier to re-run
the recovery if no OPEN RESETLOGS has been done. If you open the
database readonly
and discover that not enough recovery was done, then just run the
recovery again
to the desired time. If you discover that too much recovery was
done, then you must
restore the database again and re-run the recovery.
在完成了不完全恢复后,建议不要直接使用 OPEN RESETLOGS 命令以读/写
模式打开(open)数据库,而应先以只读模式打开数据库,并检查是否已将
数据库恢复到正确的时间点。如果恢复的时间点有误,在没有使用 OPEN
RESETLOGS 命令的情况下,重新执行恢复操作相对简单。如果恢复结果早于
指定的时间点,只需重新执行恢复操作。如果恢复结果超过了指定的时间
点,则应再次复原数据库并重新进行恢复。
相关文章推荐
- ARCHIVELOG模式下用户管理的完全恢复(3)——恢复打开的数据库,并且数据库最初是打开的!
- oracle用户管理的完全恢复4:在ARCHIVELOG 模式(恢复打开的数据库--数据库最初是关闭的)
- ARCHIVELOG模式下用户管理的完全恢复(2)——恢复打开的数据库,并且数据库最初是关闭的!
- oracle用户管理的完全恢复4:在ARCHIVELOG 模式(恢复打开的数据库)
- ARCHIVELOG模式下用户管理的完全恢复—恢复打开的数据库,并且数据库最初是打开的
- 数据库备份恢复注意事项
- SqlServer2008 数据库的恢复和还原 及注意事项
- C#Winform打开窗体的几种方法、注意事项的总结
- 提升数据库查询速度的几点注意事项
- VC++的MFC程序中操作数据库注意事项
- 使用hibernate时,数据库由MySQL转向使用其他数据库时的注意事项
- 数据库开发程序员在开发过程中的注意事项
- DB2 跨平台数据库迁移步骤和注意事项
- 使用Derby数据库的注意事项
- 数据库性能优化注意事项
- 数据库乱码解决,应注意事项 --struts+spring+hibernate环境下
- 磁盘阵列常见故障恢复注意事项
- 数据库ACCESS转SQL注意事项
- 注意数据库操作中打开的连接
- 数据库存储历史数据设计注意事项