SlideShare uma empresa Scribd logo
1 de 42
Oracle 11g:
Learning to Love the ADR
Presented by: Don Seiler
© 2012 Pythian2
Recognized Leader:
• Global industry-leader in remote database administration services and consulting for Oracle,
Oracle Applications, MySQL and SQL Server
• Work with over 150 multinational companies such as Forbes.com, Fox Sports, Nordion and
Western Union to help manage their complex IT deployments
Expertise:
• One of the world’s largest concentrations of dedicated, full-time DBA expertise. Employ 7
Oracle ACEs/ACE Directors
• Hold 7 Specializations under Oracle Platinum Partner program, including Oracle Exadata,
Oracle GoldenGate & Oracle RAC
Global Reach & Scalability:
• 24/7/365 global remote support for DBA and consulting, systems administration, special
projects or emergency response
Why Pythian
© 2012 Pythian
About Myself
• Oracle DBA since 2001
– Oracle 7.3.4 on HP-UX
• OCP 10gR2 DBA
• Joined Pythian in May 2008
• From Manitowoc, Wisconsin
• Twitter: @dtseiler
• Blog: http://www.seiler.us
4
Diagnostic Files
© 2012 Pythian5
What Are We Talking About?
●
Alert Log (RDBMS, ASM, Listener)
●
Trace Files
●
User-Generated (10046, 10053)
●
System-Generated (ORA error)
●
Core Dumps
© 2012 Pythian6
Diagnostic Files in 10g
●
$ORACLE_BASE/admin/$ORACLE_SID/
●
bdump – alert log & background trace files
●
cdump – core dump files
●
udump – user trace files (10046, 10053)
●
adump – audit files
These are defaults, overridden with %_dump_dest
parameters.
© 2012 Pythian7
Diagnostic Files in 11g
●
Automatic Diagnostic Repostory (ADR)!
●
Specified by DIAGNOSTIC_DEST
●
New initialization parameter, replaces
%_dump_dest
– If not set, defaults to ORACLE_BASE
●
If ORACLE_BASE not set, defaults to
ORACLE_HOME/log
●
First creates a “diag” directory inside its
home.
●
Check V$DIAG_INFO for location details
© 2012 Pythian
V$DIAG_INFO
SQL> select name, value from v$diag_info;
NAME VALUE
------------------------ -------------------------------------------------------
Diag Enabled TRUE
ADR Base c:oracle
ADR Home c:oraclediagrdbmsorclorcl
Diag Trace c:oraclediagrdbmsorclorcltrace
Diag Alert c:oraclediagrdbmsorclorclalert
Diag Incident c:oraclediagrdbmsorclorclincident
Diag Cdump c:oraclediagrdbmsorclorclcdump
Health Monitor c:oraclediagrdbmsorclorclhm
Default Trace File c:oraclediagrdbmsorclorcltraceorcl_ora_4084.trc
Active Problem Count 0
Active Incident Count 0
11 rows selected.
© 2012 Pythian9
What's in the ADR?
●
Product Type: asm / rdbms / tnslsnr /
clients
●
Both human-readable (trace) and XML
alert logs
●
Trace files (10046 etc. in trace directory)
●
Including SQLNet trace files
●
Incident files
●
Core dump files
© 2012 Pythian10
Disabling the ADR
●
Set hidden parameter:
alter system set "_diag_adr_enabled"=false
scope=spfile;
●
Be sure to set the old *_dump_dest
parameters
●
Not advised (obviously)!
© 2012 Pythian
Too Many Trace Files!
● First thing I noticed after upgrading to 11g!
● Can be greatly reduced with hidden
parameter:
● Set _disable_health_check = TRUE
● Don’t set in production without consulting
Oracle Support!
© 2012 Pythian12
Quick Terminology Lesson
●
Problem – A critical error in the database
(e.g. ORA-00600, 07445, 04031)
●
Incident – A single occurrence of a
problem.
●
Follows ITIL!
13
ADR Benefits & ADRCI
© 2012 Pythian14
ADRCI
$ adrci
adrci> show base;
ADR base is "/u01/app/oracle"
adrci> show homes;
ADR Homes:
diag/tnslsnr/myhost/listener
diag/asm/+asm/+ASM
diag/rdbms/mydb/mydb
adrci> set home diag/rdbms/mydb/mydb;
© 2012 Pythian
Using ADRCI to View Alert Log
● View / Tail alert log (even on Windows!)
● adrci> show alert -tail -f;
● Read from XML files.
● Results opened in text editor unless -term specified.
● View alert log contents matching patterns.
● adrci> show alert -p "message_text like '%ORA-%'" -term;
● Includes message timestamps, better than grep.
● Case-sensitive!
● Can pattern-match on any predicate field such as
host_id, user_id, originating_timestamp, etc.
© 2012 Pythian
Viewing Alert Log by Timestamp
● adrci> show alert -p "originating_timestamp >=
systimestamp-1/24" -term;
● adrci> show alert -p "message_text like '%ORA-
600%' and originating_timestamp >=
systimestamp-30" -term;
● Obvious alert log monitoring benefits!
● Requires presence of XML log files.
● Can SPOOL output to new log files.
© 2012 Pythian17
Viewing DDL in Alert Log
●
Enable DDL Logging:
alter system set enable_ddl_logging=true scope=both;
alter session set enable_ddl_logging=true;
●
View output:
adrci> show alert -p "message_text like '%DROP%'" -term;
ADR Home = c:oraclediagrdbmsorclorcl:
****************************************************************
2011-08-16 15:33:49.805000 -05:00
DROP TABLE DTS_OBJECTS2
●
Reminder: Logs and search are case-sensitive!
© 2012 Pythian18
File Maintenance
●
Alert log XML files rotated after 10M.
●
Old Alert log XML files and trace/incident
files purged depending on short or long
purge policies.
●
Trace (human-readable) alert and listener
log files not rotated or archived by Oracle.
© 2012 Pythian19
Short Purge Policy
●
adrci> show control;
●
SHORTP_POLICY
●
Value in HOURS, default is 720 (30 days)
●
Max is 35791394 (over 4000 years!)
●
Setting to 0 (zero) means all “short life”
files can be purged.
●
Trace files, core dumps, packaging info
●
set control (SHORTP_POLICY = 336);
© 2012 Pythian20
Long Purge Policy
●
LONGP_POLICY
●
Default is 8760 (365 days)
●
Same max & zero rules as
SHORTP_POLICY
●
Incident info, incident dumps, alert logs
●
set control (LONGP_POLICY = 1440);
© 2012 Pythian21
Purge Policies
●
Purge job is MMON slave task
●
Purges expired data once in 7 days
●
See MOS Doc ID 975448.1
© 2012 Pythian
Manually Purging Files
● Purge alert logs older than 1 day
● -age parameters takes minutes
adrci> purge -age 1440 -type alert;
● Purge all files associated for an incident
adrci> purge -i 12345;
● For more
adrci> help purge;
© 2012 Pythian
ADR Purging Bug!
● Bug 9500575: 11G LISTENER LOGS
LOG_XYZ.XML ARE NOT
AUTOMATICALLY PURGED
● Potential to fill up diagnostic_dest disk.
● Oracle 11.1.0.7 and 11.2.0.1
● To manually purge files older than 1 week:
– adrci> purge -age 10080 -type alert;
© 2012 Pythian24
X$DBGALERTEXT
●
External table referencing log*.xml files.
●
Effectively indexed by alert date, so date-
based queries are “efficient and
performant.” (MOS Doc ID 961682.1)
●
Has inst_id column, but not RAC-aware.
●
As of 11.2, V$DIAG_ALERT_EXT
●
Includes alerts from all ADR homes
(ASM, listeners, clients, etc.)
25
Incident Packaging Service
© 2012 Pythian26
Incident Packaging Service (IPS)
●
Creates logical “packages” for Oracle
Support based on criteria such as incident
number or timeframe.
●
Either via EM or adrci
adrci> show incident;
adrci> show problem;
adrci> show tracefile [-i 123] [-[r]t];
© 2012 Pythian
Incident Flood Control
● Flood-controlled incidents will generate an
alert log entry but not incident dumps.
● Thresholds:
● 5 incidents for the same problem key in
one hour. Will resume in the next hour.
● 25 incidents for the same problem key in
one day. Will resume in the next day.
● 50/hour or 250/day = No more incident
recording at all until hour/day expires!
© 2012 Pythian28
IPS – Creating Packages
adrci>IPS CREATE PACKAGE INCIDENT inc_number;
adrci>IPS CREATE PACKAGE PROBLEM problem_ID;
adrci>IPS CREATE PACKAGE PROBLEMKEY "problem_key";
adrci>IPS CREATE PACKAGE SECONDS sec;
adrci>IPS CREATE PACKAGE TIME 'start_time' TO 'end_time';
adrci>IPS CREATE PACKAGE;
●
Use IPS ADD INCIDENT or IPS ADD
FILE to add data to the package before
generating it.
© 2012 Pythian
IPS – Generating Package Files
● Creates a physical file from the logical
package.
adrci>IPS GENERATE PACKAGE package_number IN path
adrci>IPS GENERATE PACKAGE 1 IN /home/seiler/diagnostics
adrci>IPS SHOW FILES PACKAGE 1
● Create and generate package with one
command: IPS PACK
adrci>IPS PACK INCIDENT incident_id IN path;
adrci>IPS PACK INCIDENT 12345 IN /home/seiler/diagnostics;
30
ADRCI Scripts
© 2012 Pythian
ADRCI Scripts
● Can be called interactively a la sqlplus:
● adrci> @/home/seiler/scripts/test.adrci
● Can be called on command-line:
● $ adrci script=/home/seiler/scripts/test.adrci
● Example script:
# ADRCI script to find alert log errors
SPOOL /home/seiler/logs/alert_log_errors.log
ECHO "ALERT LOG ERRORS:"; SET HOMEPATH diag/rdbms/orcl/orcl; SHOW
ALERT -TERM -P "MESSAGE_TEXT LIKE '%ORA-%'"
SPOOL OFF
32
ADRCI Reports
© 2012 Pythian
ADRCI Health Reports
● Only applies to Health Monitor for now
adrci> show hm_run; # Look for RUN_NAME, e.g. HM_RUN_1
adrci> create report hm_run hm_run_1;
adrci> show report hm_run hm_run_1; # Outputs XML
● Human-readable report:
SQL> set long 99999 longchunksize 1000 pagesize 999 linesize 512
SQL> select dbms_hm.get_run_report('HM_RUN_1') from dual;
34
Example Incident Scenario
© 2012 Pythian
Step 1: Cause an Incident!
SQL> alter session set events '942 incident(table_missing)';
Session altered.
SQL> drop table doesnotexist;
drop table doesnotexist
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> alter session set events '942 trace name context off';
Session altered.
© 2012 Pythian
Alert Log of Incident
Fri Aug 12 15:44:54 2011
Errors in file
/home/oracle/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_18457
.trc (incident=12201):
ORA-00700: soft internal error, arguments:
[EVENT_CREATED_INCIDENT], [942], [TABLE_MISSING], [], [], [], [],
[], [], [], [], []
ORA-00942: table or view does not exist
Incident details in:
/home/oracle/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_1220
1/orcl_ora_18457_i12201.trc
© 2012 Pythian
Alert Log via ADRCI
adrci> show alert -p "message_text like '%ORA-00942%'" -term
adrci> show alert -p "message_text like '%ORA-%' and
originating_timestamp >= systimestamp-1/24" -term
ADR Home = c:oraclediagrdbmsorclorcl:
*****************************************************************
2011-08-14 14:35:27.843000 -05:00
Errors in file
c:oraclediagrdbmsorclorcltraceorcl_ora_4688.trc
(incident=14633):
ORA-00700: soft internal error, arguments:
[EVENT_CREATED_INCIDENT], [942], [TABLE_MISSING], [], [], [], [],
[], [], [], [], []
ORA-00942: table or view does not exist
© 2012 Pythian
Step 2: View the Incident
adrci> set home diag/rdbms/orcl/orcl
adrci> show incident
ADR Home = /home/oracle/app/oracle/diag/rdbms/orcl/orcl:
*****************************************************************
********
INCIDENT_ID PROBLEM_KEY
CREATE_TIME
--------------------
-----------------------------------------------------------
----------------------------------------
12201 ORA 700 [EVENT_CREATED_INCIDENT] [942]
[TABLE_MISSING] 2011-08-12 15:44:54.472000 -05:00
1 rows fetch
© 2012 Pythian
Step 3: Create a Package
adrci> ips create package incident 12201;
Created package 1 based on incident id 12201, correlation level
typical
adrci> ips generate package 1 in /home/oracle
Generated package 1 in file
/home/oracle/ORA700EVE_20110812154951_COM_1.zip, mode complete
OR:
adrci> ips pack incident 12201 in /home/oracle
Generated package 2 in file
/home/oracle/ORA700EVE_20110812160901_COM_1.zip, mode complete
© 2012 Pythian
View Package Contents
● Obvious:
unzip -l /home/oracle/ORA700EVE_20110812154951_COM_1.zip
● The ADRCI Way:
adrci> ips show incidents package 1
adrci> ips show files package 1
FILE_ID 1
FILE_LOCATION <ADR_HOME>/incident/incdir_12201
FILE_NAME orcl_ora_18457_i12201.trc
LAST_SEQUENCE 1
EXCLUDE Included
© 2012 Pythian
Step 4: Send Package to OSS
● Package will contain:
● Alert log
● Incident trace files
● Export/dmp files
● Hopefully will reduce the file requests from
Oracle Support!
© 2012 Pythian
Thank you and Q&A
http://www.pythian.com/news/
http://www.facebook.com/pages/The-Pythian-Group/
http://twitter.com/pythian
http://www.linkedin.com/company/pythian
1-866-PYTHIAN
sales@pythian.com
To contact us…
To follow us…

Mais conteúdo relacionado

Semelhante a Oracle 11g: Learning to Love the ADR - Diagnostic Files

Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsBasic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsSveta Smirnova
 
15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
15 Troubleshooting tips and Tricks for Database 21c - KSAOUG15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
15 Troubleshooting tips and Tricks for Database 21c - KSAOUGSandesh Rao
 
15 Troubleshooting Tips and Tricks for database 21c - OGBEMEA KSAOUG
15 Troubleshooting Tips and Tricks for database 21c - OGBEMEA KSAOUG15 Troubleshooting Tips and Tricks for database 21c - OGBEMEA KSAOUG
15 Troubleshooting Tips and Tricks for database 21c - OGBEMEA KSAOUGSandesh Rao
 
2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation2008 Collaborate IOUG Presentation
2008 Collaborate IOUG PresentationBiju Thomas
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginnersPini Dibask
 
Oracle Data Guard for Beginners
Oracle Data Guard for BeginnersOracle Data Guard for Beginners
Oracle Data Guard for BeginnersPini Dibask
 
IOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersIOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersPini Dibask
 
High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2Mario Redón Luz
 
Oracle ORAchk & EXAchk overview
Oracle ORAchk & EXAchk overviewOracle ORAchk & EXAchk overview
Oracle ORAchk & EXAchk overviewGareth Chapman
 
Exachk Customer Presentation
Exachk Customer PresentationExachk Customer Presentation
Exachk Customer PresentationSandesh Rao
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesSven Sandberg
 
Get the most out of Oracle Data Guard - POUG version
Get the most out of Oracle Data Guard - POUG versionGet the most out of Oracle Data Guard - POUG version
Get the most out of Oracle Data Guard - POUG versionLudovico Caldara
 
TechEvent Oracle 18c New Security Features
TechEvent Oracle 18c New Security FeaturesTechEvent Oracle 18c New Security Features
TechEvent Oracle 18c New Security FeaturesTrivadis
 
10 Problems with your RMAN backup script
10 Problems with your RMAN backup script10 Problems with your RMAN backup script
10 Problems with your RMAN backup scriptYury Velikanov
 
ArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUDArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUDGaret Keller
 
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseNoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseParesh Patel
 
What's new in oracle trace file analyzer 18.2.0
What's new in oracle trace file analyzer 18.2.0What's new in oracle trace file analyzer 18.2.0
What's new in oracle trace file analyzer 18.2.0Sandesh Rao
 
How to Turn New Recruits Into Oracle EPM Infrastructure Gurus
How to Turn New Recruits Into Oracle EPM Infrastructure GurusHow to Turn New Recruits Into Oracle EPM Infrastructure Gurus
How to Turn New Recruits Into Oracle EPM Infrastructure Gurusnking821
 
Containerized MySQL OpenWorld talk
Containerized MySQL OpenWorld talkContainerized MySQL OpenWorld talk
Containerized MySQL OpenWorld talkPatrick Galbraith
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman scriptMaris Elsins
 

Semelhante a Oracle 11g: Learning to Love the ADR - Diagnostic Files (20)

Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsBasic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAs
 
15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
15 Troubleshooting tips and Tricks for Database 21c - KSAOUG15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
 
15 Troubleshooting Tips and Tricks for database 21c - OGBEMEA KSAOUG
15 Troubleshooting Tips and Tricks for database 21c - OGBEMEA KSAOUG15 Troubleshooting Tips and Tricks for database 21c - OGBEMEA KSAOUG
15 Troubleshooting Tips and Tricks for database 21c - OGBEMEA KSAOUG
 
2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginners
 
Oracle Data Guard for Beginners
Oracle Data Guard for BeginnersOracle Data Guard for Beginners
Oracle Data Guard for Beginners
 
IOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersIOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for Beginners
 
High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2
 
Oracle ORAchk & EXAchk overview
Oracle ORAchk & EXAchk overviewOracle ORAchk & EXAchk overview
Oracle ORAchk & EXAchk overview
 
Exachk Customer Presentation
Exachk Customer PresentationExachk Customer Presentation
Exachk Customer Presentation
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
 
Get the most out of Oracle Data Guard - POUG version
Get the most out of Oracle Data Guard - POUG versionGet the most out of Oracle Data Guard - POUG version
Get the most out of Oracle Data Guard - POUG version
 
TechEvent Oracle 18c New Security Features
TechEvent Oracle 18c New Security FeaturesTechEvent Oracle 18c New Security Features
TechEvent Oracle 18c New Security Features
 
10 Problems with your RMAN backup script
10 Problems with your RMAN backup script10 Problems with your RMAN backup script
10 Problems with your RMAN backup script
 
ArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUDArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUD
 
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseNoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
 
What's new in oracle trace file analyzer 18.2.0
What's new in oracle trace file analyzer 18.2.0What's new in oracle trace file analyzer 18.2.0
What's new in oracle trace file analyzer 18.2.0
 
How to Turn New Recruits Into Oracle EPM Infrastructure Gurus
How to Turn New Recruits Into Oracle EPM Infrastructure GurusHow to Turn New Recruits Into Oracle EPM Infrastructure Gurus
How to Turn New Recruits Into Oracle EPM Infrastructure Gurus
 
Containerized MySQL OpenWorld talk
Containerized MySQL OpenWorld talkContainerized MySQL OpenWorld talk
Containerized MySQL OpenWorld talk
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
 

Último

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Último (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Oracle 11g: Learning to Love the ADR - Diagnostic Files

  • 1. Oracle 11g: Learning to Love the ADR Presented by: Don Seiler
  • 2. © 2012 Pythian2 Recognized Leader: • Global industry-leader in remote database administration services and consulting for Oracle, Oracle Applications, MySQL and SQL Server • Work with over 150 multinational companies such as Forbes.com, Fox Sports, Nordion and Western Union to help manage their complex IT deployments Expertise: • One of the world’s largest concentrations of dedicated, full-time DBA expertise. Employ 7 Oracle ACEs/ACE Directors • Hold 7 Specializations under Oracle Platinum Partner program, including Oracle Exadata, Oracle GoldenGate & Oracle RAC Global Reach & Scalability: • 24/7/365 global remote support for DBA and consulting, systems administration, special projects or emergency response Why Pythian
  • 3. © 2012 Pythian About Myself • Oracle DBA since 2001 – Oracle 7.3.4 on HP-UX • OCP 10gR2 DBA • Joined Pythian in May 2008 • From Manitowoc, Wisconsin • Twitter: @dtseiler • Blog: http://www.seiler.us
  • 5. © 2012 Pythian5 What Are We Talking About? ● Alert Log (RDBMS, ASM, Listener) ● Trace Files ● User-Generated (10046, 10053) ● System-Generated (ORA error) ● Core Dumps
  • 6. © 2012 Pythian6 Diagnostic Files in 10g ● $ORACLE_BASE/admin/$ORACLE_SID/ ● bdump – alert log & background trace files ● cdump – core dump files ● udump – user trace files (10046, 10053) ● adump – audit files These are defaults, overridden with %_dump_dest parameters.
  • 7. © 2012 Pythian7 Diagnostic Files in 11g ● Automatic Diagnostic Repostory (ADR)! ● Specified by DIAGNOSTIC_DEST ● New initialization parameter, replaces %_dump_dest – If not set, defaults to ORACLE_BASE ● If ORACLE_BASE not set, defaults to ORACLE_HOME/log ● First creates a “diag” directory inside its home. ● Check V$DIAG_INFO for location details
  • 8. © 2012 Pythian V$DIAG_INFO SQL> select name, value from v$diag_info; NAME VALUE ------------------------ ------------------------------------------------------- Diag Enabled TRUE ADR Base c:oracle ADR Home c:oraclediagrdbmsorclorcl Diag Trace c:oraclediagrdbmsorclorcltrace Diag Alert c:oraclediagrdbmsorclorclalert Diag Incident c:oraclediagrdbmsorclorclincident Diag Cdump c:oraclediagrdbmsorclorclcdump Health Monitor c:oraclediagrdbmsorclorclhm Default Trace File c:oraclediagrdbmsorclorcltraceorcl_ora_4084.trc Active Problem Count 0 Active Incident Count 0 11 rows selected.
  • 9. © 2012 Pythian9 What's in the ADR? ● Product Type: asm / rdbms / tnslsnr / clients ● Both human-readable (trace) and XML alert logs ● Trace files (10046 etc. in trace directory) ● Including SQLNet trace files ● Incident files ● Core dump files
  • 10. © 2012 Pythian10 Disabling the ADR ● Set hidden parameter: alter system set "_diag_adr_enabled"=false scope=spfile; ● Be sure to set the old *_dump_dest parameters ● Not advised (obviously)!
  • 11. © 2012 Pythian Too Many Trace Files! ● First thing I noticed after upgrading to 11g! ● Can be greatly reduced with hidden parameter: ● Set _disable_health_check = TRUE ● Don’t set in production without consulting Oracle Support!
  • 12. © 2012 Pythian12 Quick Terminology Lesson ● Problem – A critical error in the database (e.g. ORA-00600, 07445, 04031) ● Incident – A single occurrence of a problem. ● Follows ITIL!
  • 14. © 2012 Pythian14 ADRCI $ adrci adrci> show base; ADR base is "/u01/app/oracle" adrci> show homes; ADR Homes: diag/tnslsnr/myhost/listener diag/asm/+asm/+ASM diag/rdbms/mydb/mydb adrci> set home diag/rdbms/mydb/mydb;
  • 15. © 2012 Pythian Using ADRCI to View Alert Log ● View / Tail alert log (even on Windows!) ● adrci> show alert -tail -f; ● Read from XML files. ● Results opened in text editor unless -term specified. ● View alert log contents matching patterns. ● adrci> show alert -p "message_text like '%ORA-%'" -term; ● Includes message timestamps, better than grep. ● Case-sensitive! ● Can pattern-match on any predicate field such as host_id, user_id, originating_timestamp, etc.
  • 16. © 2012 Pythian Viewing Alert Log by Timestamp ● adrci> show alert -p "originating_timestamp >= systimestamp-1/24" -term; ● adrci> show alert -p "message_text like '%ORA- 600%' and originating_timestamp >= systimestamp-30" -term; ● Obvious alert log monitoring benefits! ● Requires presence of XML log files. ● Can SPOOL output to new log files.
  • 17. © 2012 Pythian17 Viewing DDL in Alert Log ● Enable DDL Logging: alter system set enable_ddl_logging=true scope=both; alter session set enable_ddl_logging=true; ● View output: adrci> show alert -p "message_text like '%DROP%'" -term; ADR Home = c:oraclediagrdbmsorclorcl: **************************************************************** 2011-08-16 15:33:49.805000 -05:00 DROP TABLE DTS_OBJECTS2 ● Reminder: Logs and search are case-sensitive!
  • 18. © 2012 Pythian18 File Maintenance ● Alert log XML files rotated after 10M. ● Old Alert log XML files and trace/incident files purged depending on short or long purge policies. ● Trace (human-readable) alert and listener log files not rotated or archived by Oracle.
  • 19. © 2012 Pythian19 Short Purge Policy ● adrci> show control; ● SHORTP_POLICY ● Value in HOURS, default is 720 (30 days) ● Max is 35791394 (over 4000 years!) ● Setting to 0 (zero) means all “short life” files can be purged. ● Trace files, core dumps, packaging info ● set control (SHORTP_POLICY = 336);
  • 20. © 2012 Pythian20 Long Purge Policy ● LONGP_POLICY ● Default is 8760 (365 days) ● Same max & zero rules as SHORTP_POLICY ● Incident info, incident dumps, alert logs ● set control (LONGP_POLICY = 1440);
  • 21. © 2012 Pythian21 Purge Policies ● Purge job is MMON slave task ● Purges expired data once in 7 days ● See MOS Doc ID 975448.1
  • 22. © 2012 Pythian Manually Purging Files ● Purge alert logs older than 1 day ● -age parameters takes minutes adrci> purge -age 1440 -type alert; ● Purge all files associated for an incident adrci> purge -i 12345; ● For more adrci> help purge;
  • 23. © 2012 Pythian ADR Purging Bug! ● Bug 9500575: 11G LISTENER LOGS LOG_XYZ.XML ARE NOT AUTOMATICALLY PURGED ● Potential to fill up diagnostic_dest disk. ● Oracle 11.1.0.7 and 11.2.0.1 ● To manually purge files older than 1 week: – adrci> purge -age 10080 -type alert;
  • 24. © 2012 Pythian24 X$DBGALERTEXT ● External table referencing log*.xml files. ● Effectively indexed by alert date, so date- based queries are “efficient and performant.” (MOS Doc ID 961682.1) ● Has inst_id column, but not RAC-aware. ● As of 11.2, V$DIAG_ALERT_EXT ● Includes alerts from all ADR homes (ASM, listeners, clients, etc.)
  • 26. © 2012 Pythian26 Incident Packaging Service (IPS) ● Creates logical “packages” for Oracle Support based on criteria such as incident number or timeframe. ● Either via EM or adrci adrci> show incident; adrci> show problem; adrci> show tracefile [-i 123] [-[r]t];
  • 27. © 2012 Pythian Incident Flood Control ● Flood-controlled incidents will generate an alert log entry but not incident dumps. ● Thresholds: ● 5 incidents for the same problem key in one hour. Will resume in the next hour. ● 25 incidents for the same problem key in one day. Will resume in the next day. ● 50/hour or 250/day = No more incident recording at all until hour/day expires!
  • 28. © 2012 Pythian28 IPS – Creating Packages adrci>IPS CREATE PACKAGE INCIDENT inc_number; adrci>IPS CREATE PACKAGE PROBLEM problem_ID; adrci>IPS CREATE PACKAGE PROBLEMKEY "problem_key"; adrci>IPS CREATE PACKAGE SECONDS sec; adrci>IPS CREATE PACKAGE TIME 'start_time' TO 'end_time'; adrci>IPS CREATE PACKAGE; ● Use IPS ADD INCIDENT or IPS ADD FILE to add data to the package before generating it.
  • 29. © 2012 Pythian IPS – Generating Package Files ● Creates a physical file from the logical package. adrci>IPS GENERATE PACKAGE package_number IN path adrci>IPS GENERATE PACKAGE 1 IN /home/seiler/diagnostics adrci>IPS SHOW FILES PACKAGE 1 ● Create and generate package with one command: IPS PACK adrci>IPS PACK INCIDENT incident_id IN path; adrci>IPS PACK INCIDENT 12345 IN /home/seiler/diagnostics;
  • 31. © 2012 Pythian ADRCI Scripts ● Can be called interactively a la sqlplus: ● adrci> @/home/seiler/scripts/test.adrci ● Can be called on command-line: ● $ adrci script=/home/seiler/scripts/test.adrci ● Example script: # ADRCI script to find alert log errors SPOOL /home/seiler/logs/alert_log_errors.log ECHO "ALERT LOG ERRORS:"; SET HOMEPATH diag/rdbms/orcl/orcl; SHOW ALERT -TERM -P "MESSAGE_TEXT LIKE '%ORA-%'" SPOOL OFF
  • 33. © 2012 Pythian ADRCI Health Reports ● Only applies to Health Monitor for now adrci> show hm_run; # Look for RUN_NAME, e.g. HM_RUN_1 adrci> create report hm_run hm_run_1; adrci> show report hm_run hm_run_1; # Outputs XML ● Human-readable report: SQL> set long 99999 longchunksize 1000 pagesize 999 linesize 512 SQL> select dbms_hm.get_run_report('HM_RUN_1') from dual;
  • 35. © 2012 Pythian Step 1: Cause an Incident! SQL> alter session set events '942 incident(table_missing)'; Session altered. SQL> drop table doesnotexist; drop table doesnotexist * ERROR at line 1: ORA-00942: table or view does not exist SQL> alter session set events '942 trace name context off'; Session altered.
  • 36. © 2012 Pythian Alert Log of Incident Fri Aug 12 15:44:54 2011 Errors in file /home/oracle/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_18457 .trc (incident=12201): ORA-00700: soft internal error, arguments: [EVENT_CREATED_INCIDENT], [942], [TABLE_MISSING], [], [], [], [], [], [], [], [], [] ORA-00942: table or view does not exist Incident details in: /home/oracle/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_1220 1/orcl_ora_18457_i12201.trc
  • 37. © 2012 Pythian Alert Log via ADRCI adrci> show alert -p "message_text like '%ORA-00942%'" -term adrci> show alert -p "message_text like '%ORA-%' and originating_timestamp >= systimestamp-1/24" -term ADR Home = c:oraclediagrdbmsorclorcl: ***************************************************************** 2011-08-14 14:35:27.843000 -05:00 Errors in file c:oraclediagrdbmsorclorcltraceorcl_ora_4688.trc (incident=14633): ORA-00700: soft internal error, arguments: [EVENT_CREATED_INCIDENT], [942], [TABLE_MISSING], [], [], [], [], [], [], [], [], [] ORA-00942: table or view does not exist
  • 38. © 2012 Pythian Step 2: View the Incident adrci> set home diag/rdbms/orcl/orcl adrci> show incident ADR Home = /home/oracle/app/oracle/diag/rdbms/orcl/orcl: ***************************************************************** ******** INCIDENT_ID PROBLEM_KEY CREATE_TIME -------------------- ----------------------------------------------------------- ---------------------------------------- 12201 ORA 700 [EVENT_CREATED_INCIDENT] [942] [TABLE_MISSING] 2011-08-12 15:44:54.472000 -05:00 1 rows fetch
  • 39. © 2012 Pythian Step 3: Create a Package adrci> ips create package incident 12201; Created package 1 based on incident id 12201, correlation level typical adrci> ips generate package 1 in /home/oracle Generated package 1 in file /home/oracle/ORA700EVE_20110812154951_COM_1.zip, mode complete OR: adrci> ips pack incident 12201 in /home/oracle Generated package 2 in file /home/oracle/ORA700EVE_20110812160901_COM_1.zip, mode complete
  • 40. © 2012 Pythian View Package Contents ● Obvious: unzip -l /home/oracle/ORA700EVE_20110812154951_COM_1.zip ● The ADRCI Way: adrci> ips show incidents package 1 adrci> ips show files package 1 FILE_ID 1 FILE_LOCATION <ADR_HOME>/incident/incdir_12201 FILE_NAME orcl_ora_18457_i12201.trc LAST_SEQUENCE 1 EXCLUDE Included
  • 41. © 2012 Pythian Step 4: Send Package to OSS ● Package will contain: ● Alert log ● Incident trace files ● Export/dmp files ● Hopefully will reduce the file requests from Oracle Support!
  • 42. © 2012 Pythian Thank you and Q&A http://www.pythian.com/news/ http://www.facebook.com/pages/The-Pythian-Group/ http://twitter.com/pythian http://www.linkedin.com/company/pythian 1-866-PYTHIAN sales@pythian.com To contact us… To follow us…

Notas do Editor

  1. We are a managed service AND a solution provider of elite database and System Administration skills in Oracle, MySQL and SQL Server
  2. We are a managed service AND a solution provider of elite database and System Administration skills in Oracle, MySQL and SQL Server