Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Oracle "file open" wait event tuning

Oracle Database Tips by Donald Burleson

In Oracle AWR and the 10g wait event views can quickly identify the total waits and the time waited for "file open" events:

select
   event,
   total_waits,
   time_waited
from
   v$system_event
where
   event = 'file open';

To find the specific files that are experiencing "file open" waits you can run this query:

select
   sess.sid,
   process.pid,
   process.spid,
   sess.username,
   sess_wait.event,
   sess_wait.wait_time,
   sess_wait.seconds_in_wait,
   sess_wait.p1,
   sess_wait.p2,
   sess_wait.p3
from
   v$session sess,
   v$session_wait sess_wait,
   v$process process
where
   sess.sid = sess_wait.sid
and
   sess.paddr = process.addr
and
   sess_wait.event = 'file open';

You can then get the name of the data file with these queries.  Here is a complete article on getting the values from p1, p2 and p3.

  • P1—The absolute file number for the data file involved in the wait.  

  • P2—The block number within the data file referenced in P1 that is being waited upon.  

  • P3—The reason code describing why the wait is occurring.

Here's an Oracle data dictionary query for these values:

select
   p1 "File #",
   p2 "Block #",
   p3 "Reason Code"
from
   v$session_wait
where
   event = 'file open';
 

Causes of "file open" waits

There are many possible cause of file open waits in an Oracle databases, most of them related to external disk conditions:

  • Disk contention - Disk spindle channel contention and file enqueues (you can check these with the iostat utility) 

  • Lack of OS file descriptors 

  • Improper hardware configuration - This is especially true in Oracle Real Application Clusters (RAC) database where you have a wide variety of file storage options.  Most savvy RAC shops use JBOD with Oracle Automatic Storage Management (ASM), using S.A.M.E. striping.  Here is the best book on this issue. 

  • Remote mounts - Using SAN (storage area networks) or NAS (Network attached storage) can slow-down file opens. 

  • Distributed queries - File activity over a database link van be very slow


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.