![Page 1: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/1.jpg)
Análise de Relatórios AWR / Statspack9iR2 a 12cR1Este PDF está disponível em http://nervinformatica.com.br/A.pdf
Ricardo Portilho [email protected]
Esta obra está licenciada sob a licençaCreative Commons Atribuição-SemDerivados 3.0 Brasil.Para ver uma cópia desta licença, visite http://creativecommons.org/licenses/by-nd/3.0/br/.
![Page 2: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/2.jpg)
2
AWR != Relatório AWR
![Page 3: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/3.jpg)
3
Evolução do Statspack / AWR
![Page 4: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/4.jpg)
4
Evolução do (BSTAT - ESTAT) / Statspack / AWR
![Page 5: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/5.jpg)
5
Custo do AWR
![Page 6: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/6.jpg)
6
Custo do AWR
Parâmetro CONTROL_MANAGEMENT_PACK_ACCESSNONEDIAGNOSTIC (AWR, ADDM, etc.)DIAGNOSTIC+TUNING (SQL Tuning Advisor, SQLAccess Advisor, etc) DEFAULT
A license for DIAGNOSTIC is required for enabling the TUNING pack.
![Page 7: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/7.jpg)
7
Custo do AWR
http://www.oracle.com/us/corporate/pricing/price-lists/index.html
![Page 8: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/8.jpg)
8
Statspack
![Page 9: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/9.jpg)
9
Instalação$ sqlplus / AS SYSDBA– - Em 12c com CDB, execute: alter session set "_oracle_script"=true;SQL> @?/rdbms/admin/spcreate.sqlEnter value for perfstat_password: Nerv2017Enter value for default_tablespace: SYSAUXEnter value for temporary_tablespace: TEMP
Desinstalação$ sqlplus / AS SYSDBASQL> @?/rdbms/admin/spdrop.sql
Statspack
![Page 10: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/10.jpg)
10
Job de Coleta de Snapshots$ sqlplus PERFSTAT/Nerv2017SQL> @?/rdbms/admin/spauto.sql
Ajuste de nível de coleta$ sqlplus PERFSTAT/Nerv2017SQL> SELECT SNAP_LEVEL, DESCRIPTION FROM STATS$LEVEL_DESCRIPTION ORDER BY SNAP_LEVEL;SQL> EXECUTE STATSPACK.MODIFY_STATSPACK_PARAMETER(i_snap_level => 7);
Snapshots avulsos$ sqlplus PERFSTAT/Nerv2017SQL> EXECUTE STATSPACK.SNAP;
Statspack
![Page 11: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/11.jpg)
11
Remoção de Snapshots$ sqlplus PERFSTAT/Nerv2017SQL> @?/rdbms/admin/sppurge.sqlEnter value for losnapid: 3Enter value for hisnapid: 4
Automação de Remoção de Snapshotscolumn min_snap_id new_val LoSnapIdcolumn max_snap_id new_val HiSnapIdselect min(s.snap_id) min_snap_id, max(s.snap_id) max_snap_id from stats$snapshot s , stats$database_instance di where s.dbid = :dbid and di.dbid = :dbid and s.instance_number = :inst_num and di.instance_number = :inst_num and di.startup_time = s.startup_time and s.snap_time < sysdate-30;
---- Post warning
Statspack
![Page 12: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/12.jpg)
12
Extração do Relatório Statspack$ sqlplus PERFSTAT/Nerv2017SQL> @?/rdbms/admin/spreport.sqlEnter value for begin_snap: 3Enter value for end_snap: 4Enter value for report_name: Teste01$ vi Teste01.lst
Extração do Relatório Statspack – SQLSTATS$SQL_PLAN / STATS$SQL_PLAN_USAGE$ sqlplus PERFSTAT/Nerv2017SQL> @?/rdbms/admin/sprepsql.sqlEnter value for begin_snap: 3Enter value for end_snap: 4Enter value for hash_value: 532522188Enter value for report_name: SQL01$ vi SQL01.lst
Statspack
![Page 13: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/13.jpg)
13
Gerenciamento do AWR
![Page 14: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/14.jpg)
14
Gerenciamento do AWR
Parâmetro CONTROL_MANAGEMENT_PACK_ACCESSNONEDIAGNOSTIC (AWR, ADDM, etc.)DIAGNOSTIC+TUNING (SQL Tuning Advisor, SQLAccess Advisor, etc) DEFAULT
Parâmetro TIMED_STATISTICStrue DEFAULTfalse
Parâmetro STATISTICS_LEVELBASICTYPICAL DEFAULTALL
![Page 15: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/15.jpg)
15
Gerenciamento do AWRParâmetro STATISTICS_LEVEL = TYPICAL● Automatic Workload Repository (AWR) Snapshots● Automatic Database Diagnostic Monitor (ADDM)● All server-generated alerts● Automatic SGA Memory Management● Automatic optimizer statistics collection● Object level statistics● End to End Application Tracing (V$CLIENT_STATS)● Database time distribution statistics (V$SESS_TIME_MODEL and V$SYS_TIME_MODEL)● Service level statistics● Buffer cache advisory● MTTR advisory● Shared pool sizing advisory● Segment level statistics● PGA Target advisory● Timed statistics● Monitoring of statistics
Parâmetro STATISTICS_LEVEL = ALL● Timed statistics● Timed OS statistics● Plan execution statistics
![Page 16: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/16.jpg)
16
Snapshot avulso$ sqlplus / AS SYSDBASQL> EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT;
Alteração de intervalo de coleta e retenção$ sqlplus / AS SYSDBASQL> EXEC DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS
(RETENTION=>86400,INTERVAL=>30,TOPNSQL=>100);
Gerenciamento do AWR
![Page 17: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/17.jpg)
17
Criação de Baseline$ sqlplus / AS SYSDBASQL> EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE(
START_SNAP_ID => 2600,END_SNAP_ID => 2680,BASELINE_NAME => 'BEFORE MIGRATION',EXPIRATION => 365);
Remoção de Baseline$ sqlplus / AS SYSDBASQL> EXEC DBMS_WORKLOAD_REPOSITORY.DROP_BASELINE
(BASELINE_NAME => 'BEFORE MIGRATION',CASCADE => FALSE);
Gerenciamento do AWR
![Page 18: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/18.jpg)
18
Automatic Workload Repository ViewsDBA_HIST_WR_CONTROLDBA_HIST_SNAPSHOTDBA_HIST_DATABASE_INSTANCEDBA_HIST_DB_CACHE_ADVICEDBA_HIST_DYN_REMASTER_STATSDBA_HIST_IOSTAT_DETAILDBA_HIST_SQL_PLAN
DBA_HIST_ACTIVE_SESS_HISTORYV$ACTIVE_SESSION_HISTORY
DBA_HIST_DISPATCHDBA_HIST_SHARED_SERVER_SUMMARY
DBA_HIST_BASELINEDBA_HIST_BASELINE_DETAILS DBA_HIST_BASELINE_TEMPLATE
Gerenciamento do AWR
![Page 19: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/19.jpg)
19
Scripts AWR
![Page 20: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/20.jpg)
20
AWR Report@?/rdbms/admin/awrrpt.sqlEnter value for report_type: htmlEnter value for num_days: 1Enter value for begin_snap: 40Enter value for end_snap: 41Enter value for report_name: AWR_01.html
AWR Report (Specific Database Instance)@$ORACLE_HOME/rdbms/admin/awrrpti.sql
Oracle RAC AWR Report@$ORACLE_HOME/rdbms/admin/awrgrpt.sql
Oracle RAC AWR Report (Specific Database Instance)@$ORACLE_HOME/rdbms/admin/awrgrpti.sql
Scripts AWR
![Page 21: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/21.jpg)
21
AWR Information@?/rdbms/admin/awrinfo.sqlEnter value for report_name: awrinfo.txt
Extracting AWR Data@?/rdbms/admin/awrextr.sqlEnter value for dbid: 1442122872Enter value for num_days: 7Enter value for begin_snap: 2622Enter value for end_snap: 2780Enter value for directory_name: DATA_PUMP_DIREnter value for file_name: awrdat_2622_2780
Loading AWR Data@?/rdbms/admin/awrload.sqlInforme o valor para directory_name: BACKUPInforme o valor para file_name: awrdat_2622_2780Informe o valor para schema_name: C##AWR_STAGEInforme o valor para default_tablespace: SYSAUXInforme o valor para temporary_tablespace: TEMP
Scripts AWR
![Page 22: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/22.jpg)
22
AWR Information
![Page 23: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/23.jpg)
23
AWR Warehouse
![Page 24: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/24.jpg)
24
Oracle RAC AWR Report
![Page 25: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/25.jpg)
25
AWR Compare Periods Report@$ORACLE_HOME/rdbms/admin/awrddrpt.sqlEnter value for report_type: htmlEnter value for num_days: 2Enter value for begin_snap: 33Enter value for end_snap: 34Enter value for num_days2: 1Enter value for begin_snap2: Enter value for end_snap2: 56Enter value for report_name: AWR_DIFF_01.html
AWR Compare Periods Report (Specific Database Instance)@$ORACLE_HOME/rdbms/admin/awrddrpi.sql
Oracle RAC AWR Compare Periods Report@$ORACLE_HOME/rdbms/admin/awrgdrpt.sql
Oracle RAC AWR Compare Periods Report (Specific Database Instance)@$ORACLE_HOME/rdbms/admin/awrgdrpi.sql
Scripts AWR
![Page 26: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/26.jpg)
26
AWR Compare Periods Report
![Page 27: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/27.jpg)
27
SQL Statement@$ORACLE_HOME/rdbms/admin/awrsqrpt.sqlEnter value for report_type: htmlEnter value for num_days: 1Enter value for begin_snap: 40Enter value for end_snap: 41Enter value for sql_id: 062savj8zgzutEnter value for report_name: AWR_SQL_01.html
SQL Statement (Specific Database Instance)@$ORACLE_HOME/rdbms/admin/awrsqrpi.sql
Scripts AWR
![Page 28: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/28.jpg)
28
SQL Statement
![Page 29: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/29.jpg)
29
SQL Statement
DISPLAY AWRSQL> SELECT SQL_ID, SQL_TEXT FROM DBA_HIST_SQLTEXT
WHERE SQL_TEXT LIKE '%SELECT ENAME FROM EMP%';SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_AWR('a10jnjwd22gs8'));
TOP N SQLSQL> EXEC DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS
(RETENTION=>86400,INTERVAL=>30,TOPNSQL=>100);
Colored SQLSQL> EXEC DBMS_WORKLOAD_REPOSITORY.ADD_COLORED_SQL('az9p3ctumhpr8');SQL> EXEC DBMS_WORKLOAD_REPOSITORY.REMOVE_COLORED_SQL('az9p3ctumhpr8');
![Page 30: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/30.jpg)
30
Automatic Database Diagnostic Monitor (ADDM)SQL> @$ORACLE_HOME/rdbms/admin/addmrpt.sqlEnter value for begin_snap: 51Enter value for end_snap: 52Enter value for report_name: ADDM_01.txt
Scripts AWR
![Page 31: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/31.jpg)
31
ADDM
![Page 32: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/32.jpg)
32
Active Session History Reports@$ORACLE_HOME/rdbms/admin/ashrpt.sqlEnter value for report_type: htmlEnter value for begin_time: -30Enter value for duration: 10Enter value for report_name: ASH_01.html
Oracle RAC Active Session History Reports@$ORACLE_HOME/rdbms/admin/ashrpti.sql
Scripts AWR
![Page 33: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/33.jpg)
33
Active Session History Reports (Specific Database Instance)@$ORACLE_HOME/rdbms/admin/ashrpti.sqlEnter value for report_type: htmlEnter value for dbid: 1383175475Enter value for inst_num: 1Enter value for begin_time: Enter value for begin_time: -30Enter value for duration: 10Enter value for slot_width: 30Enter value for target_session_id: Enter value for target_sql_id: Enter value for target_wait_class: Enter value for target_service_hash: Enter value for target_module_name: Enter value for target_action_name: Enter value for target_client_id: Enter value for target_plsql_entry: Enter value for target_container: Enter value for report_name: ASH_SID666_01.html
Scripts AWR
![Page 34: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/34.jpg)
34
ASH Report
![Page 35: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/35.jpg)
35
ASH Report
![Page 36: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/36.jpg)
36
Método de Tuning com AWR
![Page 37: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/37.jpg)
37
Passo 0: Ver o que o AWR não vê.Identificar os detalhes da infraestrutura do ambiente fora do escopo da instância.
Passo 1: Definir Escopo (ADDM → AWR → ASH → SQL).Utilizar o menor escopo possível, de acordo com o problema informado pelo cliente.
Passo 2: Analisar Cabeçalho.Conhecer o ambiente (Passo 0) e o escopo (Passo 1) analisado. A partir do tempo analisado, define-se a gravidade do tempo afetado. Utilizar as estatísticas de carga em caso de comparação de períodos ou ambientes.
Passo 3: Analisar Time Model.Definir a eficiência do ambiente, e se é necessário Tuning de Instância / Banco ou não.
Método de Tuning com AWR
![Page 38: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/38.jpg)
38
Passo 4: Identificar Wait Events agressoresDefinir os Wait Events relevantes, agressores do tempo penalizador da eficiência (Passo 3), analisando em conjunto de tipo (Foreground e Background), agrupando por causa.
Passo 5: Analisar Acessórios dos Wait Events De acordo com os Wait Events relevantes definidos (Passo 4), encontrar nas seções acessórias do relatório as causas associadas, levando em conta o escopo de tempo analisado (Passo 2).
Passo 6: Analisar ParâmetrosIdentificar agravantes, atenuantes e oportunidades dos parâmetros relacionadas aos Wait Events agressores (Passo 4).
Passo 7: Definir correções e ganhos.De acordo com o tempo identificado dos Wait Events relevantes (Passo 4) e as soluções encontradas e possíveis (Passo 5), levando em conta os parâmetros (Passo 6) e ambiente (Passo 0) definir o tempo ganho, e portanto o ROI do cliente.
Método de Tuning com AWR
![Page 39: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/39.jpg)
39
Seções do AWR
![Page 40: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/40.jpg)
40
Seções do AWR: CabeçalhoPasso 2: Analisar Cabeçalho.Conhecer o ambiente (Passo 0) e o escopo (Passo 1) analisado. A partir do tempo analisado, define-se a gravidade do tempo afetado. Utilizar as estatísticas de carga em caso de comparação de períodos ou ambientes.
![Page 41: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/41.jpg)
41
Seções do AWR: Eficiência
Passo 3: Analisar Time Model.Definir a eficiência do ambiente, e se é necessário Tuning de Instância / Banco ou não.
![Page 42: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/42.jpg)
42
Seções do AWR: CargaPasso 2: Analisar Cabeçalho.Conhecer o ambiente e o escopo analisado. A partir do intervalo analisado, define-se a gravidade do tempo afetado. Utilizar as estatísticas de carga em caso de comparação de períodos.
![Page 43: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/43.jpg)
43
Seções do AWR: CargaPasso 2: Analisar Cabeçalho.Conhecer o ambiente e o escopo analisado. A partir do intervalo analisado, define-se a gravidade do tempo afetado. Utilizar as estatísticas de carga em caso de comparação de períodos.
![Page 44: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/44.jpg)
44
Seções do AWR: Wait EventsPasso 4: Identificar Wait Events agressoresDefinir os Wait Events relevantes, agressores do tempo penalizador da eficiência (Passo 3), analisando em conjunto de tipo (Foreground e Background), agrupando por causa.
![Page 45: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/45.jpg)
45
Seções do AWR: Wait EventsPasso 4: Identificar Wait Events agressoresDefinir os Wait Events relevantes, agressores do tempo penalizador da eficiência (Passo 3), analisando em conjunto de tipo (Foreground e Background), agrupando por causa.
![Page 46: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/46.jpg)
46
Seções do AWR: Seções AcessóriasPasso 5: Analisar Acessórios dos Wait Events De acordo com os Wait Events relevantes definidos (Passo 4), encontrar nas seções acessórias do relatório as causas associadas, levando em conta o escopo de tempo analisado (Passo 2).
![Page 47: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/47.jpg)
47
Seções do AWR: Seções Acessórias
Passo 5: Analisar Acessórios dos Wait Events De acordo com os Wait Events relevantes definidos (Passo 4), encontrar nas seções acessórias do relatório as causas associadas, levando em conta o escopo de tempo analisado (Passo 2).
![Page 48: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/48.jpg)
48
Seções do AWR: ParâmetrosPasso 6: Analisar ParâmetrosIdentificar agravantes, atenuantes e oportunidades dos parâmetros relacionados aos Wait Events agressores (Passo 4).
![Page 49: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/49.jpg)
49
Cálculo do ROIPasso 7: Definir correções e ganhos.De acordo com o tempo identificado dos Wait Events relevantes (Passo 4) e as soluções encontradas e possíveis (Passo 5), levando em conta os parâmetros (Passo 6) e ambiente (Passo 0) definir o tempo ganho, e portanto o ROI do cliente.
![Page 50: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/50.jpg)
50
Cálculo do ROI
Passo 7: Definir correções e ganhos.De acordo com o tempo identificado dos Wait Events relevantes (Passo 4) e as soluções encontradas e possíveis (Passo 5), levando em conta os parâmetros (Passo 6) e ambiente (Passo 0) definir o tempo ganho, e portanto o ROI do cliente.
![Page 51: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/51.jpg)
51
Cálculo do ROIPasso 7: Definir correções e ganhos.De acordo com o tempo identificado dos Wait Events relevantes (Passo 4) e as soluções encontradas e possíveis (Passo 5), levando em conta os parâmetros (Passo 6) e ambiente (Passo 0) definir o tempo ganho, e portanto o ROI do cliente.
![Page 52: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/52.jpg)
52
Cálculo do ROIPasso 7: Definir correções e ganhos.De acordo com o tempo identificado dos Wait Events relevantes (Passo 4) e as soluções encontradas e possíveis (Passo 5), levando em conta os parâmetros (Passo 6) e ambiente (Passo 0) definir o tempo ganho, e portanto o ROI do cliente.
![Page 53: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/53.jpg)
53
Wait Events – Causas e Correções
![Page 54: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/54.jpg)
54
Leituradb file scatteread read / db file sequential read / direct path read / db file parallel readfree buffer / buffer busy / read by oher session latch: cache buffers chains / latch: cache buffers lru chaingc cr request / gc buffer busy / gc buffer busy acquire / gc buffer busy release
Gravação control file single write / control file parallel write / control file sequential readdb file single write / db file parallel writedirect path write
Gravação LGRWlog buffer spacelog file parallel write / log file single write / log file sequential readlog file switch (checkpoint incomplete) / log file switch completionlog file switch (archiving needed)log file sync
Wait Events: Causas similares
![Page 55: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/55.jpg)
55
Design / Concorrência / Troubleshootingenqueue: TXenqueue: TMenqueue: HWenqueue: SQenqueue: CFfree buffer / buffer busy / read by oher sessiongc cr request / gc buffer busy / gc buffer busy acquire / gc buffer busy releaselatch: shared pool / latch: library cachelatch: cache buffers chains / latch: cache buffers lru chainlatch: row cache objects
Compilação / Concorrêncialatch free / latch: library cachelibrary cache pin / library cache lock
RedeSQL*Net message from client / SQL*Net message to clientSQL*Net more data from client / SQL*Net more data to clientSQL*Net break/reset from client / SQL*Net break/reset to client
Wait Events: Causas similares
![Page 56: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/56.jpg)
56
Leitura● Cache● DB File Multiblock Read Count● Database Writers● ASM● Directo I/O● Hugepages● Compression (OLAP Compression, OLTP Compression, InMemory)● Result Cache● Partitioning● CBO Configuration● Object Statistics● System Statistics● SQL● I/O● Active Data Guard
Correção de Wait
![Page 57: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/57.jpg)
57
Prática: Análise de Relatórios AWR
![Page 58: Análise de Relatórios AWR / Statspack 9iR2 a · PDF fileAnálise de Relatórios AWR / Statspack 9iR2 a 12cR1 ... Enter value for default_tablespace: ... TOPNSQL=>100); Gerenciamento](https://reader035.vdocuments.mx/reader035/viewer/2022062401/5aacb2b47f8b9a9c2e8d5d37/html5/thumbnails/58.jpg)
Perguntas?Este PDF está disponível em http://nervinformatica.com.br/A.pdf
Ricardo Portilho [email protected] Informática