1. Trang chủ
  2. » Công Nghệ Thông Tin

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

50 296 0

Đ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

Thông tin cơ bản

Định dạng
Số trang 50
Dung lượng 1 MB

Nội dung

Exam Essentials 831 Exam Essentials Understand the Automatic Workload Repository. Describe the components of the AWR and how they are used to collect and store database performance statistics. Describe the role of Automatic Database Diagnostic Monitor. Know how ADDM uses the AWR statistics to formulate tuning recommendations using historical and baseline metrics. Explain how each advisor is used to improve performance. Describe how you can use each of the EM Database Control advisors shown on the Advisor Central screen to improve database performance and manageability. Describe how alerts are used to monitor performance. Show how you can configure the EM Database Control alert system to alert you via the console or via email whenever a monitored event occurs in the database. Remember the location of alert log file. Starting in Oracle 11g, the alert log file location is determined by the DIAGNOSTIC_DEST parameter. Learn the location of the text alert log file and XML alert log file. Identify and fix invalid or unusable objects. Understand the techniques you can use to identify invalid procedures, functions, triggers, and views and how to validate them. Know how to find unusable indexes and how to fix them. Understand Automatic Memory Management. Know the parameters that control the memory management and how the pools are allocated. Understand sources of tuning information. Know in which dynamic performance views, data dictionary views, and log files tuning information can be found outside the EM Data- base Control monitoring system. 95127c14.indd 831 2/17/09 2:54:23 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 832 Chapter 14 N Maintaining the Database and Managing Performance Review Questions 1. Which of the following components of the Oracle architecture stores the statistics gathered by the MMON process? A. ADDM B. AW R C. ASMM D. ADR 2. Which of the following options for the pfile/spfile’s STATISTICS_LEVEL parameter turns off AWR statistics gathering and ADDM advisory services? A. OFF B. TYPICAL C. ALL D. BASIC 3. Which parameter is used to enable Automatic Memory Management? A. AMM_TARGET B. MEMORY_TARGET C. SGA_TARGET D. All of the above 4. Which statement about an index with the status UNUSABLE in DBA_INDEXES is true? A. The index will be automatically fixed the next time it is used. B. The Oracle optimizer throws an error when it tries to use the index. C. The index must be recompiled using the ALTER INDEX…RECOMPILE statement. D. The index must be reorganized using the ALTER INDEX…REBUILD statement before it can be used again. 5. Suppose you have used EM Database Control to drill down into ADDM findings and have found that a single SQL statement is causing the majority of I/O on your system. Which of the following advisors is best suited to troubleshoot this SQL statement? A. SQL Tuning Advisor B. SQL Access Advisor C. Both A and B D. Neither A nor B 95127c14.indd 832 2/17/09 2:54:23 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Review Questions 833 6. You found out that few procedures in the APPS schema have an INVALID status in the DBA_ OBJECTS view. What are your options to fix the issue? (Choose the best two answers.) A. Do nothing. When the procedure is accessed the next time, Oracle will try to recompile. B. Drop the procedure so that users get a valid error. C. Recompile the procedure using ALTER PROCEDURE…COMPILE. D. Contact the developer or vendor to get the source code and re-create the procedure. 7. Which procedure is used to tell Oracle that the statistics gathered should not be published? A. DBMS_STATS.PUBLISH_STATS B. DBMS_STATS.SET_TABLE_PREFS C. DBMS_STATS.PENDING_STATS D. DBMS_STATS.GATHER_TABLE_STATS 8. Which data dictionary view contains information explaining why ADDM made its recom- mendations? A. DBA_ADVISOR_FINDINGS B. DBA_ADVISOR_OBJECTS C. DBA_ADVISOR_RECOMMENDATIONS D. DBA_ADVISOR_RATIONALE 9. Which of the following advisors determines whether the space allocated to the shared pool, large pool, or buffer cache is adequate? A. SQL Tuning Advisor B. SGA Tuning Advisor C. Memory Advisor D. Pool Advisor 10. Which of the following advisors determines whether the estimated instance-recovery dura- tion is within the expected service-level agreements? A. Undo Management Advisor B. SQL Access Advisor C. SQL Tuning Advisor D. MTTR Advisor 11. If no email address is specified, where will alert information be displayed? A. In the DBA_ALERTS data dictionary view. B. In the V$ALERTS dynamic performance view. C. In the EM Database Control main screen. D. No alert information is sent or displayed. 95127c14.indd 833 2/17/09 2:54:24 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 834 Chapter 14 N Maintaining the Database and Managing Performance 12. When you configure an alert, which of the following types of alert thresholds can you use to monitor a tablespace for diminishing free space? A. Warning threshold B. Critical threshold C. Both A and B D. Neither A nor B 13. Multiple baseline metrics can be gathered and stored in the AWR. Why might you want more than one metrics baseline? A. You might want a separate baseline metric for each user. B. You might want a separate baseline metric for daytime usage vs. off-hours usage. C. You might want a separate baseline metric for each schema. D. You would never want more than one baseline metric, even though it is possible to gather and store them. 14. Using EM Database Control, you discover that two application PL/SQL functions and a view are currently invalid. Which of the following might you use to fix these objects? (Choose two.) A. Shut down and restart the database. B. Use EM Database Control to recompile the object. C. Export the invalid objects, drop them, and then import them. D. Use the ALTER FUNCTION…COMPILE and ALTER VIEW…COMPILE commands. 15. Which statement about MEMORY_TARGET parameter is not true? A. It is a dynamic initialization parameter. B. It represents the total maximum memory that can be allocated to the instance memory (PGA and SGA combined). C. Its default value is zero. D. You will not get an error when SGA_TARGET and PGA_AGGREGATE_TARGET parameters are set to nonzero values. 16. Which of the following is a performance metric that could be defined as “the amount of work that a system can perform in a given amount of time”? A. Response time B. Uptime C. Throughput D. Runtime 95127c14.indd 834 2/17/09 2:54:24 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Review Questions 835 17. Which of the following is typically not one of the three primary sources of performance metric information on the EM Database Control Performance tab? A. Host B. Session C. Instance D. Network 18. By default, how long will database statistics be retained in the AWR? A. 7 days B. 30 days C. 7 hours D. Indefinitely 19. Your users have called to complain that system performance has suddenly decreased mark- edly. Where would be the most likely place to look for the cause of the problem in EM Database Control? A. Main screen B. Performance tab C. Administration tab D. Maintenance tab 20. Using EM Database Control, you’ve identified that the following SQL statement is the source of a high amount of disk I/O: SELECT NAME, LOCATION, CREDIT_LIMIT FROM CUSTOMERS What might you do first to try to improve performance? A. Run the SQL Tuning Advisor. B. Run the SQL Access Advisor. C. Check the EM Database Control main screen for alerts. D. Click the Alert Log Content link in the EM Database Control main screen. 95127c14.indd 835 2/17/09 2:54:24 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 836 Chapter 14 N Maintaining the Database and Managing Performance Answers to Review Questions 1. B. The MMON process gathers statistics from the SGA and stores them in the AWR. The ADDM process then uses these statistics to compare the current state of the database with baseline and historical performance metrics before summarizing the results on the EM Database Control screens. 2. D. Setting STATISTICS_LEVEL = BASIC disables the collection and analysis of AWR statis- tics. TYPICAL is the default setting, and ALL gathers information for the execution plan and operating-system timing. OFF is not a valid value for this parameter. 3. B. Automatic Memory Management is enabled by setting a nonzero value for the MEMORY_ TARGET parameter. The default value for this parameter is zero. SGA_TARGET enables the ASSM (Automatic Shared Memory Management) feature. 4. D. Unusable indexes must be manually rebuilt by the DBA, or the user owning the index can rebuild or drop/recreate as well, before the index can be used. The Oracle optimizer ignores the unusable index. 5. C. You can use the SQL Tuning Advisor and SQL Access Advisor together to determine whether I/O can be minimized and overall DB Time reduced to the targeted SQL statement. 6. A, C. Invalid PL/SQL objects will be automatically recompiled the next time they are accessed. The DBA can manually recompile the procedure. Manual recompilation is the recommended approach. 7. B. The DBMS_STATS.SET_TABLE_PREFS procedure is used to set the PUBLISH preference to FALSE. To be able to use the pending statistics, the OPTIMIZER_USE_PENDING_STATISTICS parameter must be set to TRUE in the session. 8. D. DBA_ADVISOR_RATIONALE provides the rationale for each ADDM recommendation. The ADDM findings are stored in DBA_ADVISOR_FINDINGS. The objects related to the findings are shown in DBA_ADVISOR_OBJECTS. The actual ADDM recommendations are found in DBA_ADVISOR_RECOMMENDATIONS. 9. C. The Memory Advisor can help determine whether the overall size of the SGA is appro- priate and whether memory is properly allocated to the SGA components. 10. D. The Mean Time To Recover (MTTR) Advisor provides recommendations that you can use to configure the database so that the instance-recovery time fits within the service levels that you specified. 11. C. By default, alerts are displayed in the Alerts section of the EM Database Control main screen, even when email notifications are not configured. 12. C. You can specify both warning and critical thresholds for monitoring the available free space in a tablespace. In this situation, the warning threshold is generally a lower number than the critical threshold. 95127c14.indd 836 2/17/09 2:54:24 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Answers to Review Questions 837 13. B. Because many transactional systems run batch processing during off-hours, having a relevant baseline for each type of usage pattern yields better results in terms of alerts and ADDM recommendations. 14. B, D. After fixing the issue that originally caused the invalid status, you can use both EM Database Control and SQL to compile an invalid object. Starting and stopping the database will not fix invalid objects. Export/import is also not an appropriate technique for recom- piling invalid objects. 15. B. MEMORY_TARGET represents the total size allocated for SGA and PGA components. The maximum that can be allocated for these structures is determined by the MEMORY_MAX_ TARGET parameter. You still can set the SGA_TARGET and PGA_AGGREGATE_TARGET param- eters; Oracle will use these as the minimums. 16. C. Throughput is an important performance metric because it is an overall measure of performance that can be compared against similar measures taken before and after tuning changes are implemented. 17. D. Network information may be contained in the Session Information section of the EM Database Control Performance screen, but only if network issues contributed to session wait times. 18. A. By default, database statistics are retained in the AWR for seven days. You can change the default duration using the EM Database Control Automatic Workload Repository link on the Performance tab or using the DBMS_WORKLOAD_REPOSITORY PL/SQL package. 19. B. The Performance tab of EM Database Control provides a quick overview of how the host system, user sessions, and throughput are impacted by the system slowdown. You can also drill down into any of these three areas to take a look at details about this slowdown. 20. A. Running the SQL Tuning Advisor provides the most information about how the perfor- mance of this SQL statement might be improved. The SQL Access Advisor is run only after the output from the SQL Tuning Advisor indicates that it will be useful. EM Database Control does not store detailed information about I/O activity in either its alerts or the alert log. 95127c14.indd 837 2/17/09 2:54:24 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 95127c14.indd 838 2/17/09 2:54:24 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Chapter 15 Implementing Database Backups ORACLE DATABASE 11g: ADMINISTRATION I EXAM OBJECTIVES COVERED IN THIS CHAPTER: Backup and Recovery Concepts Identify the importance of checkpoints, redo log files, and  archived log files Overview of flash recovery area  Configure ARCHIVELOG mode  Performing Database Backups Create consistent database backups  Back up your database without shutting it down  Create incremental backups  Automate database backups  Manage backups, view backup reports and monitor the flash  recovery area 95127c15.indd 839 2/17/09 3:01:51 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Oracle’s administration tool, Enterprise Manager Database Control, makes configuring and performing backups easier. Most, if not all, of the functionality available with the command-line interface is available in a graphical user interface to save time and make backup operations less error-prone. Oracle Database 11g makes it easy for you to configure your database to be highly available and reliable. In other words, you want to configure your database to minimize the amount of downtime while at the same time being able to recover quickly and without losing any committed transactions when the database becomes unavailable for reasons that may be beyond your control. In this chapter, I will first describe the components you will use to minimize or eliminate data loss in your database while at the same time keeping availability high. Specifically, I will cover the following: Checkpoints  Redo log files  Archived redo log files  The flash recovery area  Next, you will learn how to configure your database for recovery. This will include a discussion of ARCHIVELOG mode and other required initialization parameters. Once your environment is configured, you will need to know how to actually back it up, using both operating-system commands and the RMAN utility. You will also learn how to automate and manage your backups as well as how to monitor one of the key components in your backup strategy: the flash recovery area. In Chapter 16, “Recovering the Database,” you will then learn how to use the files created and maintained during your backups to quickly recover the database in the event of a database failure. Understanding and Configuring Recovery Components As a database administrator, your primary goal is to keep the database open and available for users, usually 24 hours a day, 7 days a week. Your partnership with the server’s system administrator includes the following tasks: Proactively solving common causes of failures  Increasing the mean time between failure (MTBF)  95127c15.indd 840 2/17/09 3:01:51 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... ( ‘/u01/app /oracle/ oradata/11GR11/redo03.log’, ‘/u02/app /oracle/ oradata/11GR11/redo03.log’ ) SIZE 50M STANDBY LOGFILE DATAFILE ‘/u01/app /oracle/ oradata/11GR11/system01.dbf’, ‘/u01/app /oracle/ oradata/11GR11/sysaux01.dbf’, ‘/u01/app /oracle/ oradata/11GR11/undotbs01.dbf’, ‘/u01/app /oracle/ oradata/11GR11/users01.dbf’, ‘/u01/app /oracle/ oradata/11GR11/example01.dbf’, ‘/u01/app /oracle/ oradata/11GR11/appl_data01.dbf’,... parameter 3 Shut down the database, and start in MOUNT state 4 Enable the flashback database feature using the ALTER DATABASE FLASHBACK ON statement 5 Open the database You can find more information about configuring and using flashback logs with flashback database in OCP: Oracle Database 11g Administrator Certified Professional Study Guide (Sybex, 2009) 862  Chapter 15    Implementing Database Backups n... Implementing Database Backups n STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE “11GR11” RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( ‘/u01/app /oracle/ oradata/11GR11/redo01.log’, ‘/u02/app /oracle/ oradata/11GR11/redo01.log’ ) SIZE 50M, GROUP 2 ( ‘/u01/app /oracle/ oradata/11GR11/redo02.log’, ‘/u02/app /oracle/ oradata/11GR11/redo02.log’... using the command ALTER DATABASE ARCHIVELOG 5 Open the database by using ALTER DATABASE OPEN 6 Back up the database To disable ARCHIVELOG mode, follow these steps: 1 Shut down the database 2 Start up and mount the database 3 Disable ARCHIVELOG mode by using the command ALTER DATABASE NOARCHIVELOG 4 Open the database by using ALTER DATABASE OPEN The dynamic performance view V $DATABASE tells you whether... This rapid access means that any databaserecovery operation takes only minutes instead of hours Using disk space as the primary medium for all database- recovery operations is the key component of the Oracle 11g database s flash recovery area The flash recovery area is a single, unified storage area for all recovery-related files and recovery activities in an Oracle database The flash recovery area... place the database in ARCHIVELOG mode You can specify the ARCHIVELOG clause while creating the database However, you might prefer to create the database first and then enable ARCHIVELOG mode To enable ARCHIVELOG mode, follow these steps: 1 Shut down the database 2 Set up the appropriate initialization parameters 3 Start up and mount the database; you can change ARCHIVELOG mode only when the database. .. contents of the control file; only Oracle processes should update its contents When you 842  Chapter 15    Implementing Database Backups n start up the database, Oracle uses the control file to identify and to open the data files and redo log files Control files play a major role when recovering a database The contents of the control file include the following: NN The database name to which the control... ‘/u01/app /oracle/ oradata/11GR11/appl_data02.dbf’ CHARACTER SET WE8MSWIN1252 ; Commands to re-create incarnation table Below log names MUST be changed to existing filenames on disk Any one log file from each branch can be used to re-create incarnation records ALTER DATABASE REGISTER LOGFILE ‘/u01/app /oracle/  flash_recovery_area/11GR11/archivelog/2008_10_26/o1_mf_1_1_%u_.arc’; ALTER DATABASE. .. to rename a log member: 1 Shut down the database 2 Copy/rename the redo log file member to the new location by using an operating-system command 3 Start up the instance, and mount the database (STARTUP MOUNT) 4 Rename the log file member in the control file Use ALTER DATABASE RENAME FILE ‘old_redo_file_name’ TO ‘new_redo_file_name’;  5 Open the database (ALTER DATABASE OPEN) 6 Back up the control file... LOGFILE command To drop the log-file group 3, use the following SQL statement: ALTER DATABASE DROP LOGFILE GROUP 3; When an online redo log group is dropped from the database, the operating-system files are not deleted from disk The control files of the associated database are updated to drop the members of the group from the database structure After dropping an online redo log group, make sure the drop . error-prone. Oracle Database 11g makes it easy for you to configure your database to be highly available and reliable. In other words, you want to configure your database. Performing Database Backups Create consistent database backups  Back up your database without shutting it down  Create incremental backups  Automate database

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

TỪ KHÓA LIÊN QUAN