SlideShare a Scribd company logo
1 of 30
Download to read offline
Oracle Database Monitoring
for the Beginner
Chris Grabowy
cgrabowy@fcg.com
First Consulting Group
What is Database Monitoring?
The monitoring of predefined events that
generates a message or warning when a
certain threshold has been exceeded. This
is done in an effort to ensure that an issue
does not become a problem.
Is Database Monitoring
Important?
There are many facets to database administration,
the one that seems to get the least attention is
database monitoring.
DBA TO-DO LIST
1) Performance Tuning
2) Backup/Recovery
…
…
98) Monitoring the database
99) Supporting developers
How many DBAs monitor?
l How many DBAs monitor their databases?
l Of those, how many use 3rd party products?
Why Monitor a Database?
l Supporting production!!!
l Keeping an eye on development, i.e. disabled FKs, PKs.
l In support of an SLA (service level agreement).
l Database performance.
Types of DB Monitoring
l Status
l Performance
l Trend Analysis
Status Monitoring
Monitors the current status of an event and reports
when it exceeds a defined threshold.
A classic example of active monitoring is being
notified before a tablespace fills up.
Status Monitoring monitors…
l Database
– Database/Listener
– Alert log error messages.
– Disabled DB objects, like FKs, PKs, triggers.
– Tablespace, full or fragmented.
– Locking.
– Maximum extents about to be reached.
– (and a hundred more)
l OS
– CPU
– Memory
– Disk
– Temp space*
Performance Monitoring
Monitors a defined set of performance statistics.
This is done in an effort to maintain the best
possible database performance.
Performance Monitoring
monitors…
l Database
– Hit Ratios(dictionary, library, buffer caches, etc)
– Latches
– Locks
– Waits
– V$ views…
– (and a hundred more)
l OS
– CPU
Trend Analysis Monitoring
Collects the historical data surrounding specified events. This
historical data is analyzed on a scheduled basis in an effort to reveal
any potential problems.
A good example of TA monitoring is watching the growth of data in a
tablespace and predicting when it will fill up. In this situation, perhaps
the tables or tablespaces were incorrectly sized. So at this point, some
time can be spent fixing the real issue.
TA Monitoring monitors…
l Database
– Database/Listener has been down when and for how long?
– Alert log – reoccurring error messages, etc.
– Disabled DB objects, like FKs, PKs, triggers consistently, yell at developers?
– Tablespace is filling up or fragmenting, perhaps sizing is wrong, etc.
– Locking - patterns in the locking, missing FK indexes, etc
– Maximum extents about to be reached. If this happens regularly then perhaps it’s time to look
at the extent size.
l OS
– CPU –high CPU usage, need more CPUs?
– Memory – high memory usage, need more memory?
– Disk – disks are steadily filling up, predicting when more disks will be needed.
TA “completes” the others…
Trend Analysis
Active
Performance
Monitoring Concepts
The following are some concepts to think about
when creating or updating your monitoring
processes.
Centralized or Decentralized?
In a centralized configuration, the
monitoring software or scripts reside
on one server. This obviously
makes maintenance easier, but if the
hosting server fails then there is no
monitoring of the databases.
Centralized or Decentralized?
In a decentralized configuration,
the monitoring software or
scripts reside with the database.
This complicates maintenance,
but allows for higher
monitoring availability.
OS independent
If you have databases on multiple OS platforms then
consider coding the monitoring scripts in a common
language, such as PERL. If this complicates the process
then consider a centralized approach by choosing one of
the platforms as the host.
DB or OS Hosted?
Database Hosted
l Inside the database.
l OS independent.
l Slightly more difficult to setup.
Operating System Hosted
l Very flexible and powerful.
l Easier to setup.
UNIX Hosting Example
Is this an organized, easy to maintain crontab?
00 9 * * 0-6 /disk2/app/oracle/local/chktblspc.scr
00 01 * * 0-6 /disk2/app/oracle/local/dailyrpt.scr
00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chkproddb.scr
00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chklistprod.scr
00 6 * * 0-6 /disk2/app/oracle/local/chkFKs.scr
00 6 * * 0-6 /disk2/app/oracle/local/chkPKs.scr
00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chkarchdir.scr
00 7 * * 1 /disk2/app/oracle/local/chkfileio.scr
00 7 * * 1 /disk2/app/oracle/local/chktempspace.scr
00 1-24 * * 0-6 /disk2/app/oracle/local/chklocks.scr
00 6 * * 0-6 /disk2/app/oracle/local/chkTRGs.scr
00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chkdevdb.scr
00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chktstdb.scr
00 7 * * 1 /disk2/app/oracle/local/chkostempspace.scr
00 7 * * 1 /disk2/app/oracle/local/chkosdiskspace.scr
.
.
UNIX Hosting Example (cont)
This is an organized, easy to understand and maintenance free crontab.
00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/mon10min.scr
00,30 * * * 0-6 /disk2/app/oracle/local/mon30min.scr
00 1-24 * * 0-6 /disk2/app/oracle/local/mon1hour.scr
00 6 * * 0-6 /disk2/app/oracle/local/mon1day.scr
00 7 * * 1 /disk2/app/oracle/local/mon1week.scr
Types of alerts
l Informational messages.
l Warnings.
l Errors.
l “Update your resume.”
Support multiple databases
l Database monitoring should be able to monitor multiple
databases with ease.
l Perhaps the monitoring scripts can query tnsnames.ora for
a list of databases.
l If your using UNIX, then perhaps it can query the oratab
file.
Collect historical data
l Try to collect historical data even if your not performing
trend analysis monitoring.
l Collection of historical data does not need to be fancy. It
could be as simple as writing messages into a flat file or
simple table.
l The value of this data will become apparent and help
motivate you to start trend analysis monitoring.
Microsoft Outlook Rules
l Update your Outlook rules to route monitoring emails into
specific folders based on urgency or other factors. In the
future, these folders can be searched, i.e.. historical data.
l Urgent emails can cause Outlook to play a .wav file, like a
siren or an appropriate verbal message. This may come in
handy if you do not have a beeper.
l Outlook rules can also display a pop-up dialog based on
criteria you specify.
Monitoring…resolution
l For often occurring events, consider updating the
monitoring script to report the problem and resolve it. *
l If an event occurs often then perhaps there is a bigger issue
to resolve. This is where collecting simple historical data
or starting trend analysis monitoring can help solve the
bigger issue.
Keep everyone informed
l DBAs – obviously your fellow DBAs should also receive
monitoring emails or pages. *
l System Administrators – these folks will need to know
about any emails or pages they will receive about OS
related issues.
l Management – should be made aware of these new
processes. And any trend analysis reports can be added to
your status reports.
l Resume – lastly, don’t forget to update that very important
document and repost it to monster.com. You just never
know…
Additional Resources of Info
l Oracle Enterprise Manager
l 3rd party products
– Patrol from BMC
– I/Watch from Quest
– Q Diagnostics from Savant
l Books
– Oracle DBA Handbook, Kevin Loney
– Oracle DBA 101, Marlene Theriault, Rachel Carmichael, James Viscusi
l Conference presentations
– Life Without Tools: Monitoring Database Activity With the Power of SQL, Ari
Kaplan
– The Oracle Instructor’s Handbook of DBA Tips&Tricks, Chris Fool
– How to Select a Monitoring Solution for E-Business Environments, Haim Kopans
Share experiences
l Audience to share any positive or negative
experiences with monitoring?
l Any non-vendor DBA recommend a 3rd party
monitoring product?
Conclusion
l Motivated to start or improve monitoring processes.
l If you have a budget then purchase a good
monitoring product.
l If not then start with small and attainable
monitoring goals when writing scripts.
Questions
?

More Related Content

Similar to monitor_begin_s.PDF

Oracle Oracle Performance Tuning
Oracle Oracle Performance Tuning Oracle Oracle Performance Tuning
Oracle Oracle Performance Tuning Kernel Training
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance TuningBala Subra
 
Storage, Virtual, and Server Profiler Training
Storage, Virtual, and Server Profiler TrainingStorage, Virtual, and Server Profiler Training
Storage, Virtual, and Server Profiler TrainingSolarWinds
 
Beat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmarkBeat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmarkPedro González Serrano
 
Dba 3+ exp qus
Dba 3+ exp qusDba 3+ exp qus
Dba 3+ exp quskrreddy21
 
Python for Data Logistics
Python for Data LogisticsPython for Data Logistics
Python for Data LogisticsKen Farmer
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Aaron Shilo
 
DBA 3 year Interview Questions
DBA 3 year Interview QuestionsDBA 3 year Interview Questions
DBA 3 year Interview QuestionsNaveen P
 
Performance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL DatabasePerformance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL DatabaseTung Nguyen Thanh
 
Database architectureby howard
Database architectureby howardDatabase architectureby howard
Database architectureby howardoracle documents
 
Silicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The SequelSilicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The SequelDaniel Coupal
 
Top 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseTop 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseSandesh Rao
 
שבוע אורקל 2016
שבוע אורקל 2016שבוע אורקל 2016
שבוע אורקל 2016Aaron Shilo
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under controlMarcin Przepiórowski
 
Data Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyData Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyAnkita Dubey
 
DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)Gustavo Rene Antunez
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleSteve Karam
 

Similar to monitor_begin_s.PDF (20)

Techno-Fest-15nov16
Techno-Fest-15nov16Techno-Fest-15nov16
Techno-Fest-15nov16
 
Oracle Oracle Performance Tuning
Oracle Oracle Performance Tuning Oracle Oracle Performance Tuning
Oracle Oracle Performance Tuning
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance Tuning
 
Storage, Virtual, and Server Profiler Training
Storage, Virtual, and Server Profiler TrainingStorage, Virtual, and Server Profiler Training
Storage, Virtual, and Server Profiler Training
 
Beat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmarkBeat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmark
 
Greske na sapu
Greske na sapuGreske na sapu
Greske na sapu
 
Dba 3+ exp qus
Dba 3+ exp qusDba 3+ exp qus
Dba 3+ exp qus
 
Python for Data Logistics
Python for Data LogisticsPython for Data Logistics
Python for Data Logistics
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
DBA 3 year Interview Questions
DBA 3 year Interview QuestionsDBA 3 year Interview Questions
DBA 3 year Interview Questions
 
Performance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL DatabasePerformance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL Database
 
Database architectureby howard
Database architectureby howardDatabase architectureby howard
Database architectureby howard
 
Silicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The SequelSilicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
 
Oracle analysis 101_v1.0_ext
Oracle analysis 101_v1.0_extOracle analysis 101_v1.0_ext
Oracle analysis 101_v1.0_ext
 
Top 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseTop 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous Database
 
שבוע אורקל 2016
שבוע אורקל 2016שבוע אורקל 2016
שבוע אורקל 2016
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
 
Data Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyData Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubey
 
DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in Oracle
 

Recently uploaded

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 

Recently uploaded (20)

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

monitor_begin_s.PDF

  • 1. Oracle Database Monitoring for the Beginner Chris Grabowy cgrabowy@fcg.com First Consulting Group
  • 2. What is Database Monitoring? The monitoring of predefined events that generates a message or warning when a certain threshold has been exceeded. This is done in an effort to ensure that an issue does not become a problem.
  • 3. Is Database Monitoring Important? There are many facets to database administration, the one that seems to get the least attention is database monitoring. DBA TO-DO LIST 1) Performance Tuning 2) Backup/Recovery … … 98) Monitoring the database 99) Supporting developers
  • 4. How many DBAs monitor? l How many DBAs monitor their databases? l Of those, how many use 3rd party products?
  • 5. Why Monitor a Database? l Supporting production!!! l Keeping an eye on development, i.e. disabled FKs, PKs. l In support of an SLA (service level agreement). l Database performance.
  • 6. Types of DB Monitoring l Status l Performance l Trend Analysis
  • 7. Status Monitoring Monitors the current status of an event and reports when it exceeds a defined threshold. A classic example of active monitoring is being notified before a tablespace fills up.
  • 8. Status Monitoring monitors… l Database – Database/Listener – Alert log error messages. – Disabled DB objects, like FKs, PKs, triggers. – Tablespace, full or fragmented. – Locking. – Maximum extents about to be reached. – (and a hundred more) l OS – CPU – Memory – Disk – Temp space*
  • 9. Performance Monitoring Monitors a defined set of performance statistics. This is done in an effort to maintain the best possible database performance.
  • 10. Performance Monitoring monitors… l Database – Hit Ratios(dictionary, library, buffer caches, etc) – Latches – Locks – Waits – V$ views… – (and a hundred more) l OS – CPU
  • 11. Trend Analysis Monitoring Collects the historical data surrounding specified events. This historical data is analyzed on a scheduled basis in an effort to reveal any potential problems. A good example of TA monitoring is watching the growth of data in a tablespace and predicting when it will fill up. In this situation, perhaps the tables or tablespaces were incorrectly sized. So at this point, some time can be spent fixing the real issue.
  • 12. TA Monitoring monitors… l Database – Database/Listener has been down when and for how long? – Alert log – reoccurring error messages, etc. – Disabled DB objects, like FKs, PKs, triggers consistently, yell at developers? – Tablespace is filling up or fragmenting, perhaps sizing is wrong, etc. – Locking - patterns in the locking, missing FK indexes, etc – Maximum extents about to be reached. If this happens regularly then perhaps it’s time to look at the extent size. l OS – CPU –high CPU usage, need more CPUs? – Memory – high memory usage, need more memory? – Disk – disks are steadily filling up, predicting when more disks will be needed.
  • 13. TA “completes” the others… Trend Analysis Active Performance
  • 14. Monitoring Concepts The following are some concepts to think about when creating or updating your monitoring processes.
  • 15. Centralized or Decentralized? In a centralized configuration, the monitoring software or scripts reside on one server. This obviously makes maintenance easier, but if the hosting server fails then there is no monitoring of the databases.
  • 16. Centralized or Decentralized? In a decentralized configuration, the monitoring software or scripts reside with the database. This complicates maintenance, but allows for higher monitoring availability.
  • 17. OS independent If you have databases on multiple OS platforms then consider coding the monitoring scripts in a common language, such as PERL. If this complicates the process then consider a centralized approach by choosing one of the platforms as the host.
  • 18. DB or OS Hosted? Database Hosted l Inside the database. l OS independent. l Slightly more difficult to setup. Operating System Hosted l Very flexible and powerful. l Easier to setup.
  • 19. UNIX Hosting Example Is this an organized, easy to maintain crontab? 00 9 * * 0-6 /disk2/app/oracle/local/chktblspc.scr 00 01 * * 0-6 /disk2/app/oracle/local/dailyrpt.scr 00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chkproddb.scr 00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chklistprod.scr 00 6 * * 0-6 /disk2/app/oracle/local/chkFKs.scr 00 6 * * 0-6 /disk2/app/oracle/local/chkPKs.scr 00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chkarchdir.scr 00 7 * * 1 /disk2/app/oracle/local/chkfileio.scr 00 7 * * 1 /disk2/app/oracle/local/chktempspace.scr 00 1-24 * * 0-6 /disk2/app/oracle/local/chklocks.scr 00 6 * * 0-6 /disk2/app/oracle/local/chkTRGs.scr 00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chkdevdb.scr 00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/chktstdb.scr 00 7 * * 1 /disk2/app/oracle/local/chkostempspace.scr 00 7 * * 1 /disk2/app/oracle/local/chkosdiskspace.scr . .
  • 20. UNIX Hosting Example (cont) This is an organized, easy to understand and maintenance free crontab. 00,10,20,30,40,50 * * * 0-6 /disk2/app/oracle/local/mon10min.scr 00,30 * * * 0-6 /disk2/app/oracle/local/mon30min.scr 00 1-24 * * 0-6 /disk2/app/oracle/local/mon1hour.scr 00 6 * * 0-6 /disk2/app/oracle/local/mon1day.scr 00 7 * * 1 /disk2/app/oracle/local/mon1week.scr
  • 21. Types of alerts l Informational messages. l Warnings. l Errors. l “Update your resume.”
  • 22. Support multiple databases l Database monitoring should be able to monitor multiple databases with ease. l Perhaps the monitoring scripts can query tnsnames.ora for a list of databases. l If your using UNIX, then perhaps it can query the oratab file.
  • 23. Collect historical data l Try to collect historical data even if your not performing trend analysis monitoring. l Collection of historical data does not need to be fancy. It could be as simple as writing messages into a flat file or simple table. l The value of this data will become apparent and help motivate you to start trend analysis monitoring.
  • 24. Microsoft Outlook Rules l Update your Outlook rules to route monitoring emails into specific folders based on urgency or other factors. In the future, these folders can be searched, i.e.. historical data. l Urgent emails can cause Outlook to play a .wav file, like a siren or an appropriate verbal message. This may come in handy if you do not have a beeper. l Outlook rules can also display a pop-up dialog based on criteria you specify.
  • 25. Monitoring…resolution l For often occurring events, consider updating the monitoring script to report the problem and resolve it. * l If an event occurs often then perhaps there is a bigger issue to resolve. This is where collecting simple historical data or starting trend analysis monitoring can help solve the bigger issue.
  • 26. Keep everyone informed l DBAs – obviously your fellow DBAs should also receive monitoring emails or pages. * l System Administrators – these folks will need to know about any emails or pages they will receive about OS related issues. l Management – should be made aware of these new processes. And any trend analysis reports can be added to your status reports. l Resume – lastly, don’t forget to update that very important document and repost it to monster.com. You just never know…
  • 27. Additional Resources of Info l Oracle Enterprise Manager l 3rd party products – Patrol from BMC – I/Watch from Quest – Q Diagnostics from Savant l Books – Oracle DBA Handbook, Kevin Loney – Oracle DBA 101, Marlene Theriault, Rachel Carmichael, James Viscusi l Conference presentations – Life Without Tools: Monitoring Database Activity With the Power of SQL, Ari Kaplan – The Oracle Instructor’s Handbook of DBA Tips&Tricks, Chris Fool – How to Select a Monitoring Solution for E-Business Environments, Haim Kopans
  • 28. Share experiences l Audience to share any positive or negative experiences with monitoring? l Any non-vendor DBA recommend a 3rd party monitoring product?
  • 29. Conclusion l Motivated to start or improve monitoring processes. l If you have a budget then purchase a good monitoring product. l If not then start with small and attainable monitoring goals when writing scripts.