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

Summary  445

Key items to look for in the replay report are top SQL statements, performance divergence, data divergence, and error divergence. Performance divergence is usually due to infrastructure or configuration differences between the capture and replay environments. In this example, the replay took longer than the capture, so we need to further investigate to determine the bottlenecks in the test system. Data divergence occurs when the DML and SQL statement results in the replay system and capture system do not match. Error divergence is when the errors that occur do not match.

In Exercise 10.3, you will capture a Database Replay workload on a source database and replay it on a destination database.

E x e r c i s e 10 . 3

Performing Database Replay

In this exercise you will use the Database Replay feature to compare workload performance between a source database and a destination database.

1.Create a replay database as a copy of the capture database. One method is to use RMAN to make a clone. You could also use the DBCA to create a new capture database and a replay database.

2.Capture a workload on the source database.

3.Preprocess the workload capture.

4.Replay the workload on the destination database.

5.Analyze the results.

Summary

In this chapter, you learned about tools that help the DBA diagnose problems in the database and tools that assist with detecting and resolving performance issues.

In the first part, we introduced the Automatic Diagnostic Repository (ADR), the new central repository for storing all database diagnostic information, and the Support Workbench, which the DBA uses for problem recognition, reporting, and resolution. The Support Workbench improves DBA productivity by providing a process and web pages to report, analyze, and send diagnostic information to Oracle Support for problem resolution. Block media recovery improvements in 11g include faster automatic recognition of corrupt blocks and faster block recovery using the flashback logs.

In the second part, we introduced the SQL Tuning Advisor, the SQL Access Advisor, and Database Replay. To help improve the performance of SQL statements, the SQL Tuning

Advisor recommends new or modified indexes, SQL profiles, rewriting your SQL statements,

446  Chapter 10  n  Diagnosing the Database and Managing Performance

or using statistics. The SQL Access Advisor looks at workgroups and recommends indexes, partitioning, and materialized views to improve the performance of a workload. Database Replay is an extremely useful tool that allows the DBA to capture and replay a workload to compare the performance of one system to another.

Exam Essentials

Know how to set up the Automatic Diagnostic Repository.    Make sure you understand the new initialization parameter for ADR, which parameters are deprecated, and the basic directory structure of the ADR.

Know how to use the Support Workbench to report an incident.    Know the steps required to open a service request with Oracle Support. Know how to package and submit the files related to a problem incident.

Know how to perform block media recovery.    Know how to discover corrupt data blocks, what causes data corruption, and how to repair corrupt data blocks. Know what can contribute to faster recoveries. Know what is required to perform block media recovery.

Understand automatic and manual SQL tuning.    Understand the differences between automatic and manual SQL tuning using the Tuning Advisor. Understand the advantages and potential dangers of automatic SQL tuning. Understand how to use the SQL Tuning Advisor in manual mode.

Understand the SQL Access Advisor.    Know what types of changes and types of indexes the SQL Access Advisor may recommend. Understand the impact of implementing recommendations.

Know when to use Database Replay.    Know the purpose and uses for Database Replay. Know what is required to set up and perform Database Replay. Know how to compare results from the production workload and the replay workload.

Review Questions 

447

Review Questions

1.Which of the following initialization parameters have been deprecated in Oracle 11g because of the introduction of the Automatic Workload Repository? (Choose all that apply.)

A.BACKGROUND_DUMP_DEST

B.FOREGROUND_DUMP_DEST

C.CORE_DUMP_DEST

D.USER_DUMP_DEST

E.DIAGNOSTIC_DEST

F.All of the above

2.Which of the following statements is true regarding the initialization parameter

DIAGNOSTIC_DEST?

A.The default value is the value of the environment variable $ORACLE_HOME; if $ORACLE_HOME isn’t set, then the default is set to $ORACLE_BASE.

B.The default value is the value of the environment variable $ORACLE_BASE; if $ORACLE_BASE isn’t set, then it is set to $ORACLE_HOME.

C.DIAGNOSTIC_DEST is always equal to $ORACLE_HOME.

D.DIAGNOSTIC_DEST is always equal to $ORACLE_BASE.

3.Which of these formats represents the correct hierarchy for the ADR?

A.<diagnostic_dest>/rdbms/diag/<dbname>/<instname>

B.<diagnostic_dest>/diag/rdbms/<instname>/<dbname>

C.<diagnostic_dest>/diag/rdbms/<dbname>/<instname>

D.None of the above

4.Which of the following are not fundamental tasks of the Support Workbench? (Choose all that apply.)

A.View long-running SQL workloads

B.View problem details

C.Gather additional diagnostic information

D.Create a Service Request

E.Clean up incident data after upload to Oracle Support

448  Chapter 10  n  Diagnosing the Database and Managing Performance

5.Which of the following tasks does the tool Incident Packaging Service (IPS) perform?

A.Cleans up the ADR by deleting files not associated with an incident uploaded to Oracle Support.

B.Identifies all files associated with a critical error and adds them to a zip file to be sent to Oracle Support.

C.Automatically opens a Service Request with Oracle Support for each critical error and sends all relevant files.

D.Displays a high-level view of critical errors on the database home page.

6.Choose the correct order to package and upload data for an incident to Oracle Support.

A.Schedule, create new package, view manifest, view contents

B.Create new package, view manifest, view contents, schedule

C.Schedule, create new package, view contents, view manifest

D.Create new package, view contents, view manifest, schedule

E.None of the above.

7.Which of the following is not an advantage of block media recovery (BMR)?

A.Reduced MTTR.

B.Datafiles remain offline while corrupt blocks are repaired.

C.Datafiles remain online while corrupt blocks are repaired.

D.A and C

8.Which of the following methods can be used to detect block corruption?

A.ANALYZE operations

B.dbv

C.SQL queries that access the potentially corrupt block

D.RMAN

E.All of the above

9.Which of the following are correct about block media recovery? (Choose all that apply.)

A.Physical and logical block corruption is recorded automatically in V$DATABASE_BLOCK_ CORRUPTION.

B.Logical corruptions are repairable by BMR.

C.Physical corruptions are repairable by BMR.

D.RMAN can use any backup for a BMR restore.

E.ARCHIVELOG mode is not required if you have both a full and incremental backup for restore.

Review Questions 

449

10.While querying the EMPLOYEES table, you receive an ORA-01578 message indicating block corruption in File# 1201 and Block# 1968. You analyze the table and the corruption is verified. Which RMAN command do you use to perform BMR and repair the corrupt block?

A.RECOVER FILE=1201 BLOCK=1968;

B.RECOVER CORRUPTION LIST;

C.RECOVER DATAFILE 1201 BLOCK 1968;

D.RECOVER BLOCK CORRUPTION LIST;

E.None of the above

11.To view the results of the most recent Automatic SQL Tuning Advisor task, which sequence should you follow?

A.EM Database home page, Software and Support, SQL Advisors, Automatic SQL Tuning Advisor.

B.EM Database home page, Software and Support, Advisor Central, SQL Advisors, Automatic SQL Tuning Advisor.

C.EM Database home page, Software and Support, Support Workbench, Advisor Central, SQL Advisors, Automatic SQL Tuning Advisor.

D.Either B or C.

E.All of the above

12.When creating a SQL tuning set, which of the following steps allows the DBA to reduce the size of the SQL set by selecting specific operators and values?

A.Filter versions

B.Filter loads

C.Filter tasks

D.Filter options

13.To view the results of a manual SQL Tuning Advisor task, which steps should the DBA take?

A.From the Advisor Central home page, select the tuning task from the Advisor Tasks section.

B.From Advisor Central, choose SQL Advisors, SQL Tuning Advisors, Manual Tuning Task Results.

C.From Advisor Central, choose SQL Advisors, Manual SQL Tuning Advisors, Tuning Task Results.

D.Either B or C.

14.Which of these appropriately describes the results of a manual SQL Tuning Advisor task?

A.A list of SQL statements and recommendations for tuning

B.A list of SQL statements that have been tuned by the Advisor, with before and after metrics

C.Graphs showing the actual performance improvement made by the Advisor after it implemented the recommended changes

D.All of the above

450  Chapter 10  n  Diagnosing the Database and Managing Performance

15.Which of the following is a potential performance tuning recommendation from the SQL Access Advisor?

A.Create new indexes.

B.Modify existing indexes.

C.Implement partitioning on a nonpartitioned table.

D.Create materialized views.

E.All of the above

16.Which statement most accurately describes the implementation of a SQL Access Advisor recommendation?

A.SQL Access Advisor recommendations are automatically implemented.

B.Individual SQL Access Advisor recommendations can be scheduled for implementation.

C.All SQL Access Advisor recommendations for a specific task must be implemented at the same time.

D.SQL Access Advisor recommendations are automatically scheduled for implementation during the maintenance window.

E.None of the above.

17.Which of the following represents the correct sequence of events for Database Replay?

A.Capture, analyze, preprocess, replay

B.Capture, preprocess, analyze, replay

C.Capture, preprocess, replay, analyze

D.Analyze, capture, preprocess, replay

E.None of the above

18.Which of these recommendations should be followed before capturing a workload? (Choose all that apply.)

A.Make sure your replay database has the same structure as the capture database, except without data.

B.Make sure the replay and capture databases are similar in data content.

C.Perform a clean shutdown and restart of the capture database before beginning a workload capture.

D.Start the capture database in UNRESTRICTED mode, then start the capture.

E.Define inclusion and exclusion filters.

Review Questions 

451

19.Which is true concerning Database Replay in an Oracle Real Application Cluster (RAC) database?

A.Workload capture is per instance.

B.You only need to restart one instance to begin workload capture.

C.Specifically in RAC, you shut down all instances, restart them individually, and begin workload capture with the last instance started.

D.RAC does not support workload capture, but it does support workload replay.

E.None of the above.

20.Performance divergence indicated in the Workload Replay report is most likely due to what?

A.DML and SQL statement results that do not match between the capture and replay systems

B.When errors that occur in the capture system don’t occur in the replay system

C.Top SQL statements

D.Infrastructure or system-configuration differences

E.Time-of-day differences between capture and replay systems

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