Tài liệu OCA: Oracle Database 11g Administrator Certified Associate Study Guide- P20 docx

50 616 4
Tài liệu OCA: Oracle Database 11g Administrator Certified Associate Study Guide- P20 docx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Exam Essentials 881 Know how flashback database option works. The flashback database option can greatly reduce the time required to rewind the database to a prior point in time. Understand the parameters associated with flashback database. Understand backup catalog maintenance. Show how the EM Database Control interface simplifies cataloging, crosschecking, and cleaning up. 95127c15.indd 881 2/17/09 3:01:55 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 882 Chapter 15 N Implementing Database Backups Review Questions 1. Among the failure events, which is the most serious? A. The loss of an entire redo log file group but no loss in any other group B. The loss of one member of each redo log file group C. The failure of the ARC0 background process D. The failure of the LGWR background process 2. To enable the flashback database option, the database must be in which of the following modes? A. NOARCHIVELOG mode B. ARCHIVELOG mode C. FLASHBACK LOG mode D. BEGIN BACKUP mode 3. When the database is in ARCHIVELOG mode, database recovery is possible up to which event or time? A. The last redo log file switch B. The last checkpoint position C. The last commit D. The last incremental backup using RMAN 4. From the following, choose the true statement regarding image copies and backup sets. A. An image copy stores one data file per image copy, and a backup set can store all data files in a single file. B. An image copy stores one data file per image copy, and a backup set consists of one file per data file backed up. C. Both image copies and backup sets use a single file to store all objects to be backed up. D. A backup set stores each data file in its own backup file, but an image copy places all data files into a single output file. 5. The option on the EM Database Control backup-scheduling options screen that allows you to refresh an image copy on disk with an incremental backup is known as which RMAN feature? A. Incrementally updated backups B. Incremental level-zero backups C. Compressed image-copy refresh D. Compressed incremental backups 95127c15.indd 882 2/17/09 3:01:55 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Review Questions 883 6. When should the DBA make a trace copy of the control file using ALTER DATABASE BACKUP CONTROLFILE TO TRACE? A. After every backup B. After multiplexing the control files C. Whenever restarting the instance D. Whenever the physical structure of the database changes 7. Which of the following is not a step in configuring your database to archive redo log files? A. Place the database in ARCHIVELOG mode. B. Multiplex the online redo log files. C. Specify a destination for archived redo log files. D. Specify a naming convention for your archived redo log files. 8. Why are online backups known as inconsistent backups? A. Because not all control files are synchronized to the same SCN until the database is shut down B. Because both committed and uncommitted transactions are included in a backup when the database is online C. Because a database failure while an online backup is in progress can leave the database in an inconsistent state D. Because online backups make copies of data files while they are not consistent with the control files 9. Which parameter is used to specify the archive-log destination? A. ARCHIVE_LOG_DEST_n B. LOG_ARCHIVE_DEST_n C. DB_CREATE_FILE_DEST D. DB_RECOVERY_FILE_DEST_n 10. Which of the following initialization parameters specifies the location where the control file trace backup is sent? A. DIAGNOSTIC_DEST B. BACKGROUND_DUMP_DEST C. LOG_ARCHIVE_DEST D. CORE_DUMP_DEST 11. Which of the following pieces of information is not available in the control file? A. Instance name B. Database name C. Tablespace names D. Log sequence number 95127c15.indd 883 2/17/09 3:01:55 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 884 Chapter 15 N Implementing Database Backups 12. Which data dictionary view shows that the database is in ARCHIVELOG mode? A. V$INSTANCE B. V$LOG C. V$DATABASE D. V$THREAD 13. Which file records all changes made to the database and is used only when recovering an instance? A. Archive-log file B. Redo log file C. Control file D. Alert log file 14. Which initialization parameter contains the value used as the default for archived log file destination 10? A. LOG_ARCHIVE_DEST B. STANDBY_ARCHIVE_DEST C. LOG_ARCHIVE_DUPLEX_DEST D. DB_RECOVERY_FILE_DEST E. USE_DB_RECOVERY_FILE_DEST 15. Which of the following commands is a key step in multiplexing control files using an spfile? A. ALTER SYSTEM SET CONTROL_FILES= ‘/u01/oradata/PRD/cntrl01.ctl’, ‘/u01/ oradata/PRD/cntrl02.ctl’ SCOPE=SPFILE; B. ALTER SYSTEM SET CONTROL_FILES= ‘/u01/oradata/PRD/cntrl01.ctl’, ‘/u01/ oradata/PRD/cntrl02.ctl’ SCOPE=MEMORY; C. ALTER SYSTEM SET CONTROL_FILES= ‘/u01/oradata/PRD/cntrl01.ctl’, ‘/u01/ oradata/PRD/cntrl02.ctl’ SCOPE=BOTH; D. The number of control files is fixed when the database is created. 16. Which statement adds a member /logs/redo22.log to redo log file group 2? A. ALTER DATABASE ADD LOGFILE ‘/logs/redo22.log’ TO GROUP 2; B. ALTER DATABASE ADD LOGFILE MEMBER ‘/logs/redo22.log’ TO GROUP 2; C. ALTER DATABASE ADD MEMBER ‘/logs/redo22.log’ TO GROUP 2; D. ALTER DATABASE ADD LOGFILE ‘/logs/redo22.log’; 17. What is the biggest advantage of having the control files on different disks? A. Database performance. B. Guards against failure. C. Faster archiving. D. Writes are concurrent, so having control files on different disks speeds up control file writes. 95127c15.indd 884 2/17/09 3:01:55 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Review Questions 885 18. To place the database into ARCHIVELOG mode, in which state must you start the database? A. MOUNT B. NOMOUNT C. OPEN D. SHUTDOWN E. Any of the above 19. Which of the following commands places the database in ARCHIVELOG mode? A. ALTER SYSTEM ARCHIVELOG; B. ALTER DATABASE ARCHIVELOG; C. ALTER SYSTEM SET ARCHIVELOG=TRUE; D. ALTER DATABASE ENABLE ARCHIVELOG MODE; E. ALTER DATABASE ARCHIVELOG MODE; 20. Which of the following substitution-variable formats are always required for specifying the names of the archived redo log files? (Choose all that apply.) A. %d B. %s C. %r D. %t 95127c15.indd 885 2/17/09 3:01:55 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 886 Chapter 15 N Implementing Database Backups Answers to Review Questions 1. A. Losing an entire redo log file group can result in losing committed transactions that may not yet have been written to the database files. Losing all members of a redo log file group except for one does not affect database operation and does not result in lost data. A mes- sage is placed in the alert log file. The failure of LGWR or ARC0 causes an instance failure, but you do not lose any committed transaction data. 2. B. To enable the flashback database option, the database must be in ARCHIVELOG mode. FLASHBACK LOG mode is not a valid mode of database operation. BEGIN BACKUP mode is used to perform hot backups without using RMAN. 3. C. In ARCHIVELOG mode, recovering the database is possible up to the last COMMIT state- ment; in other words, no committed transactions are lost in ARCHIVELOG mode. 4. A. Image copies are duplicate data and log files in OS format. Backup sets are binary com- pressed files in Oracle proprietary format. In addition to storing multiple data files in a single output file, backup sets do not contain unused blocks. 5. A. Incrementally updated backups save time during a recovery operation because fewer incremental backups need to be applied to the restored image copy. 6. D. In the rare event that all multiplexed copies of the control file are lost, having a trace copy of the control file reduces the possibility of data loss and reduces downtime during a recovery operation. The preferred and recommended way to back up a control file is to enable control file autobackup using RMAN. 7. B. Although it is recommended that you multiplex your online redo log files, it is not required to enable ARCHIVELOG mode of the database. 8. D. During an online backup, even if all data files are backed up at the same time, they are rarely, if ever, in sync with the control file. 9. B. LOG_ARCHIVE_DEST_n specifies the archive-log location. You can configure up to 10 archive-log destinations. LOG_ARCHIVE_DEST_10 is reserved for the flash recovery area, which is specified by the parameter DB_RECOVERY_FILE_DEST. 10. A. The trace backup is created in a subdirectory under the location specified by the DIAGNOSTIC_DEST parameter—$DIAGNOSTIC_DEST/diag/<dbname>/<instancename>/ trace directory. 11. A. The instance name is not in the control file. The control file has information about the physical database structure. 12. C. The V$DATABASE view in the column LOG_MODE shows whether the database is in ARCHIVELOG mode or in NOARCHIVELOG mode. 13. B. The redo log file records all changes made to the database. The LGWR process writes the redo log buffer entries to the redo log files. These entries are used to roll forward, or to update, the data files during an instance recovery. Archive log files are used for media recovery. 95127c15.indd 886 2/17/09 3:01:55 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Answers to Review Questions 887 14. D. DB_RECOVERY_FILE_DEST points to the flash recovery area, and this is the default for archived log-file destination number 10. 15. A. The location of the new control files is not valid until an operating-system copy is made of the current control file to the new location(s) and the instance is restarted. The SCOPE=SPFILE option specifies that the parameter change will not take place until a restart. Specifying either MEMORY or BOTH causes an error, because CONTROL_FILES is not a dynamic parameter. 16. B. When adding log-file members, specify the group number, or specify all the existing group members. 17. B. Having the control files on different disks ensures that even if you lose one disk, you lose only one control file. If you lose one of the control files, you can shut down the database and copy a control file, or you can change the CONTROL_FILES parameter and restart the database. 18. A. To put the database into ARCHIVELOG mode, the database must be in the MOUNT state; the control files and all data files that are not offline must be available to change the database to ARCHIVELOG mode. 19. B. You use the ALTER DATABASE ARCHIVELOG command while the database is in the MOUNT state to enable archiving of online redo log files. 20. B, C, D. The substitution variable %d, which represents the database ID, is required only if multiple databases share the same archive-log destination. 95127c15.indd 887 2/17/09 3:01:55 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 95127c15.indd 888 2/17/09 3:01:55 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Chapter 16 Recovering the Database ORACLE DATABASE 11g: ADMINISTRATION I EXAM OBJECTIVES COVERED IN THIS CHAPTER: Backup and Recovery Concepts Identify the types of failure that can occur in an Oracle  database Describe ways to tune instance recovery  Performing Database Recovery Overview of Data Recovery Advisor  Use Data Recovery Advisor to Perform recovery (Control file,  Redo log file, and Data file) 95127c16.indd 889 2/17/09 3:03:53 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Oracle Database 11g makes it easy for you to recover from a number of database failures. In Chapter 15, “Implementing Database Backups,” I emphasized the importance of check- points, redo log files, and archived log files to maintain a high level of availability and recoverability. I also showed you how to use the flash recovery area and several ways to back up your database. In this chapter, I’ll show you how to use those backups effectively when some kind of failure inevitably occurs. First, you’ll understand the kinds of failures that can occur in an Oracle database and explore how they can occur because of mistakes by users or DBAs or because of hardware or software failures that are out of your direct control. Each of these failures can require little or no action whatsoever, as in the case of an instance failure, but at the other end of the spectrum, a crash of the disk containing the SYSTEM tablespace requires a recovery effort. To balance performance with recoverability, you will learn how to tune instance recov- ery to minimize the amount of time Oracle will require to recover from an instance failure while still providing a reasonable response time for ongoing transactions. In a nutshell, your job is to increase the mean time between failures (MTBF) by providing redundant components where possible and leveraging other Oracle high-availability features such as Real Application Clusters (RAC) and Streams (an advanced replication technology). Hand in hand with increasing MTBF is decreasing the mean time to recovery (MTTR) to ensure compliance with any service-level agreements you have in place. Last, but certainly not least, these efforts should help you minimize data loss in such a way that committed trans- actions are never lost. In this chapter, you will also learn the steps required to recover from the loss of both system-critical and non-system-critical data files for databases that are operating in both ARCHIVELOG and NOARCHIVELOG modes. I’ll also show you how to recover from the loss of a control file or a redo log file. The Data Recovery Advisor was introduced in Oracle 11g, which automates most of the recovery tasks and is integrated with Enterprise Manager (EM) Database Control. As with most DBA operations in the database, EM Database Control makes many of these adminis- tration tasks easier and less error-prone. Understanding Types of Database Failure Database-related failures fall into six general categories. Understanding which category a failure belongs in will help you more quickly understand the nature of the recovery effort 95127c16.indd 890 2/17/09 3:03:53 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... or flashback database recovery to recover the table, taking into consideration the potential data loss for other objects stored in the same tablespace for TSPITR or in the database if you use flashback database recovery TSPITR and flashback database recovery are beyond the scope of this book but are covered in more detail in OCP: Oracle Database 11g Administrator Certified Professional Study Guide (Sybex,... meet the following prerequisites to perform a flashback transaction on an Oracle 11g database: NN NN The database must be in ARCHIVELOG mode Supplemental logging must be enabled in the database using ALTER DATABASE ADD SUPPLEMENTAL LOG DATA NN NN NN NN A supplemental log data primary key should be created using the statement ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS The user performing... ‘/u06/oradata/ord/control02.ctl’ scope = spfile; System altered Performing Recovery Operations  915 SQL> shutdown immediate ORA-01507: database not mounted ORACLE instance shut down SQL> startup ORACLE instance started Total System Global Area Fixed Size Variable Size Database Buffers Redo Buffers Database mounted Database opened SQL> 188743680 778036 162537676 25165824 262144 bytes bytes bytes bytes bytes Once the instance... the Oracle 11g database that automatically diagnoses database failures and determines the appropriate recovery options In addition to recommending the recovery options available, it can perform the recovery after the DBA confirms the operation DRA can proactively check for failures, before the database process detects corruption and signals an error DRA has user interfaces through the GUI of EM Database. .. signals an error DRA has user interfaces through the GUI of EM Database Control and through the command-line utility RMAN DRA in Oracle 11g Release 1 supports only single-instance databases; it does not support RAC databases You can invoke the Data Recovery Advisor from EM Database Control using any of the following methods: NN Using the Perform Recovery screen shown earlier in Figure 16.2 If there... a message while you are running the STARTUP command, as in this example: SQL> startup ORACLE instance started Total System Global Area Fixed Size Variable Size Database Buffers Redo Buffers Database mounted 197132288 778076 162537636 33554432 262144 bytes bytes bytes bytes bytes 896  Chapter 16    Recovering the Database n ORA-01157: cannot identify/lock data file 4 - see DBWR trace file ORA-01110:... that prevents the synchronization of the database s data files and control files before the instance is shut down Oracle automatically recovers from instance failure during instance recovery Instance recovery is initiated by simply starting up the database with the STARTUP command Instance recovery is also known as crash recovery During a STARTUP operation, Oracle first attempts to read the initialization... the enhanced manageability features introduced with Oracle9 i, setting FAST_START_MTTR_TARGET is the easiest and most straightforward way to define your database s recovery time given the time-based constraints included in most typical SLAs The EM Database Control interface makes it easy to adjust FAST_START_MTTR_TARGET On the Availability screen of Database Control, choose Recovery Settings Figure 16.1... Network ​ A network component between the client and the database server fails, and the  ​ session is disconnected from the database User error ​ An error message is not generated, but the operation’s result, such as dropping  ​ a table, is not what the user intended Instance ​ The database instance crashes unexpectedly  ​ Media ​ One or more of the database files is lost, deleted, or corrupted  ​ In the...Understanding Types of Database Failure  891 you need to use to reverse the effects of the failure and maintain a high level of availability and performance in your database The six general categories of failures are as follows: Statement ​ A single database operation fails, such as a Data Manipulation Language  ​ (DML) statement—INSERT, UPDATE, and so on User process ​ A single database connection fails . this book but are covered in more detail in OCP: Oracle Database 11g Administrator Certified Professional Study Guide (Sybex, 2009). If the inadvertent changes. this watermark. Oracle Database 11g makes it easy for you to recover from a number of database failures. In Chapter 15, “Implementing Database Backups,”

Ngày đăng: 24/12/2013, 13:16

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan