Tuesday, September 25, 2007

Oracle 10g New Features -- Ch 7 - Backup, Recovery, and High Availability

Chapter 7 - Backup, Recovery, and High Availability



Review Questions

1. Oracle 10g supports fast incremental backups. Which of the following is not true about the incremental backup's change-tracking file?
A. The size if the tracking file is proportional to the size of the database.
B. If a block tracking file exists, it is no longer necessary for each datafile to be read in its entirety during an incremental backup.
C. A change-tracking file is created by default when the database is created.
D. The block tracking file must be at least 10MB in size.
E. RMAN uses the block change-tracking file to determine which blocks to back up during an incremental backup.

----
Ans: C.
Change tracking is not enabled by default. When enabled, however, it incurs a slight amount of overhead whenever a block in any datafile is updated. This is offset by the time saved during incremental backup operations.

e.g.

ALTER DATABASE ENABLE
BLOCK CHANGE TRACKING USING FILE
'/oracle/admin/SMILEY/bct.dbf';


2. Which dynamic performance view or data dictionary view has a column that indicates whether the database is configured for Flashback Database?
A. V$DATABASE
B. V$INSTANCE
C. V$FLASHBACK_DATABASE_STAT
D. DATABASE_PROPERTIES

---
Ans: A.
The dynamic performance view V$DATABASE contains a new column FLASHBACK_ON that indicates whether Flashback Database is enabled.


3. Which two initialization parameters define the flash recovery area?
A. DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_SIZE
B. DB_RECOVERY_FILE_DEST_SIZE and DB_RECOVERY_FILE_DEST
C. LOG_ARCHIVE_DEST_10 and FLASH_RECOVERY_DEST
D. DB_RECOVERY_FILE_DIR_SIZE and DB_RECOVERY_FILE_DIR

---
Ans: B.

DB_RECOVERY_FILE_DEST_SIZE specifies the maximum size of the flash recovery area, and DB_RECOVERY_FILE_DEST specifies the location of the flash recovery area. DB_RECOVERY_FILE_SIZE, FLASH_RECOVERY_DEST, DB_RECOVERY_FILE_DIR_SIZE, and DB_RECOVERY_FILE_DIR are not valid initialization parameters. LOG_ARCHIVE_DEST_10 points to the flash recovery area by default but does not define the flash recovery area.


4. Which of the following is true about space associated with a dropped table?
A. The space from the dropped table is reflected in the DBA_FREE_SPACE table, but the space is still counted against the table owner's quota.
B. The space from the dropped table is reflected in the DBA_FREE_SPACE table, and the table owner's quota is reduced accordingly.
C. The space from the dropped table is not reflected in the DBA_FREE_SPACE view until the PURGE TABLE command is issued.
D. The space from the dropped table is not reflected in the DBA_FREE_SPACE view until the PURGE USER_RECYCLEBIN command is issued.

---
Ans: A.
While the space from a dropped table shows up as additional free space in DBA_FREE_SPACE, the space is still counted against the user's quota until the PURGE USER_RECYCLEBIN or PURGE TABLE command is issued.

5. You have just run the following RMAN commands:
RMAN> configure controlfile autobackup off;
RMAN> backup datafile 1;
What are the results?
A. The first datafile of the SYSTEM tablespace is backed up as an image copy without the control file.
B. The SYSTEM tablespace is backed up as an image copy along with the control file.
C. The tablespace containing datafile #1 is backed up without the control file.
D. The first datafile of the SYSTEM tablespace is backed up along with the control file.
E. None of the above.

---
Ans: D.
The command CONFIGURE CONTROLFILE AUTOBACKUP OFF disables the automatic backup of the control file unless the backup includes any datafiles of the SYSTEM tablespace.

6. Which of the following methods does not show the contents of the recycle bin for a user with DBA privileges?
A. Query the view USER_RECYCLEBIN.
B. Use the command SHOW RECYCLEBIN.
C. Query the view DBA_RECYCLEBIN.
D. Query the view RECYCLEBIN.
E. You can use all of the above methods to query the contents of the recycle bin.

---
Ans: E.
In addition to the previous methods, the EM Database Control can display the current contents of the recycle bin.

7. Which of the following statements is not true about space reclamation and a tablespace's recycle bin?
A. Free space outside of the recycle bin is used first for new space requests.
B. If there are objects in the recycle bin, the datafile is autoextended before the contents of the recycle bin are reused.
C. Recycle bin objects are purged from the recycle bin in a FIFO method when free space outside of the recycle bin is not available.
D. More free space is available in the tablespace when a PURGE command is issued; however, those objects can no longer be recovered using Flashback Drop.

----
Ans: B.
The objects in the recycle bin are dropped to satisfy space requests before any of the tablespace's datafiles are autoextended.


8. As of Oracle 10g, the RMAN COPY command has been deprecated. Which RMAN command should you use instead to back up all the datafiles in the database?
A. BACKUP AS BACKUPSET DATABASE;
B. BACKUP AS COPY (TABLESPACE SYSTEM, SYSAUX, USERS, UNDOTBS);
C. BACKUP AS COPY ALL;
D. BACKUP AS COPY DATABASE;

---
Ans: D.
The BACKUP AS COPY DATABASE command will copy all datafiles in one command. BACKUP AS BACKUPSET DATABASE will back up the entire database but not in image copy format. BACKUP AS COPY ALL is not a valid RMAN command. BACKUP AS COPY using individual tablespaces will back up only the datafiles for the specific tablespaces in the database and does not include the archived logs, SPFILE, or control files.

9. The user SCOTT drops and re-creates the EMPLOYEES table four times. How many times must SCOTT issue the PURGE command to free up the space occupied by the dropped copies of the EMPLOYEES table?
A. Once, if SCOTT specifies the table's original name.
B. Four.
C. SCOTT can use only PURGE RECYCLEBIN to remove the dropped tables from the recycle bin.
D. Once, after all the dependent objects in the recycle bin are dropped first.

---
Ans: B.
The PURGE command can be issued four times to remove the four copies of the EMPLOYEES table. Alternatively, SCOTT can issue the PURGE RECYCLEBIN command to remove all dropped tables from the recycle bin.

10. Which of the following backup file types are not backed up when the RMAN BACKUP RECOVERY AREA command is issued?
A. Full backup sets
B. Flashback logs
C. Incremental backup sets
D. Datafile copies
E. Archive logs

----
Ans: B.
The RMAN BACKUP RECOVERY AREA command backs up all flash recovery files created in the flash recovery area that have not yet been backed up to tape, which includes full and incremental backup sets, control file autobackups, archive logs, and datafile copies; flashback logs, incremental bitmaps, current control file, and online redo log files are not backed up.
??

11. Choose the following statement that is true regarding Flashback Versions Query.
A. All rows that existed between the two SCNs or time stamps specified in the VERSIONS clause are returned, including rows that have been deleted and reinserted and rows that have not yet been committed.
B. All rows that existed between the two SCNs or time stamps specified in the VERSIONS clause are returned, not including rows that have been deleted and reinserted or uncommitted.
C. All rows that existed between the two SCNs or time stamps specified in the VERSIONS clause are returned, including rows that have been deleted and reinserted, but not uncommitted rows.
D. All rows that existed between the two SCNs or time stamps specified in the VERSIONS clause are returned, including both rows that have been deleted and reinserted and uncommitted rows in a current transaction.

---
Ans C.
Flashback Versions Query returns only rows that have been committed between two SCNs or time stamps. In addition, rows that have been deleted, reinserted, and committed are also returned.

12. You recently performed an RMAN image copy backup of the USERS tablespace consisting of datafiles #4 and #7. Next, you run the following command in RMAN:
RMAN> recover copy of datafile 7;
What are the results of this command?
A. Only the latest image copy of datafile #7 is updated with the contents of all incremental backup files created since the image copy was created.
B. If the most recent copy of datafile #7 is damaged or missing, it is re-created from an earlier image copy and the subsequent incremental backups; otherwise this command has no effect.
C. All image copies of datafile #7 are updated with the contents of all incremental backup files created since the image copy was created.
D. Both datafile #4 and datafile #7 are merged into a single image copy and updated with recent incremental backups.
----
Ans: A.
The RECOVER COPY OF DATAFILE command applies incremental RMAN backups to an image copy of the datafile and potentially reduces the amount of time needed for media recovery of the datafile because fewer archive log files are necessary to bring the datafile up to the latest SCN in the case of a media failure.
A.


13. Which of the following columns is not in the FLASHBACK_TRANSACTION_QUERY view?
A. REDO_SQL
B. START_SCN
C. UNDO_SQL
D. TABLE_OWNER
E. COMMIT_TIMESTAMP

---
Ans: A.
There is no such column REDO_SQL in FLASHBACK_TRANSACTION_QUERY.

14. What happens when you execute the following RMAN command? RMAN> backup copy of database;
A. It creates a backup of all datafiles to the flash recovery area as image copies by default.
B. A copy of all datafiles, control files, archived log files, and SPFILE are copied to the flash recovery area as image copies by default.
C. A copy of all datafiles, control files, archived log files, and SPFILE are copied to the flash recovery area as backup sets by default.
D. It creates a backup of previous image copies of all datafiles and control files in the database— in other words, a backup of a previous backup.

---
Ans: D. The BACKUP COPY OF DATABASE is usually used to create a copy of a backup already in the RMAN backup destination to another device type, such as tape. The copy can either be another image copy or be a backup set.

15. Identify the two columns of V$RECOVERY_FILE_DEST that are not accessible via the EM database Control.
A. SPACE_RECLAIMABLE, SPACE_LIMIT
B. SPACE_RECLAIMABLE, NUMBER_OF_FILES
C. SPACE_LIMIT, SPACE_USED
D. SPACE_USED, NUMBER_OF_FILES

--
Ans: B.
To view the values for SPACE_RECLAIMABLE and NUMBER_OF_FILES, you must use the dynamic performance view V$RECOVERY_FILE_DEST.

16. To ensure that undo data is retained in an undo tablespace for flashback features even if operations that need to generate undo may fail, what clause should be specified in the CREATE UNDO TABLESPACE or ALTER UNDO TABLESPACE?
A. FLASHBACK OFF
B. GUARANTEE RETENTION
C. RETENTION GUARANTEE
D. UNDO_RETENTION

---
Ans: C.
Turning off flashback generation for a tablespace has no effect on undo retention. GUARANTEE RETENTION is syntactically incorrect. UNDO_RETENTION is an initialization parameter, not an undo tablespace property.


17. Each row in the dynamic performance view V$FLASHBACK_DATABASE_STAT represents what time interval?
A. 24 hours
B. One hour
C. One minute
D. 30 minutes

---
Ans: B.
The dynamic performance view V$FLASHBACK_DATABASE_STAT contains statistics that monitor the overhead of logging flashback data in the Flashback Database logs at 1-hour intervals for a total of 24 hours.

18. Which of the following is not true about a table recovered from the recycle bin using the FLASHBACK TABLE…TO BEFORE DROP command?
A. All recovered indexes, triggers, and constraints associated with the table are no longer valid and must be re-created before they can be used.
B. If you recover a table that has been dropped several times, only the most recent version of the dropped table is restored unless you specify the name of the table in the recycle bin.
C. If the recovered table has the same name as an existing table, you must use the RENAME TO clause or recover the table to another schema.
D. Assuming that a new table with the same name has not yet been created, recovering a table from the recycle bin using either the original name or the recycle bin name achieves the same result.

---
Ans: A.
The indexes, triggers, and constraints keep their recycle bin names when the related table is restored, but they are still valid and usable. It is highly recommended, however, that the related structures be re-created or renamed with the original names.

19. You place all database files in online backup mode with the following command: ALTER DATABASE BEGIN BACKUP; Which of the following is not a requirement when you use this command?
A. You must use RMAN to perform the backup.
B. The database must be mounted and open.
C. The database must be in ARCHIVELOG mode.
D. A tablespace cannot be placed into read-only mode when this command is issued.

--
Ans: A.
The ALTER DATABASE BEGIN BACKUP command is only used when you are not using RMAN to ensure a consistent backup.

20. Choose the statement that is not true about space management in the flash recovery area.
A. A warning is issued when the flash recovery area is 85 percent full, and a critical warning is issued when the flash recovery area is 97 percent full.
B. When the flash recovery reaches 100 percent capacity, only files backed up to tape or another disk are considered for deletion to free up space for new backup files.
C. When files are written to the flash recovery area, a message is written to the alert log.
D. Obsolete files are automatically removed from the flash recovery area when the flash recovery area reaches 100 percent capacity.
E. When files are deleted from the flash recovery area, a message is written to the alert log.

----
Ans: B. Obsolete files are also considered for deletion when the flash recovery area reaches 100 percent capacity, even if they have not yet been backed up to tape or another disk device.

No comments: