611.To accomplish user-managed backup for the USERS tablespace, you issued the following command
to put the database in backup mode:
SQL> ALTER TABLESPACE users BEGIN BACKUP;
While copying the file to the backup destination a power outage caused the instance to te minate
abnormally.
Which statement is true about the next database startup and the USERS tablespace?
A. The database will open, and the tablespace automatically comes out of the backup mode.
B. The database will be mounted, and recovery must be performed on the USERS tablespace.
C. The database will be mounted, and data files in the USERS tablespace must be taken out of the backup mode.
D. The database will not be mounted, and you must restore all the data files for the USERS tablespace from the backup, and perform recovery.
Answer: C
答案解析:
参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osbackup.htm#BRADV90007
If the database indicates that the data files for multiple tablespaces require media recovery because you forgot to end the online backups for these tablespaces, then so long as the database is mounted, running the ALTER DATABASE END BACKUP statement takes all the data files out of backup mode simultaneously.
在数据表空间在备份模式时,实例被异常关闭,重新启动会报错,而数据库会在mount状态,必须执行ALTER DATABASE END BACKUP后表空间才能脱离备份模式,数据库才能open。
Specify BEGIN BACKUP to indicate that an open backup is to be performed on the data files that make up this tablespace. This clause does not prevent users from accessing the tablespace. You must use this clause before beginning an open backup.
Restrictions on Beginning Tablespace Backup Beginning tablespace backup is subject to the following restrictions:
-
You cannot specify this clause for a read-only tablespace or for a temporary locally managed tablespace.
-
While the backup is in progress, you cannot take the tablespace offline normally, shut down the instance, or begin another backup of the tablespace.
Ending a Backup After an Instance Failure or SHUTDOWN ABORT
The following situations can cause a tablespace backup to fail and be incomplete:
-
The backup completed, but you did not run the
ALTERTABLESPACE...ENDBACKUPstatement. -
An instance failure or
SHUTDOWNABORTinterrupted the backup.
Whenever recovery from a failure is required, if a data file is in backup mode when an attempt is made to open it, then the database does not open the data file until either a recovery command is issued, or the data file is taken out of backup mode.
For example, the database may display a message such as the following at startup:
ORA-01113: file 12 needs media recoveryORA-01110: data file 12: '/oracle/dbs/tbs_41.f'If the database indicates that the data files for multiple tablespaces require media recovery because you forgot to end the online backups for these tablespaces, then so long as the database is mounted, running the
ALTERDATABASEENDBACKUPstatement takes all the data files out of backup mode simultaneously.In high availability situations, and in situations when no database administrator (DBA) is monitoring the database, the requirement for user intervention is intolerable. Hence, you can write a failure recovery script that does the following:
-
Mounts the database
-
Runs the
ALTERDATABASEENDBACKUPstatement -
Runs
ALTERDATABASEOPEN, allowing the system to come up automatically
An automated crash recovery script containing
ALTERDATABASEENDBACKUPis especially useful in the following situations:-
All nodes in an Oracle Real Application Clusters (Oracle RAC) configuration fail.
-
One node fails in a cold failover cluster (that is, a cluster that is not an Oracle RAC configuration in which the secondary node must mount and recover the database when the first node fails).
Alternatively, you can take the following manual measures after the system fails with tablespaces in backup mode:
-
Recover the database and avoid issuing
ENDBACKUPstatements altogether. -
Mount the database, then run the
ALTERTABLESPACE...ENDBACKUPstatement for each tablespace still in backup mode.
-
本文讨论了在进行用户管理的数据表空间备份时遇到实例异常关闭的情况,并解释了如何正确处理这种情况以避免数据库启动时出现问题。文章重点介绍了在备份未正常结束时的多种恢复方法。
1309

被折叠的 条评论
为什么被折叠?



