AUM Common Analysis/Diagnostic Scripts (Doc ID 877613.1)
AUM Common Analysis/Diagnostic Scripts (Doc ID 877613.1)
In this Document
Applies to:Oracle Database - Enterprise Edition - Version 10.1.0.5 to 11.2.0.4 [Release 10.1 to 11.2]Information in this document applies to any platform. PurposeThis article is intended to standardize the use of scripts to diagnose and analyze ORA-1555 errors.. This article is intended for all Database Administrators and Oracle Support Analysts Requirements
The scripts below can be run in SQL*Plus or iSQL*Plus. Many of the scripts require DBA privileges in the database. Configuring
See the remarks with each script to determine if there are changes indicated for specific configuration / application environments. InstructionsFor the scripts below, it is important to use an administrative database user account that is able to access DBA* and V$ tables. By default, these scripts log in like
$ sqlplus /nolog Caution
This sample code is provided for educational purposes only, and is not supported by Oracle Support. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.
Sample Code
The scripts used to investigate an ORA-1555 error can differ from Oracle release to release. These scripts are focused on those environments configured for Automatic UNDO Management (AUM). LobData.sql -- spools to lobdata.out at the default directory location. Sample Output
1. Configuration
############## RUNTIME ##############
Run Time ----------------- 05-Aug-2009 08:53 ############## DATAFILES ############## Aut TBSP Name File # Bytes Alloc (MB) Max Bytes Used (MB) (MB) Ext ------------------------------ ------ ------------------------- ------------------------------------ ------ SMALLUNDO 3 200 200 YES
Review the data on configuration. Is AUTOEXTEND on? If the UNDO tablespace is configured to grow automatically with demand for space, this can influence the database to not reuse expired Undo extents beyond Retention settings to decrease chances of ORA-1555. Instead the tablespace will continue to grow with new demand.
############## RUNTIME ##############
Run Time ----------------- 05-Aug-2009 08:56 ############## PARAMETERS ############## Instance # Parameter Session Value Instance Value -------------- ----------------------------------- ------------------------- ------------------------- 1 _smu_debug_mode 33554432 33554432 1 _undo_autotune TRUE TRUE 1 undo_management AUTO AUTO 1 undo_retention 900 900 1 undo_tablespace SMALLUNDO SMALLUNDO
Review parameter settings that are affecting Undo Retention rules.
############## RUNTIME ##############
Run Time -------------------------- 05-Aug-2009 08:58 ############## IN USE Undo Data ############## PCT_INUSE ---------------- 23.625 TABLESPACE_NAME EXTENT_MAN ALLOCATIO SEGMEN RETENTION --------------------------------- ------------------------ ---------------------- ---------------- ----------------- SMALLUNDO LOCAL SYSTEM MANUAL NOGUARANTEE Sum of Free ---------------- 65,536 Total Bytes ---------------- 209,715,200 ############## UNDO SEGMENTS ############## Status Total Extents ------------------ ----------------- UNEXPIRED 21 EXPIRED 807 ACTIVE 195 ------------- sum 1,023 Status Total Segments -------------------- ------------------- ONLINE 11 ------------- sum 11
############## RUNTIME ##############
Run Time ----------------- 19-Aug-2009 09:43 ############## Current Uncommitted Transactions ############## Started User Undo Segment Name File # Block # Status KBytes Rows ------------ --------- ------------------------------------- ------------ -------------- -------------- ------------- ---------- 08/19/09 KEN _SYSSMU8_1245875459$ 3 9735 ACTIVE 48,664 614,178 09:43:02 Review uncommitted transactions. How big is the transaction? What user is processing the transaction? Does this show up as uncommitted over time? Is that expected? Any long running query started prior to this transaction or using Flashback functionality to a time prior to this transaction will have to build old "copies" of this data.
3. Historical UNDO Information
############## RUNTIME ##############
Run Time ----------------- 05-Aug-2009 09:08 ############## HISTORICAL DATA ############## Max Concurrent Last 7 Days -------------------- 5 Max Concurrent Since Startup ----------------------- 5 1555 Errors --------------- 0 Undo Space Errors ------------------------- 0 ############## CURRENT STATUS OF SEGMENTS ############## ############## SNAPSHOT IN TIME INFO ############## ##############(SHOWS CURRENT UNDO ACTIVITY)############## Segment Name Active Bytes Unexpired Bytes Expired Bytes ----------------------------------- --------------------- ---------------------- -------------------- _SYSSMU10_1245875459$ 0 1,114,112 65,536 _SYSSMU1_1245875459$ 0 3,211,264 75,497,472 _SYSSMU2_1245875459$ 0 196,608 65,536 _SYSSMU3_1245875459$ 0 1,507,328 55,115,776 _SYSSMU4_1245875459$ 43,253,760 0 0 _SYSSMU5_1245875459$ 0 1,048,576 19,922,944 _SYSSMU6_1245875459$ 0 327,680 0 _SYSSMU7_1245875459$ 0 1,114,112 65,536 _SYSSMU8_1245875459$ 0 458,752 4,849,664 _SYSSMU9_1245875459$ 0 1,179,648 65,536 10 rows selected. ############## UNDO SPACE USAGE ############## Segment# Shrinks Avg Shrink Size ----------------- ------------- ----------------------- 0 0 0 1 5 2,424,832 2 5 1,402,470 3 6 2,457,600 4 2 425,984 5 4 1,638,400 6 4 1,523,712 7 2 1,048,576 8 5 2,031,616 9 1 2,621,440 10 2 1,114,112 11 rows selected.
############## RUNTIME ##############
Run Time ----------------- 05-09:08 ############## Historical V$UNDOSTAT (Last 2 Days) ############## Query Maximum Undo # of Tuned Ret Date/Time Minutes SqlID TBS Blocks Trans # of Unexpired # of Expired Minutes ------------- ------------- -------------------- ----------- --------- ---------- --------------------- ---------------- --------------- 03-09:15 14 0rc4km05kgzb9 14 39 160 312 25,024 29 03-09:25 4 0rc4km05kgzb9 14 36 220 312 25,024 43 03-09:35 14 0rc4km05kgzb9 14 327 200 8 25,024 43 03-09:45 4 0rc4km05kgzb9 14 20 202 464 24,896 29 . . . 05-08:37 1 0rc4km05kgzb9 14 22 195 80 25,344 15 05-08:47 12 0rc4km05kgzb9 14 35 216 48 25,376 15 05-08:57 2 0rc4km05kgzb9 14 33 183 56 25,368 15 284 rows selected. ############## RECENT MISSES FOR UNDO (Last 2 Days) ############## no rows selected no rows selected ############## AUTO-TUNING TUNE-DOWN DATA ############## ############## ROLLBACK DATA (Since Startup) ############## Name Counters ------------------------------------------------------------------------------------- ------------ user rollbacks 4,959 transaction tables consistent reads - undo records applied 3 transaction tables consistent read rollbacks 0 data blocks consistent reads - undo records applied 300,730 rollbacks only - consistent read gets 11,384 cleanouts and rollbacks - consistent read gets 39 rollback changes - undo records applied 18,529 transaction rollbacks 190 total number of undo segments dropped 0 tune down retentions in space pressure 0 global undo segment hints helped 1 global undo segment hints were stale 0 local undo segment hints helped 0 local undo segment hints were stale 0 undo segment header was pinned 90,532 IMU CR rollbacks 6,183 SMON posted for undo segment recovery 0 SMON posted for undo segment shrink 0 18 rows selected. ############## Long Running Query History ############## Date SQL ID Runaway SQL ID Space Issues -------------------- ---------------------- ----------------------------------------- ------------------------------------------------ 02-19:05 0rc4km05kgzb9 Max Tuned Down - Not Auto-Tuning 02-19:15 0rc4km05kgzb9 Reached Best Retention 02-19:25 0rc4km05kgzb9 Reached Best Retention 02-19:35 0rc4km05kgzb9 Reached Best Retention 02-19:45 0rc4km05kgzb9 Reached Best Retention ############## Details on Long Run Queries ############## SQL ID SQL Text Last Load Elapsed Days ---------------------- --------------------------------------------------------------------------------- -------------------------- ------------------ 0rc4km05kgzb9 select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 2009-08-04/13:30:06 19
############## RUNTIME ##############
Run Time ----------------- 05-08:58 ############## WAITS FOR UNDO (Since Startup) ############## Cummalitve Instance# Enq Total Requests Total Waits Successes Failures Time ------------- ------ -------------------- ---------------- ------------------------ --------------- ------------------ 1 HW 2,104 0 2,104 0 0 1 US 58 0 58 0 0 ############## LOCKS FOR UNDO ############## no rows selected ############## TUNED RETENTION HISTORY (Last 2 Days) ############## ############## LOWEST AND HIGHEST DATA ############## END_TIME TUNED_UNDORETENTION ----------------- -------------------------------------- 05-08:58 900 05-08:57 900 05-08:37 900 05-07:17 900 05-04:17 900 05-03:57 900 05-03:37 900 05-02:57 900 05-02:37 900 05-02:17 900 05-01:17 900 11 rows selected. END_TIME TUNED_UNDORETENTION ----------------- ------------------------------------- 04-17:57 2227 ############## CURRENT TRANSACTIONS ############## START_DATE START_SCN STATUS SQL Code --------------------- ------------------ ---------------- ---------------------------------------- 05-08:58 53717782 ACTIVE update abc_tmp set edition_name='' CURRENT_SCN --------------------- 53734654 ############## WHO'S STEALING WHAT? (Last 2 Days) ############## UnexStolen ExStolen UnexReuse ExReuse --------------- ------------ --------------- ----------- 0 22 0 0 0 12 0 0
5. Investigate LOBs Issues Sample lobdata.out
Table Column Tablespace PCTVersion % Retention
------------------ ---------------------------------------------- -------------------- -------------------- ------------- CTEST DATA_OBJECT TB1 900 PAA_TEST RESPONDER_COMMENT TB1 900 EMP_O PICTURE USERS 10 EMP_O RESUME USERS 10 TEST COMMENTS TB1 900 5 rows selected. LOBs and ORA-1555 are expected if the LOB data is being updated regularly. PCTVersion is by default 10% and if you do any changes to the LOB data over time, this will usually have to be much higher. Sometimes 100% (where all changes are retained) is not enough to accommodate workload. Normal diagnostics / analysis for ORA-1555 is not useful with LOB related ORA-1555 errors. The UNDO is not allocated to extents in the UNDO tablespace, but is maintained in the LOB tablespace. ReferencesNOTE:1579035.1 - Script - Check Current Undo Configuration and Advise Recommended Setup |
|
|
- Various Undo diagnostics scripts(12.09 KB)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1340441/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Common Diagnostic Scripts for AUM problems (Doc ID 746173.1)
- SQLT Diagnostic Tool (Doc ID 215187.1)SQL
- Remote Diagnostic Agent (RDA) - RAC Cluster Guide (Doc ID 359395.1)REMGUIIDE
- Remote Diagnostic Agent (RDA) - Getting Started (Doc ID 314422.1)REM
- ashdump* scripts and post-load processing of MMNL traces (Doc ID 555303.1)
- Amandroid - Argus static analysis frameworkAndroidFramework
- 修改vip (Doc ID 276434.1)
- oracle10g之AUMOracle
- SQLChop、SQLWall(Druid)、PHP Syntax Parser AnalysisSQLUIPHP
- shell scripts
- Sql scriptsSQL
- HANGFG User Guide (Doc ID 362094.1)GUIIDE
- How to Prepare Storage for ASM (Doc ID 452924.1)ASM
- Android4 Source Analysis - Root-ExternalAndroid
- Oracle DBA ScriptsOracle
- Tuning Scripts
- Data Server ScriptsServer
- Android Studio--》Gradle Scripts配置說明AndroidGradle
- RISK ANALYSIS
- Android開發簡單教程.docAndroid
- Oracle Text Health Check (Doc ID 823649.1)Oracle
- The DBMS_SUPPORT Package (Doc ID 62294.1)Package
- DBMS_REPAIR example (Doc ID 68013.1)AI
- Overview of Parameter Reference Notes (Doc ID 68462.1)View
- Linux OS Service 'ntpd' (Doc ID 551704.1)Linux
- Remote Diagnostic Agent (RDA) 4 - Getting Started [ID 314422.1]REM
- 神奇的npm -- scriptsNPM
- 清理日誌 scripts
- dba_dependencies scripts
- Rman Scripts (Linux)Linux
- oracle cold backup scriptsOracle
- DP rman backup scripts
- Oracle 最新PSU (Doc ID 2118136.2)Oracle
- Backup and Recovery Scenarios (Doc ID 94114.1)iOS
- * Master Note: Database Performance Overview (Doc ID 402983.1)ASTDatabaseORMView
- HP-UX: Asynchronous i/o (Doc ID 139272.1)UX
- Troubleshooting Database Hang Issues (Doc ID 1378583.1)Database
- No Response from the Server, Does it Hang or Spin? (Doc ID 68738.1)Server