578
Redirecting cron Output ..................................................................................................................... 581
Troubleshooting cron ......................................................................................................................... 581
Examples of Automated DBA Jobs .............................................................................. 582
Starting and Stopping Database and Listener ................................................................................... 583
Checking for Archive Redo Destination Fullness ............................................................................... 586
Truncating Large Log Files ................................................................................................................. 588
Checking for Locked Production Accounts ........................................................................................ 589
Checking for Files over a Certain Age ................................................................................................ 590
Checking for Too Many Processes ..................................................................................................... 591
Verifying Integrity of RMAN Backups ................................................................................................. 592
Summary ..................................................................................................................... 593
■Chapter 22: Database Troubleshooting ............................................................. 595
Quickly Triaging .......................................................................................................... 595
Checking Database Availability .......................................................................................................... 596
Investigating Disk Fullness ................................................................................................................ 597
Inspecting the Alert Log ..................................................................................................................... 600
Identifying Bottlenecks via Operating System Utilities ............................................... 602
Identifying System Bottlenecks ......................................................................................................... 603
Mapping an Operating System Process to a SQL Statement ............................................................. 608
Finding Resource Intensive SQL Statements .............................................................. 610
Monitoring Real-Time SQL Execution Statistics ................................................................................. 610
Displaying Resource Intensive SQL .................................................................................................... 611
Running Oracle Diagnostic Utilities .................................................................................................... 612
Detecting and Resolving Locking Issues ..................................................................... 616
Resolving Open Cursor Issues .................................................................................... 618
Troubleshooting Undo Tablespace Issues ................................................................... 620
Determining if Undo is Correctly Sized .............................................................................................. 620
Viewing SQL that is Consuming Undo Space ..................................................................................... 622
xxvii
■ CONTENTS
Handling Temporary Tablespace Issues ..................................................................... 623
Determining if Temporary Tablespace is Sized Correctly .................................................................. 623
Viewing SQL that is Consuming Temporary