Database Wait time calculation.

Hi i am using 10.2.0.4.0 version of oracle.
I need to find the total wait times for each days for each WAIT_CLASS and need to plot the trends in past days. i am using below query for getting the details, but my results are not matching with the ones i am getting in the AWR report. In my daily AWR report, 'USER I/O' is coming at highest time taking wait class, where as in my query i am getting 'Application' on highest wait section. Also the total wait times comes different. Can you please help me to understand, what am i missing in the query?
SELECT  wait_class,
     TO_CHAR (MIN (s.end_interval_time), 'DD-MON-YYYY DY HH24:MI')
         sample_end,
        SUM (WAIT_TIME + time_waited)  waittime
FROM dba_hist_active_sess_history q, dba_hist_snapshot s
WHERE   s.snap_id = q.snap_id
      AND s.dbid = q.dbid
      AND s.instance_number = q.instance_number
      AND s.end_interval_time >=
             TO_DATE (TRIM ('16-Oct-2012 '), 'dd-mon-yyyy hh24:mi:ss')
      AND s.begin_interval_time <=
             TO_DATE (TRIM ('18-nov-2012 '), 'dd-mon-yyyy hh24:mi:ss')
     AND wait_class in ('User I/O','System I/O','Concurrency','Commit','Other','Configuration','Network','Application','Administrative')
GROUP BY trunc(s.end_interval_time),wait_class
ORDER BY trunc(s.end_interval_time),waittime desc

Thanks. I executed the below query and got the results for the same duration as in my AWR report, i.e '02-Nov-12 00:10:14' to '02-Nov-12 16:50:40' but i am wondering the trend of wait times as per each class are comparably similar but nos i.e. SUM(time_waited) are different in both the cases(AWR and below QUERY), they are not exact match. Why am i getting this difference?
SELECT wait_class,
       --TO_CHAR (MIN (s.end_interval_time), 'DD-MON-YYYY DY HH24:MI'),
       trunc(s.end_interval_time),
        SUM(time_waited)
FROM   dba_hist_service_wait_class dhswc
       , dba_hist_snapshot s
where    S.SNAP_ID = dhswc.snap_id
AND wait_class in ('User I/O','System I/O','Concurrency','Commit','Other','Configuration','Network','Application','Administrative')
AND  s.end_interval_time >=
             TO_DATE (TRIM ('02-Nov-12 00:10:14'), 'dd-mon-yyyy hh24:mi')
      AND s.begin_interval_time <=
             TO_DATE (TRIM ('02-Nov-12 16:50:40'), 'dd-mon-yyyy hh24:mi')    
GROUP  BY Trunc(end_interval_time),
          wait_class
ORDER  BY Trunc(end_interval_time),
          wait_class;Edited by: 930254 on Nov 8, 2012 8:01 AM
Edited by: 930254 on Nov 8, 2012 8:05 AM

Similar Messages

  • Uccx expected wait time calculation

    Does anyone know how the calculation is done for the expected wait time in the get reporting statistic step (UCCX 7.0.1)? Thanks in advance.

    I don't know if you've seen this ... but pg 324 (2-306) of the editor step reference guide gives a description of how the ewt is calculated. It doesn't give an exact formula though....
    http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx701edstepref.pdf
    Brian

  • Relation between RFC time and Roll wait time

    Hello
    What is the relation between RFC time and Roll wait time?
    In a diagram from E2E100 training I took recently the relationship is made out to be:
    RFC+CPIC = some processing time + Roll wait time
    Something like this
    Processing----
    Roll wait-------
    Roll in
    RFC+CPIC----
    In the diagram I saw it shows that roll out occurs during processing.
    Assumming that the user context rolls out and then rolls in again, wouldn't "Wait" time occur when the request comes back and the dispatcher has to assign the request to a work process?
    Is this wait time calculated as "Wait" time or is it calculated as "Roll wait" time?
    I was forced to think about this because of a STAD record I have with high Roll wait time, but with low RFC time as well as zero GUI time. If "Wait" time when the request comes back from RFC is included in "Roll wait" then it might explain what i'm seeing.
    Kind regards,
    Peter

    Hello Santosh,
    Thank you for your reply.
    I would like to know how time spend in the dispatcher by a request coming back from an RFC is calculated.
    When the RFC is made the user context is rolled out of the work process so the work process becomes free. When the RFC comes back it has to be assigned to a new work process. This means that a bit of time would need to be spent in the dispatcher. Would this time be measured as "wait" time or is it part of "Roll wait time?
    From the definition you gave of "Roll wait time", "it is the time dedicated by the R/3 system to waiting for the return value of an RFC call plus the CPIC time required to create the connection for that RFC to an outside system", one would think that the time spent in the dispatcher by a returning RFC would be measured as "wait time" the same as when the dialog request first comes in from the front end. I've never seen a diagram that explained this satisfactorily.
    Kind regards,
    Peter

  • Database Error: RSR0009: Resource not available for pool. Wait-time expired

    i am occassionally receiving the following error during database connections in my servlet:
    Database Error: RSR0009: Resource not available for pool [webAdvisorTestPool]. Wait-time expired
    i understand that this is a result of a connection leak from improper closure of my Connection object, but i thought that i was properly closing my connection.
    i can get the error if i do the following steps:
    1) access my login page and enter login credentials.
    2) submit the login which then hits the Authentication servlet.
    3) Authentication servlet authenticates and takes me to home page.
    4) hit the back button to get back to the login page.
    5) repeat this process until i hit the Max Pool Size (from web server).
    6) then i get the error message
    here are some details:
    i have an Authentication servlet; here is the pertinent code from that servlet:
    try {     // retrieve the user and add the User object to the session     DAO dao = new DAO();     Person authenticUser = dao.getPerson(userID, password);     session.setAttribute("validUser", authenticUser);     redirectPage = mapping.findForward("success"); }
    i also have a DAO object that handles all of my DB transactions (and you can see from my code above that the Authentication servlet is using that object); here is the pertinant code from that servlet:
    public DAO() {     datasource = "java:comp/env/jdbc/webAdvisorTest"; } public Person getPerson(String userID, String password)     throws ObjectNotFoundException {     // JDBC variables     DataSource ds = null;     Connection conn = null;     PreparedStatement stmt = null;     ResultSet results = null;     // User variables     Person validUser = null;     try     {         // Retrieve the DataSource from JNDI         InitialContext ctx = new InitialContext();         // if this statement fails, NamingException is thrown         ds = (DataSource)ctx.lookup(datasource);         // get DB connection and perform SQL operations         conn = ds.getConnection();         // User variables         String validUserID = null;         String validFName = null;         String validLName = null;         String validEmail = null;         // get DB connection and perform SQL operations         conn = ds.getConnection();         stmt = conn.prepareStatement(PERSON_QUERY);         stmt.setString(1, userID);         stmt.setString(2, password);         results = stmt.executeQuery();         // iterate through the results         if (results.next())         {             validUserID = results.getString("id");             validFName = results.getString("first_name");             validLName = results.getString("last_name");             validUser = new Person(validUserID, validFName, validLName);         }     }     // handle SQL errors     catch(SQLException e)     {         e.printStackTrace(System.err);         throw new RuntimeException("Database Error: " + e.getMessage());     }     // handle JNDI errors     catch(NamingException e)     {         throw new RuntimeException("JNDI Error: " + e.getMessage());     }     // clean up resources     finally     {         doClosure(results, stmt, conn);     }     // if the user was not found, throw ObjectNotFoundException     if(validUser == null)     {         throw new ObjectNotFoundException();     }     return validUser; } protected void doClosure(ResultSet results, PreparedStatement stmt,     Connection conn) {     if (results != null)     {         try { results.close(); }         catch (SQLException e) { e.printStackTrace(System.err); }     }     if (stmt != null)     {         try { stmt.close(); }         catch (SQLException e) { e.printStackTrace(System.err); }     }     if (conn != null)     {         try         {             System.out.println("R18Resources.conn before close: " + conn);             conn.close();             System.out.println("R18Resources.conn after close: " + conn);             System.out.println("R18Resources.conn is closed? " +                 conn.isClosed());         }         catch (SQLException e)         {             System.out.println("R18Resource conn close error: " +                 e.getMessage());         }     } }
    as you can see, i've added some print statements in my connection closure block. based on my output log, each connection is being properly closed and i am not encountering any errors during that closing block.
    any ideas???
    Message was edited by:
    millerand

    Please try the following code in your doClosure method. Replace your code with the following code.
    public void doClosure(ResultSet pResultSet, Statement pStmt, Connection pConn) throws Exception {
    try {
                   if (pResultSet != null) {
                        pResultSet.close();
                        pResultSet = null;
              } catch (SQLException se) {
              logger.error( se );
              } finally {
                   try {
                        if (pStmt != null) {
                             pStmt.close();
                             pStmt = null;
                   } catch (SQLException se) {
                   logger.error(se);
                   } finally {
                        try {
                             if (pConn != null) {
                                  pConn.close();
                                  pConn = null;
                        } catch (SQLException se) {
                        logger.error(se);
    And let me know if you still face this issue. What is the application server you are using?

  • Wallboard: convoldestContact vs Expected Wait Time

    We use the opensource wallboard version 2.4(beta), and it pulls from the UCCX database two variables convoldestContact and convLongestWaitDuration.  Does anyone have specific definitions for those?  The wallboard software calls Current Wait Time and Longest Wait Time, but I'm wondering how they're really calculated.
    We're testing an Expected Wait Time feature of our script via the Get Reporting steps, and the value being calculated is considerably different than the wallboard Current Wait Time.  But I suspect that the wallboard version is reflecting something different -- perhaps the wait time when the most recent caller entered the queue (since it doesn't seem to be changing as that caller waits).
    Thanks
    Bill

    Your suspicion is correct.  The wallboard is not performing an expected wait calculation.  It's simply reporting how long the longest current caller has been in queue.  The Get Reporting step is estimating wait time by a number of factors. 
    For example if you have 10 agents logged in taking calls, and 9 log out, you'll see Estimated Wait Time skyrocket, while convOldestContact will simply keep counting how long the oldest caller has been in queue. 

  • Query identified as OracleOEM reporting a lot of CPU wait time

    We use "Ignite" by Confio to monitor the wait time on our database and I have been watching a query for a while now and it seems to be consuming a lot of resources for what it is doing.
    This is the query:
    /* OracleOEM */
    SELECT m.tablespace_name,
    m.used_percent,
    (m.tablespace_size - m.used_space)*t.block_size/1024/1024 mb_free
    FROM dba_tablespace_usage_metrics m,
    dba_tablespaces t,
    v$parameter p
    WHERE p.name='statistics_level'
    AND p.value!='BASIC'
    AND t.tablespace_name = m.tablespace_name
    And this is the execution plan:
    SELECT STATEMENT Optimizer=ALL_ROWS (Cost=152 Cardinality=17 Bytes=2193)
    NESTED LOOPS (Cost=152 Cardinality=17 Bytes=2193)
    NESTED LOOPS (Cost=152 Cardinality=17 Bytes=2125)
    MERGE JOIN (CARTESIAN) (Cost=149 Cardinality=17 Bytes=1785)
    HASH JOIN (Cost=2 Cardinality=1 Bytes=49)
    FIXED TABLE (FULL) OF X$KSPPI (TABLE (FIXED)) (Cost=1 Cardinality=1 Bytes=31)
    FIXED TABLE (FULL) OF X$KSPPCV (TABLE (FIXED)) (Cost=1 Cardinality=1897 Bytes=34146)
    BUFFER (SORT) (Cost=148 Cardinality=502 Bytes=28112)
    VIEW OF DBA_TABLESPACE_USAGE_METRICS (VIEW) (Cost=147 Cardinality=502 Bytes=28112)
    SORT (UNIQUE) (Cost=147 Cardinality=502 Bytes=19122)
    UNION-ALL
    SORT (AGGREGATE) (Cardinality=1 Bytes=8)
    TABLE ACCESS (BY INDEX ROWID) OF RECYCLEBIN$ (TABLE) (Cost=4 Cardinality=389 Bytes=3112)
    INDEX (RANGE SCAN) OF RECYCLEBIN$_TS (INDEX) (Cost=1 Cardinality=388)
    SORT (AGGREGATE) (Cardinality=1 Bytes=14)
    FIXED TABLE (FULL) OF X$KTFBHC (TABLE (FIXED)) (Cost=0 Cardinality=1 Bytes=14)
    SORT (AGGREGATE) (Cardinality=1 Bytes=8)
    TABLE ACCESS (BY INDEX ROWID) OF RECYCLEBIN$ (TABLE) (Cost=4 Cardinality=389 Bytes=3112)
    INDEX (RANGE SCAN) OF RECYCLEBIN$_TS (INDEX) (Cost=1 Cardinality=388)
    SORT (AGGREGATE) (Cardinality=1 Bytes=14)
    FIXED TABLE (FULL) OF X$KTFBHC (TABLE (FIXED)) (Cost=0 Cardinality=1 Bytes=14)
    HASH (GROUP BY) (Cost=89 Cardinality=500 Bytes=19000)
    MERGE JOIN (Cost=87 Cardinality=500 Bytes=19000)
    TABLE ACCESS (CLUSTER) OF TS$ (CLUSTER) (Cost=86 Cardinality=426 Bytes=9372)
    INDEX (FULL SCAN) OF I_TS# (INDEX (CLUSTER)) (Cost=1 Cardinality=1)
    SORT (JOIN) (Cost=1 Cardinality=501 Bytes=8016)
    FIXED TABLE (FULL) OF X$KTTEFINFO (TABLE (FIXED)) (Cost=0 Cardinality=501 Bytes=8016)
    HASH (GROUP BY) (Cost=52 Cardinality=1 Bytes=38)
    NESTED LOOPS (Cost=50 Cardinality=1 Bytes=38)
    FIXED TABLE (FULL) OF X$KTTEFINFO (TABLE (FIXED)) (Cost=0 Cardinality=251 Bytes=4769)
    TABLE ACCESS (CLUSTER) OF TS$ (CLUSTER) (Cost=1 Cardinality=1 Bytes=19)
    INDEX (UNIQUE SCAN) OF I_TS# (INDEX (CLUSTER)) (Cost=1 Cardinality=1)
    HASH (GROUP BY) (Cost=5 Cardinality=1 Bytes=84)
    HASH JOIN (Cost=3 Cardinality=1 Bytes=84)
    NESTED LOOPS
    NESTED LOOPS (Cost=3 Cardinality=1 Bytes=65)
    HASH JOIN (Cost=2 Cardinality=1 Bytes=49)
    FIXED TABLE (FULL) OF X$KSPPI (TABLE (FIXED)) (Cost=1 Cardinality=1 Bytes=31)
    FIXED TABLE (FULL) OF X$KSPPCV (TABLE (FIXED)) (Cost=1 Cardinality=1899 Bytes=34182)
    INDEX (UNIQUE SCAN) OF I_TS1 (INDEX (UNIQUE)) (Cost=1 Cardinality=1)
    TABLE ACCESS (BY INDEX ROWID) OF TS$ (CLUSTER) (Cost=1 Cardinality=1 Bytes=16)
    FIXED TABLE (FULL) OF X$KTTEFINFO (TABLE (FIXED)) (Cost=0 Cardinality=251 Bytes=4769)
    TABLE ACCESS (BY INDEX ROWID) OF TS$ (CLUSTER) (Cost=1 Cardinality=1 Bytes=20)
    INDEX (UNIQUE SCAN) OF I_TS1 (INDEX (UNIQUE)) (Cost=1 Cardinality=1)
    FIXED TABLE (FIXED INDEX) OF X$KCFISTSA (ind:1) (TABLE (FIXED)) (Cost=0 Cardinality=1 Bytes=4)
    My question is two fold... does anybody know where in OEM you can control the execution of this query? I would like to reduce the frequency it is run, or if that is not a good idea does anybody have any ideas from a tuning perspective?
    Ignite is reporting 1,440 executions, 621,776,455 buffer gets, and 2 hours of CPU wait time per day.
    Thanks in advance,
    Zack

    A typical question for this forum.
    We use Oracle, we can't remember which version, and we can't be bothered to post it.
    We don't know Oracle, so we use a third party product (Ignite from Confio) to perform redundant monitoring on our databases, which is already being performed by Oracle Enterprise Manager, for free.
    Instead of trying to use the products which come with Oracle, we would like to wreck functionality, by tampering with things like frequency, and/or even adjusting Oracle provided queries, consequently invalidating our support contract for Oracle.
    And, no, we are not aware, provided the database is doing nothing, queries like this one will automatically surface in the list of top <n> queries.
    I would suggest you start to learn Oracle and dump Ignite. It is of no use to monitor your database with two tools, and OEM is fully integrated in Oracle.
    Sybrand Bakker
    Senior Oracle DBA

  • Cannot get Local Connection, No available resource, Wait-time expired

    Hi Friends,
    Please answer my queries below.
    Thanks and Regards
    Busincess Requirement
    I have to display a particular set of rows in a dashboard or screen, and it is being refreshed every 1 minute, also user can update from that screen displayed values.
    The below program extracts some data from database and passes to the front end through a collection where it is being displayed.
    Code Logic Flow
    1. CockpitAction calls CockpitOraDAO for database results
    2. CockpitOraDAO is a singleton class.
    3. After getting the CockpitOraDAO object, the action will then call the getLabAreaCockpitDetails() method.
    getLabAreaCockpitDetails will
         - Get the Connetion from the OracleConnectionManager class (It is a plain class with getPooledConnection() and releaseConnection() methods).
         - Execute the query and put the result to a collection
         - close the connection
         - return result to the calling action.
    This getLabAreaCockpitDetails() are called around once in every 1 minute
    So, I believe everytime a call is made to action for cockpit display, it will take the existing object of the CockpitOraDAO class and make a call to database. i.e there will be only one object of CockpitOraDAO reside in application server at any particular interval of time.
    My Understandings
    1. Only 1 object of CockpitOraDAO will reside in application server (provided it is not user longer and garbage collected) at a particular instance.
    2. Many objects of Connection will be created and destroyed.(Each time the getLabAreaCockpitDetails() method is called, we will get one connection from connection pool and in finally the Connection will be released to connection pool).
    My Problems
    It is showing the "Cannot get Local Connection, No available resource, Wait-time expired"
    after running around 1 full day.
    My doubts
    1. Can anybody say why I get this error ?
    2. There may be some connections are not closed. But I have checked at finally block, the status of the connection is closed after calling this method.
    3. There may be some problem due to the singleton instane of CockpitOraDAO, Is it affecting performance ?
    4. Is it valid that I have to make CockpitOraDAO as Singleton ?
    public class CockpitOraDAO extends DAOAdaptor //implements BISample
         private static CockpitOraDAO instance=null;
         private static boolean debug = true;
         * The below method will be used to provide the singleton intance of the CockpitOraDAO object.
         public static CockpitOraDAO getInstance()
              if (instance == null)
                   synchronized (CockpitOraDAO.class)
                        if (instance == null)
                             instance = new CockpitOraDAO();
              return instance;
         * The below method will be used to get the cockpit details of the lab area.
         * This will return collecton of sample details for the specific lab.
         public Collection getLabAreaCockpitDetails(Collection prevCockpitDetailList,Collection filterCriteria) throws Exception
         if(debug)
              System.out.println("Inside CockpitOraDAO::getLabAreaCockpitDetails() method");
              Connection conn = null;
              boolean sampleExists = false;
              PreparedStatement pstmt=null;
              ResultSet rs=null;
              String returnStr=null;
              StringBuffer sqlQuery = null;
              String tempComment1=null, tempComment2=null;
              LabCockpitDO labc=null;
              LabCockpitDO labc2=null;
              Collection resultList=null, manCommentList=null, labCommentList=null, labCompCommentList=null;
              ArrayList result1List=null, prevCockpitDetail1List=null,filterList = null;
              OracleConnectionManager manager = null;
              boolean flag = false;
              try
                   labc2 = new LabCockpitDO();
                   prevCockpitDetail1List = (ArrayList) prevCockpitDetailList;
                   sqlQuery = new StringBuffer();
                   sqlQuery.append("select s.sample_sample_no sample_no, s.sample_inspection_lot_no inspection_lot_no,");
                   manager = new OracleConnectionManager();
                   conn = manager.getPooledConnection("myDS");
                   pstmt = conn.prepareStatement(sqlQuery.toString());
                   if(debug)
                   System.out.println("Query********"+sqlQuery.toString());
                   rs = pstmt.executeQuery();
              catch(Exception e)
                   //System.out.println(e);
                   throw e;
              finally
                        try
                             manager.releaseConnection("myDS");
    if(debug)
    System.out.println("Connection Status Closed=true/ Open=false=["+conn.isClosed()+"]");
    if(conn!=null || !conn.isClosed())
    conn.close();
    if(debug)
    System.out.println("Connection Status After Closing Connection Closed=true/ Open=false=["+conn.isClosed()+"]");
                             if(rs != null)
                                  rs.close();
                             if(pstmt != null)
                                  pstmt.close();
                             conn = null;
                             pstmt=null;
                             rs = null;
                             sqlQuery=null;
                             returnStr=null;
                             labc=null;
                             labc2=null;
                             manCommentList=null;
                             labCommentList=null;
                             labCompCommentList=null;
                             tempComment1=null;
                             tempComment2=null;
                             resultList=null;
                             prevCockpitDetailList=null;
                             prevCockpitDetail1List=null;
                        catch(Exception e)
                             //System.out.println("Unable to Release Connection ="+e);
                             throw e;
              //if(debug)     
              //System.out.println(resultList);
              return result1List;
         }

    Hi,
    As you can see from other posts, this is a very common problem. Until now the cause always ends up pointing to a connection not being close.
    I suggest you try to run through a full single cycle of you app, while using the CLI monitoting to check that the connections created/closed matches the expected created/closed connections. Also that the number of free connections at the end is correct.

  • Wait time within a While Loop

    I was always under the impression that Wait Timers (e.g. Wait and Wait Ms Multiple) always executed last within a while loop. As I'm reading up on timing of real-time loops I'm finding that NI suggested using a stacked sequence structure to force timing to run last. Has my assumption of wait timer execution been wrong all this time or do PC and RT systems differ in how loops handle timing?
    Thanks,
    Craig

    So, ok, coming back on this.
    Attached you find a small example to show my remarks in the previous post.
    How to use it:
    The main focus is in the first iterations once "Wait now!" is pressed. So it is usually not of interest to run the "waiting" for more than 5-10 iterations.
    In order to see an "understandable" behavior, i suggest to wait at least 100ms. I configured "Time To Wait" to be at least 10 (coercing).
    The second focus is "Time Value".
    For "Wait (ms)", the "Time Value" will have any number, but increase each iteration by the amount of "Time To Wait".
    For "Wait Until Next Multiple (ms)", "Time Value" will be initialized to a value, which is a integer multiple of the "Time To Wait" and will increase each iteration to the next multiple.
    My example does not contain parallel code, so it does not show the parallelism of the waiting functions!
    Nevertheless, understanding the shown behavior is the key. Because if the code running in parallel to the waiting requires less execution time than the wait function will wait, the behavior will be exactly as shown.
    If the parallel code requires more execution time than the waiting, "Wait (ms)" is already finished and therefore the loop will immediatly continue with the next iteration (high CPU load!).
    If the parallel code requires more execution time than the waiting, "Wait Until Nexty Multiple (ms)" will wait that long that the "Time Value" is again in line to an integer multiple of the "Time To Wait" (so this one keeps on running in parallel until waiting time is calculated and over). Hence, "Wait Until Next Multiple" will still introduce a waiting time (reduced CPU load), but you will "miss complete iteration slots".
    As you can see, using a single "Wait Until Next Multiple" outside the loop for initialization can make sense if the first iteration should also have a "close to normal" execution time.
    Please note that the Timed Loop does something similar once started. As it does it during the iterations, the first 1-3 iteration(s) are called "warmup iterations". Most often, the first single iteration is sufficient for this though....
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.
    Attachments:
    TimingVI_Behavior_2011.vi ‏29 KB

  • Wait time

    Hi, in our business after machining we need to keep the product in an area for 30 mins. after that the product will be moved to second operation. i think we can capture those 30 mins thru wait time. pls advise where and how to capture that 30 mins. pls note that we want to capture the cost of that 30 mins also. pls suggest.

    Dear,
    In work center queue time is your wait interoperation time or in CA01 or CA02 operation details screen minimum wait time has to be enter in the operation (view "Interoperation times")
    Then go to transaction CA02 ( change routing ) and schedule routing using following menu:
    Extras -> Scheduling -> Schedule
    In scheduling overview screen press on 'Scheduling results' button. Scheduled interoperation time calculated.
    Also note the wait time is scheduled according to the Gregorian calendar, i.e. neither a factory calendar nor the capacity of the work center are taken into account.
    Hope clear to you.
    Regards,
    R.Brahmankar

  • Wait time frequent insert

    Hello
    This was my exam question and still not sure about the answer
    You notice there is a very high percentage of wait time for contention event in your Rac database that has frequent insert operations.
    Which two recommendations may reduce this problem ?
    a-)shorter transactions
    b-)increasing sequence cache sizes
    c-)using reverse key indexes
    d-)uniform and large extents sizes
    e-)automatic segment space managemnt
    f-)smaller extent sizes Any suggestion ?

    Again, what exam are we talking about? If you're talking about one of the Oracle certification exams, be aware that you're not allowed to discuss post exam questions on public forums or to discuss them with other candidates. That's a violation of your certification agreement.
    Assuming we are not talking about an Oracle certification exam, I'd point out to the instructor that any or all the answers might be correct depending on the wait event.
    Justin

  • High Database Waits of type "other"

    I justed added cpu patch 19 to my 11.1.0.7 windows 2008 database. Now I have a large amount of database waiting of type "other". See below.
    Investigate the cause for high "unspecified wait event" waits. Refer to Oracle's "Database Reference" for the description of this wait event.
    Action Investigate the cause for high "unspecified wait event" waits in Service "SYS$USERS".
    Action Investigate the cause for high "unspecified wait event" waits in Module "DBMS_SCHEDULER"
    Could stale statistics cause this and if so what is the correct way to gather system statistics. Do I unlock sys schema , gather data dictionary stats, and then lock sys schema?
    Other thoughts what might cause this?
    Thanks,
    Kathie

    Hi,
    You should run the following.
    DBMS_STATS.GATHER_SYSTEM_STATS (
    gathering_mode VARCHAR2 DEFAULT 'NOWORKLOAD',
    interval INTEGER DEFAULT NULL,
    stattab VARCHAR2 DEFAULT NULL,
    statid VARCHAR2 DEFAULT NULL,
    statown VARCHAR2 DEFAULT NULL);
    dbms_stats.gather_system_stats(gathering_mode=>'start');
    dbms_stats.gather_system_stats(gathering_mode=>'stop');
    System statistics will start gathering afetr you run the command with start option. System stats gathering will stop and may show them locked after you run stop.
    NOWORKLOAD: Will capture characteristics of the I/O system. Gathering may take a few minutes and depends on the size of the database. During this period Oracle will estimate the average read seek time and transfer speed for the I/O system. This mode is suitable for the all workloads. Oracle recommends to run GATHER_SYSTEM_STATS ('noworkload') after creation of the database and tablespaces. To fine tune system statistics for the workload use 'START' and 'STOP' or 'INTERVAL' options. If you gather both 'NOWORKLOAD' and workload specific (statistics collected using 'INTERVAL' or 'START' and 'STOP' ), the workload statistics will be used by optimizer. Collected components: cpuspeednw, ioseektim, iotfrspeed.
    INTERVAL: Captures system activity during a specified interval. This works in combination with the interval parameter. You should provide an interval value in minutes, after which system statistics are created or updated in the dictionary or stattab. You can use GATHER_SYSTEM_STATS (gathering_mode=>'STOP') to stop gathering earlier than scheduled. Collected components: maxthr, slavethr, cpuspeed, sreadtim, mreadtim, mbrc.
    START | STOP: Captures system activity during specified start and stop times and refreshes the dictionary or stattab with statistics for the elapsed period. Interval value is ignored. Collected components: maxthr, slavethr, cpuspeed, sreadtim, mreadtim, mbrc.
    interval
    Time, in minutes, to gather statistics. This parameter applies only when gathering_mode='INTERVAL'.
    Regards

  • Java.sql.SQLException: No available resource. Wait-time expired.

    Hi all,
    The application platform is SunONE Application Server 7, and the database is ORACLE 9i. My Website application will raise the SQLException once a few days' running. Everything will be ok once the Application server has been restarted. The detail about the Exception is :
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: java.sql.SQLException: No available resource. Wait-time expired.
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:251)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:98)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.util.EnvUtil.getDSConnection(EnvUtil.java:72)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.util.DirectDSUtil.getObjectsFromDS(DirectDSUtil.java:103)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.jcsms.dam.JcsmsDDSA.getSpecialistByPage(JcsmsDDSA.java:388)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.jcsms.sessionbeans.SpecialManagerEJBBean.listSpecialist(SpecialManagerEJBBean.java:1941)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.jcsms.sessionbeans.SpecialManagerEJBBean_EJBObjectImpl.listSpecialist(SpecialManagerEJBBean_EJBObjectImpl.java:702)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.jcsms.sessionbeans._SpecialManagerEJBBean_EJBObjectImpl_Tie._invoke(Unknown Source)thanks for any help
    Niu

    Ther is a related Bug i n Oracle: Bug No. 4420032
    PROBLEM STATEMENT: ------------------
    The Oracle client file ojdbc_14.jar is not handling exceptions correctly. The connection pool slowly runs out of connections and hits the oracle db limit of max_sessions. Increasing the db max_sessions does not help as the number of sessions continue to increase.
    The vendor developers of ct's application have identified a code problem with the Oracle client file ojdbc_14.jar. Their description follows.
    The following is a technical description of the Oracle JDBC client library issue. The jar file in question is: ojdbc_14.jar. This issue is also present in the 9.2.05 and 9.2.06 versions of the client code.
    The socket.close() call in TcpNTAdapter.disconnect() does not properly handle network exceptions. Where the exception should be handled within the code segment calling socket.close(), the class instead throws an exception without ensuring the socket is closed. The socket is not subsequently closed by clients of the class. This ultimately results in a connection leak. Overtime, the maximum number of Oracle database sessions is reached. The only work around for this issue in production, is to restart the effected processes.
    The code segment:
    public void disconnect()
    throws IOException { 
    socket.close();
    socket = null; }
    should be along the lines of:
    public void disconnect()
    throws IOException { 
    try{  socket.close();  }
    catch(IOException ioe){  throw ioe;  }
    finally{  socket = null;  } }
    The original code segment will not execute the statement "socket = null" when . an exception occurs. Given the fact that the exception is not subsequently processed properly, the object is never dereferenced, and the socket remains open for the life of the process. Adding this statement in the finally block . ensures the object will ultimately be destroyed by the garbage collector. . ct tested this change in their lab and found that the recommended modification successfully resolved the issue.
    This problem has occurred with the previous ct's application releases, but the vendor has only recently been able to isolate the root cause. The JDBC connection pool slowly runs out of connections and hits the oracle db limit of max_sessions.
    Increasing the db max_sessions does not help as the number of sessions continue to increase. This problem has been occuring in Production over the past few releases of the application, but usually the connections leak slowly. This problem can be duplicated under heavy load in just a few minutes . in the Loadtest environment.

  • Deadlocks and very high wait times

    We are seeing a very high number of deadlocks in the system. The deadlocks trace all show a 'enq: TX - row lock contention' with wait times of around 2929700+ seconds ex:
    last wait for 'enq: TX - row lock contention' blocking sess=0x70000006d85e1b8 seq=55793 wait_time=2929704 seconds since wait started=4
    name|mode=54580006, usn<<16 | slot=1d0010, sequence=705f
    Dumping Session Wait History
    for 'enq: TX - row lock contention' count=1 wait_time=2929704
    name|mode=54580006, usn<<16 | slot=1d0010, sequence=705f
    for 'latch: enqueue hash chains' count=1 wait_time=1649
    address=70000006dbb4a20, number=13, tries=0
    for 'enq: TX - row lock contention' count=1 wait_time=2929708
    name|mode=54580006, usn<<16 | slot=1d0010, sequence=705f
    for 'SQL*Net message from client' count=1 wait_time=101740
    driver id=54435000, #bytes=1, =0
    for 'SQL*Net message to client' count=1 wait_time=1
    driver id=54435000, #bytes=1, =0
    for 'direct path write temp' count=1 wait_time=921
    file number=fb, first dba=6521b, block cnt=2
    for 'SQL*Net more data from client' count=1 wait_time=3
    driver id=54435000, #bytes=10, =0
    for 'SQL*Net more data from client' count=1 wait_time=5
    driver id=54435000, #bytes=1e, =0
    for 'SQL*Net more data from client' count=1 wait_time=10
    driver id=54435000, #bytes=2c, =0
    for 'SQL*Net more data from client' count=1 wait_time=5
    driver id=54435000, #bytes=3a, =0
    Any ideas on how to resolve this ?
    Thanks
    Surya

    Sorry for the typo, that Ora-0060 error we are seeing. Here is the deadlock graph:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
    and Real Application Testing options
    ORACLE_HOME = /orasw/product/10.2.0.4.0
    System name: AIX
    Node name: spda5001
    Release: 3
    Version: 5
    Machine: 00074D5AD400
    Instance name: IAMS01P1
    Redo thread mounted by this instance: 1
    Oracle process number: 21
    Unix process pid: 2306444, image: oracle@spda5001
    *** 2011-12-24 05:05:39.885
    *** SERVICE NAME:(IAMS01P) 2011-12-24 05:05:39.884
    *** SESSION ID:(443.2130) 2011-12-24 05:05:39.884
    DEADLOCK DETECTED ( ORA-00060 )
    [Transaction Deadlock]
    The following deadlock is not an ORACLE error. It is a
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00080020-000c3957 21 443 X 58 391 X
    TX-001d0010-0000705f 58 391 X 21 443 X
    session 443: DID 0001-0015-0000002E session 391: DID 0001-003A-00000081
    session 391: DID 0001-003A-00000081 session 443: DID 0001-0015-0000002E
    Rows waited on:
    Session 391: obj - rowid = 0001098B - AAATtpAAGAAADROAAD
    (dictionary objn - 67979, file - 6, block - 13390, slot - 3)
    Session 443: obj - rowid = 00010B25 - AAARRwAAGAAAAdgAAN
    (dictionary objn - 68389, file - 6, block - 1888, slot - 13)
    Information on the OTHER waiting sessions:
    Session 391:
    pid=58 serial=16572 audsid=52790041 user: 93/IAMS_USR
    O/S info: user: , term: , ospid: 1234, machine: mac3023
    program:
    Current SQL Statement:
    update spt_identity set created=:1, modified=:2, owner=:3, assigned_scope=:4, assigned_scope_path=:5, extended1=:6, extended2=:7, extended3=:8, extended4=:9, extended5=:10, extended6=:11, extended7=:12, extended8=:13, extended9=:14, extended10=:15, extended11=:16, extended12=:17, extended13=:18, extended14=:19, extended15=:20, extended16=:21, extended17=:22, extended18=:23, extended19=:24, extended20=:25, name=:26, description=:27, protected=:28, iiqlock=:29, attributes=:30, manager=:31, display_name=:32, firstname=:33, lastname=:34, email=:35, manager_status=:36, inactive=:37, last_login=:38, last_refresh=:39, password=:40, password_expiration=:41, password_history=:42, bundle_summary=:43, assigned_role_summary=:44, correlated=:45, auth_question_lock_start=:46, failed_auth_question_attempts=:47, controls_assigned_scope=:48, certifications=:49, activity_config=:50, preferences=:51, history=:52, scorecard=:53, uipreferences=:54, attribute_meta_data=:55, workgroup=:56 where id=:57
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    update spt_workflow_case set created=:1, modified=:2, owner=:3, assigned_scope=:4, assigned_scope_path=:5, stack=:6, attributes=:7, launcher=:8, host=:9, launched=:10, completed=:11, progress=:12, percent_complete=:13, type=:14, messages=:15, name=:16, description=:17, complete=:18, target_class=:19, target_id=:20, target_name=:21, workflow=:22 where id=:23

  • Parameter for jdbc waiting time

    I'm using wls5.1+sp10 on Solaris 8
    I've configured 25 jdb connections in jdbc connection pool, but my
    application will generate jdbc connection request more than that. All the
    database calling are using CMP. I checked the document that we can configure
    the waiting time for t3 driver. But I'm using Oracle OCI driver. Is there
    any parameter I can tune to let the CMP to wait longer time to get the jdbc
    connection? I found the default the value is 3 seconds which is too small
    for me.
    Thanks!

    hi check the below link on JDBC adapter
    http://help.sap.com/saphelp_nw70/helpdata/EN/96/791c42375d5033e10000000a155106/frameset.htm
    https:/.../weblogs/sdn_weblogs_topics/pub/wlg/4183
    recent enhancements to JDBC adapter
    https:/.../weblogs/sdn_weblogs_topics/pub/wlg/1278
    https:/.../weblogs/sdn_weblogs_topics/pub/wlg/4020
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • Inconsistent IO Wait Time

    I'm trying to comprehend why oracle seems to more efficiently table scan a table when it has more rows than when it has less.
    I have run a bunch of queries against the database, and I have tracked their wait events stats.
    And it seems that this ratio:
    ReacorsPerWait = #records/ wait_time,
    where db_file_scattered_read is the most significant wait event by a lot
    This Ratio simply Increases on and on, although the rate of increase grows eventually slower.
    Namely, this ratio is practically the same when the relatio changes from 25 Million tuples to 125 Million tuples. But
    before reaching that ratio threshold, the ratio increases quite significantly from test to test.
    (From 0.2 Million to 1 million, to 5 million and to 25 Million...
    It increases way too fast. I get changes in rate of more than 40%)
    I just cannot make any sense of this performance change, If the number of records is increasing by 5 the IO time should also be increasing by 5.
    What I have tried to do to fix this at some constant rate was: set the db_multiblock_read_count at some constant value. I set it up to like 10 MB. (10* 1024 KB / 8 KB)
    But the results are the same, with or without a fixed multiblock read count, Oracle IOs faster when the relation is bigger. What is the cause of this? Any Ideas.
    Another interesting thing is that the Cache Hit Ratio is reducing as the IO speed is increasing.
    But the number of physical reads increase proportionately (times 5). I thought that this migh be explained because Oracle might Use larger Multi Block Reads when the relation was larger - or something like that.
    But now I know that that cannot be the reason.
    (By the way: this change in rate could be explained - partially - in the tests from 0.2Million to 1 million due to other wait time like reading control file, which is significant for small examples. But from 1 Million oward, approximately 99% of the wait time is doing the db file scattered read)
    Edited by: sono99 on Nov 4, 2009 4:22 AM
    Edited by: sono99 on Nov 4, 2009 4:30 AM
    Edited by: sono99 on Nov 4, 2009 4:32 AM

    sono99 wrote:
    HI, thank you for trying to help.
    "It's likely that measurements also vary with row size and not just row count ... not to mention half a dozen other features.
    There are a couple of obvious possibilities:"I think that are not likely to be reason of the improvement in IO performance. Sure, I am not saying that standard deviation of row size is 0, but I'd say whichever the STD for the row size is, it will be pretty small.
    To begin with, the table is populated with data generated by a home coocked program.
    The table has like 6 collumns of integer type, none of them has null values.
    If you ask a generic question you get generic answers.
    Your original posting was about "the database", not about "a specific table created on a single disc for test purposes".
    Have you tried cloning the table several times and seeing if the results are consistent across all clones ? There are several possible causes of variation in your case, for example has part of your table has ended up on a less fragmented part of the disc, or on the outer edge of the disc, so that the multiblock reads are more effective, or the disk-level track caching is more effective.
    All sorts of strange side effects can appear when you create single user tests on small machines, and you have to be careful to consider the effects of multi-user activity on "realistic" system when constructing tests. It can be quite difficult to identify the points where a test is not properly representative of the mechanism you are trying to investigate.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • ECC 6 SR3 upgrade I am getting following error at  RSVBCHCK

    2EETQ241 Errors found in logfiles - accumulated in file "PSVBCHCK.ELG" 1EETQ203 Upgrade phase "JOB_RSVBCHCK_D" aborted with errors 1 ETH010XRSVBCHCK: Check of open update requests 2EETG050 Update records still exist - Please process. There is no SM13

  • Problem in subclass with ActionListener

    Hello, I need to program two forms which are identical except for the actions their buttons should do and some other minor differences, therefore I made a superclass for one of the forms and then extended it to build the other form. I messed up and w

  • OBIEE 11.1.1.6.1 BP1 How to import rows more than 2500 ?

    Hi, I am using OBIEE 11.1.1.6.2 BP1. I want to increase the number of rows exporting in an Excel sheet which is 2500 (by default) at the moment. Following is th configuration of my instance config file: but I am still downloading not more than 2500.

  • Enabling calendaring for a user or group not working

    Am having an issue getting ical server/sharing and webcalandars working. Think it is all related. First a description of my server environs. One xserve acting as OD master, fileserver, vpn, DNS and DHCP server as well. Second xserve acting as DNS, ma

  • Cannot create stored procedure in Azure SQL database

    When I try to create a stored procedure using Management Studio (Snippet follows use PPSC_Sky_Data go /****** Object:  StoredProcedure [dbo].[sp_RegisterProd]    Script Date: 17-02-2015 17:52:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON G