题目:
191.While working on a data problem, Curt, Bill, Ben, Mike, and Matt introduced a vast amount of
corrupted data into the database. Pablo has discovered this problem and he needs you to recover the
database to the point in time prior to the introduction of the corruption. The logical corruption was
introduced at 6:30 p.m. on September 6, 2008. Which of the following would be the correct commands to
use to restore the database to a point in time before the orruption?
A. restore database until time '06-SEP-2008 06:30:00'); recover database until time '06-SEP-2008
06:30:00'); alter database open;
B. restore database until time '06-SEP-2008 06:30:00'); recover database until time '06-SEP-2008
06:30:00'); alter database open resetlogs;
C. restore database until time '06-SEP-2008 18:29:55'); recover database until time '06-SEP-2008
18:29:55'); alter database open resetlogs;
D. restore database until time '06-SEP-2008 18:29:55'); alter database open resetlogs;
E. restore database until time '06-SEP-2008 18:29:55'); recover database; alter database open resetlogs;
参考答案 C
解析
题目意思是,逻辑坏块发生时间是sep 6,6:30PM。问那个命令会将数据库恢复到故障前。
使用 restore until 18:29:59 .recover until 18:29:59. 然后open restlogs。选择C 。
参考文档:
https://docs.oracle.com/cd/E11882_01/backup.112/e10642/osrecvry.htm#BRADV90035
Performing Time-Based or Change-Based Incomplete Recovery
This section describes how to specify an SCN or time for the end point of recovery. If your database is affected by seasonal time changes (for example, daylight savings time), then you may experience a problem if a time appears twice in the redo log and you want to recover to the second, or later time. To handle time changes, perform cancel-based or change-based recovery.
To perform change-based or time-based recovery:
-
Follows Step 1 through Step 8 in "Performing Closed Database Recovery".
-
Issue the
RECOVER
DATABASE
UNTIL
statement to begin recovery. If recovering to an SCN, then specify as a decimal number without quotation marks. For example, to recover through SCN 10034 issue:RECOVER DATABASE UNTIL CHANGE 10034;
If recovering to a time, then the time is always specified using the following format, delimited by single quotation marks:
'YYYY-MM-DD:HH24:MI:SS'
. The following statement recovers the database up to a specified time:RECOVER DATABASE UNTIL TIME '2000-12-31:12:47:30'
-
Apply the necessary redo log files to recover the restored data files. The database automatically terminates the recovery when it reaches the correct time, and returns a message indicating whether recovery is successful.
Note:
Unless recovery is automated, the database supplies the name fromLOG_ARCHIVE_DEST_1
and asks you to stop or proceed with after each log. If the control file is a backup, then after the archived logs are applied you must supply the names of the online logs. -
Follow Steps 4 and 5 in "Performing Cancel-Based Incomplete Recovery".
END
-- 2019-09-12 add
题目:
684. Your database is running in ARCHIVELOG mode. You have been taking backups of all the data files and control files regularly.
You are informed that some important tables in the BILLING tablespace have been dropped on February 28, 2007 at 10.30 AM and must be recovered.
You decide to perform an incomplete recovery using the following command:
SQL> RECOVER DATABASE UNTIL TIME ‘2007-02-28:10:15:00’;
Identify the files that must be restored to recover the missing tables successfully.
A.Restore the backup of all the data files.
B.Restore the backup of all the data files and the control file.
C.Restore the backup of only the data files that contain the dropped tables.
D.Restore the backup of all the data files belonging to the tablespace containing the dropped tables.
参考答案 D (有误,应该选择A )
解析
数据库运行在归档模式下。经常对数据文件和控制文件进行备份。发现表空间中重要的表被drop了。发现的时间是07年2月28 10:30。
recover 整个数据库到10:15 。问 识别必须恢复的文件,以成功地恢复丢失的表 ?
对整个库进行recover的话,要对整个库进行restore。 应该选择 A。
end