Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Oracle Database 11g.pdf
Скачиваний:
91
Добавлен:
10.06.2015
Размер:
12.69 Mб
Скачать

150  Chapter 3  n  Performing Oracle User-Managed Database Recoveries

Answers to Review Questions

1.B.  First you would take the users_01.dbf datafile offline. You would then restore the users_01.dbf datafile from the most current backup. Once you have restored the datafile, recover the datafile with the recover datafile command. Finally, bring the datafile online with the alter database command.

2.D.  When you discover that you have lost an online redo log, and if the database is still up, the first action should be to checkpoint the database. This can serve to reduce the overall risk of data loss. After you checkpoint the database, you can then attempt to clear the online redo log. A backup afterward is highly recommended.

3.D.  First you would restore the missing datafiles. Notice in the question that there are two datafiles that were lost. Next you would mount the database and then you would recover the SYSTEM tablespace. Since it is the SYSTEM tablespace, you would not be able to open the database first. Then you open the database with the alter database open command.

4.E.  If you lose one or more control files but at least one remains, you should shut down the database. Then use any remaining control file as the source to create new control-file copies for the control files that were lost. Then restart the database. No recovery is required in this situation.

5.A, B, D.  You will need the database datafiles, the control files, and the online redo logs all in place to be able to restore the database when it’s in NOARCHIVELOG mode.

6.C.  If the database has not shut down yet, you have an opportunity to preserve your data changes. Issue a checkpoint, which will flush dirty buffers to disk. Then shut down the database normally, if possible (shutdown, shutdown immediate). You then should mount the database with the startup mount command followed by clearing and rebuilding the log file with the alter database clear logfile command. Finally, attempt to open the database with the alter database open command.

7.A, B, C, D.  Change-based application allows you to recover the database to a specific SCN. Cancel-based recovery provides the ability for you to cancel recovery after each archived redo log application. Time-based recovery provides the ability to recover the database up to a specific point in time. Sequence number–based recovery allows you to recover the database up to a specific log sequence number.

8.A, C, D.  To perform a full recovery of the database that is in ARCHIVELOG, you would need the database datafiles, the archived redo logs, and a backup control file.

9.E.  You use the alter tablespace add tempfile command to re-create a missing tempfile or add a new tempfile to a temporary tablespace.

Answers to Review Questions 

151

10.C.  You should first start the database in mount mode using the startup mount command. You then issue the alter database clear unarchived logfile command. This will clear the log file if it needs to be archived and re-create the online redo log group. If that command is successful, then you issue the alter database open command. The last step, backing up the database, is very important since your previous backup will not be able to recover the database beyond the point of the cleared redo log sequence number. This is because you have skipped a redo log in the redo log stream.

11. A.  You would first take the missing datafile offline with the alter database datafile 4 offline command. You should then restore the datafiles that have been lost. Then issue the recover tablespace USERS command to recover the USERS tablespace. Use the alter database datafile 4 online command to bring the USERS tablespace online.

12.D.  Since the online redo logs are intact, you will be able to use the noresetlogs version of the create controlfile command.

13.B.  Since the database is in NOARCHIVELOG mode, their request cannot be met because point-in-time recovery is supported only in ARCHIVELOG mode.

14.A, C.  You can create a backup control file with the alter database backup controlfile command. You can create a trace file that contains the create controlfile command.

15.A.  First you would want to restore the three datafiles that were lost. Then you would want to issue the startup mount command to mount the database to prepare for recovery. You would then recover the database (you could opt to recover just the datafiles if you wished). Finally, open the database with the alter database open command.

16.E.  In this situation, you have gotten yourself in real trouble and you will have data loss. First you will need to restore the last full database backup and also all archived redo logs that were generated during the backup and since the backup was completed. You will then issue the startup mount command to mount the database, and then issue the recover database until cancel command. Apply all the archived redo logs you can. Then cancel the recovery and open the database using the alter database open resetlogs command.

17.A.  The SCN is a number that represents a point in time in the database relative to transactions within a given database.

18.A.  If you have only lost a datafile, you should just restore and then recover the datafile.

19.A, C.  This error will appear if an archived redo log is not available. In this case you need sequence 11. First you would try to restore archived redo log sequence 11. If log sequence 11 is not available as an archived redo log, you might find that it is available in one of the online redo logs.

20.A, E.  The V$LOGFILE view will give you the name of the online redo logs associated with each group. The V$LOG view will provide the current sequence number assigned to each group.

Chapter

4

Configuring and

Backing Up Using

RMAN

Oracle Database 11g: Administration II exam objectives covered in this chapter:

ÛÛConfiguring Backup Specifications

NN Allocate channels to use in backing up

NN Configure backup optimization

ÛÛConfiguring for Recovery

NN Define, apply and use a retention policy

NN Configure the Flash Recovery Area

NN Use Flash Recovery Area

ÛÛUsing RMAN to Create Backups

NN Create image file backups

NN Create a whole database backup

NN Enable fast incremental backup

NN Create duplex backup and back up backup sets

NN Create an archival backup for long-term retention

NN Create a multi-section compressed and encrypted backup

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]