您的位置:首页 > 数据库

不完全恢复后打开数据库的注意事项

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 命令的情况下,重新执行恢复操作相对简单。如果恢复结果早于

指定的时间点,只需重新执行恢复操作。如果恢复结果超过了指定的时间

点,则应再次复原数据库并重新进行恢复。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: