USED_UREC in v$transaction

Hi friends,
One question regarding USED_UREC v$transaction view in the my 11.2.0.3.0 version database.
16:04:05 aim_dba@GLBABP1>  create table test_CHAR as select object_name as UN_INDEX, object_name as INDEX_  from dba_objects;
Elapsed: 00:00:13.07
16:07:31 aim_dba@GLBABP1>  exec dbms_stats.gather_table_stats(ownname=>'AIM_DBA', tabname=>'TEST_CHAR', granularity=>'ALL', cascade=>true, degree=>4, method_opt =>'FOR ALL INDEXED COLUMNS', estimate_percent =>100);
Elapsed: 00:00:14.96
16:07:56 aim_dba@GLBABP1> update TEST_CHAR set UN_INDEX='TEST';
880883 rows updated.
Elapsed: 00:00:32.10
16:08:45 aim_dba@GLBABP1> @cn TEST_CHAR;
  COUNT(1)
    880883
1 row selected.
---from other sessions while checking the UNDO stats i get the below
15:56:49 aim_dba@GLBABP1> /
   SID SERIAL# USERNAME   SCHEMANAME      PROCESS         MACHINE    SQL_ID        PREV_SQL_ID   STATUS    USED_UBLK  USED_UREC START_TIME
   149   17379 AIM_DBA    AIM_DBA         22195           indlin314  16axuazrykqb0 16axuazrykqb0 INACTIVE      19468    1761688 01/30/13 16:08:12
16:08:47 aim_dba@GLBABP1> l
  1  select s.sid,s.serial#,
  2  s.USERNAME,
  3  s.SCHEMANAME,
  4  --s.OSUSER,
  5  s.PROCESS,
  6  s.MACHINE,
  7  s.SQL_ID,
  8  s.PREV_SQL_ID,
  9  --s.EVENT,
10  s.STATUS,
11  USED_UBLK,USED_UREC,START_TIME
12*  from v$session s, v$transaction t where s.taddr=t.addr
I would like to know from where the number 1761688 comes from.
880883 is the number of records in the table.
I googled/searched on Metalink but no still no clue. The table is not INDEXED.
Regds,
Kunwar

>
I think I've written something about this somewhere before, but I can't find the notes.
For some reason, in versions of Oracle from 10g onwards, a large update can decide that it needs to go into "write consistency" mode, so it rolls back and restarts. On the restart, however, it updates row by row (rather than using an internal array method) and locks each row before updating it - this is why you end up with used_urec close to 2 * rows updated. I don't know why this happens. It's possible that it's only relevant for a large update after a direct load, or CTAS, or insert as select.Wow, write consistency for Undo , absolutely had no idea about it sir! Yes , I believe for some large chunk of data only as I tested with a small table and the count was same as the number of the rows of the table. I thought it had to do something with the average row length of the row but your explanation ruled it out. Thanks so much , learned again something new today :- ) . And I tried to search but I couldn't find anything written by you about it.
Sample of undo block dump showing the effect:
* Rec #0x7  slt: 0x00  objn: 79294(0x000135be)  objd: 79295  tblspc: 5(0x00000005)
*       Layer:  11 (Row)   opc: 1   rci 0x06  
Undo type:  Regular undo   Last buffer split:  No
Temp Object:  No
Tablespace Undo:  No
rdba: 0x00000000
KDO undo record:
KTB Redo
op: 0x02  ver: 0x01 
compat bit: 4 (post-11) padding: 0
op: C  uba: 0x00c007bc.0234.06
KDO Op code: LKR row dependencies Disabled
xtype: XA flags: 0x00000000  bdba: 0x0140050c  hdba: 0x01400480
itli: 2  ispac: 0  maxfr: 4863
tabn: 1 slot: 183 to: 0
* Rec #0x8  slt: 0x00  objn: 79294(0x000135be)  objd: 79295  tblspc: 5(0x00000005)
*       Layer:  11 (Row)   opc: 1   rci 0x07  
Undo type:  Regular undo   Last buffer split:  No
Temp Object:  No
Tablespace Undo:  No
rdba: 0x00000000
KDO undo record:
KTB Redo
op: 0x02  ver: 0x01 
compat bit: 4 (post-11) padding: 0
op: C  uba: 0x00c007bc.0234.07
KDO Op code: ORP row dependencies Disabled
xtype: XA flags: 0x00000008  bdba: 0x0140050c  hdba: 0x01400480
itli: 2  ispac: 0  maxfr: 4863
tabn: 1 slot: 183(0xb7) size/delt: 11
fb: --H-FL-- lb: 0x2  cc: 3
null: ---
kdrhccnt=3,full row: 2C 02 03 0D 01 6B CC C3 05 01 4BUndo record 7 is the undo for "lock row 183"
Undo record 8 is the undo for "update row 183"
Right! But I am still not sure that what good is achieved by doing this? Isn't it an extra work ?
Regards
Aman....

Similar Messages

  • How to get the complete sessions information ?

    Dear All,
    Can any one post a script to get complete sessions information.
    Thanks in advance

    Hi,
    The following script may help u on finding the active sessions on your Oracle database .
    SELECT SID,
    serial#,
    username,
    (SELECT holding_session
    FROM dba_waiters
    WHERE waiting_session = s.SID
    AND ROWNUM = 1
    AND holding_session NOT IN (SELECT waiting_session
    FROM dba_waiters))
    holding_session,
    DECODE (s.status,
    'ACTIVE', ROUND (last_call_et / 60),
    0
    ) time_min,
    DECODE (s.status,
    'ACTIVE', last_call_et,
    0
    ) time_sec,
    (SELECT used_urec
    FROM v$transaction t
    WHERE t.addr = s.taddr) undo_records,
    (SELECT ROUND (sl.sofar / sl.totalwork * 100, 2)
    FROM v$session_longops sl
    WHERE s.SID = sl.SID
    AND s.serial# = sl.serial#
    AND s.status = 'ACTIVE'
    AND sl.time_remaining > 0) progress,
    (SELECT event
    FROM v$session_wait w
    WHERE w.SID = s.SID) wait_event,
    (SELECT ROUND (VALUE / 1024 / 1024, 2) || 'M'
    FROM v$sesstat
    WHERE SID = s.SID
    AND statistic# = 20) pga_size,
    (SELECT ROUND (VALUE / 1024 / 1024, 2) || 'M'
    FROM v$sesstat
    WHERE SID = s.SID
    AND statistic# = 15) uga_size,
    (SELECT VALUE
    FROM v$sesstat
    WHERE SID = s.SID
    AND statistic# = 4) commits,
    (SELECT sql_text
    FROM v$sql t
    WHERE s.sql_address = t.address
    AND s.sql_hash_value = t.hash_value
    AND ROWNUM = 1) sql_used,
    (SELECT MESSAGE
    FROM v$session_longops sl
    WHERE s.SID = sl.SID
    AND s.serial# = sl.serial#
    AND s.status = 'ACTIVE'
    AND sl.time_remaining > 0) long_ops,
    (SELECT LOWER (ins.instance_name)
    || '_ora_'
    || LTRIM (TO_CHAR (a.spid))
    || '.trc' filename
    FROM v$process a
    WHERE a.addr = s.paddr) trace_file_name,
    resource_consumer_group,
    s.status,
    server,
    osuser,
    program,
    module,
    action,
    NVL (LOWER (s.machine), ins.host_name) machine
    FROM v$session s,
    v$instance ins
    WHERE username IS NOT NULL
    AND s.status = 'ACTIVE'
    AND s.audsid <> USERENV ('sessionid')
    ORDER BY DECODE (s.status,
    'ACTIVE', ROUND (last_call_et),
    0
    ) DESC
    Regards,
    Kumar
    [www.idatamax.com]

  • Reg: Rows_Processed column in v$SQLAREA

    Hi all,
    I had a request to check the rows processed while an insert statement is running in the database.
    Can anyone clarify me on this from v$sqlarea (rows_processed) is it possible to get the rows processed till that time.
    As i am in thinking that it depends on how application has commit transactions.
    Can any one throw some light on this request...
    Thanks in advance...
    Satya G

    Hi,
    Rows_processed column of v$sql gives the count of total rows that has been processed whether it is committed or not committed. It gives the sum of rows processed by the query even if some of the transaction has been rollbacked.
    I suppose you are looking for USED_UREC in v$transaction.
    Regards
    Anurag

  • Roll back segments - Oracle 8i

    Hi :
    i am running my production db on 8i and i am noticing that my roll back tablespace is running out of space. I want to add a datafile to the tablespace. Can i do this while keeping the tablespace online ?
    - BMP

    In Oracle 9i Database and below, you can issue the query
    SELECT USED_UREC
    FROM V$TRANSACTION;
    which returns the number of undo records used by the current transaction, and if executed repeatedly, will show continuously reduced values because the rollback process will release the undo records as it progresses. You can then calculate the rate by taking snapshots for an interval and then extrapolate the result to estimate the finishing time.
    ~ Madrid

  • Undo for record that doesn't exist?

    hi,
    version:11g
    select * from emp_d1;
    ID1     NAME1
    1     1
    2     2
    3     3
    4     4
    5     5if i try to delete a record that does not exist
    delete from emp_d1 where id1=-10;will there be any undo/redo generated?
    i tried a code,
    select  s.username, rn.name,     rs.curext
               ,rs.curblk,  t.used_ublk, t.used_urec
        from    v$transaction   t
               ,v$session       s
               ,v$rollname      rn
               ,v$rollstat      rs
        where  t.addr     = s.taddr
        and    t.xidusn   = rn.usn
        and    rn.usn     = rs.usn;
    USERNAME     NAME     CUREXT     CURBLK     USED_UBLK     USED_UREC
    TEST_DBA     _SYSSMU11_1265638203$     180     5105     1     1if there is a query which retrieves to delete non-existing records can eat up undo space?
    is there a way to query the records which are there in undo segments?
    thanks,
    charles

    You can try to use some flashback query features to query undo data: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17125/adfns_flashback.htm#insertedID0.

  • Update with undo

    Is there any ways to execute an update to a table without Oracle using the UNDO. I get the following errors while trying to update a table. The Drive where the UNDO Tablespace is located has 40MB of space left.
    ORA-30036: unable to extend segment by 8192 in undo tablespace
    O/S-Error: (OS 112) There is not enough space on the disk
    ORA-27059: skgfrsz: could not reduce file size

    See you can reuse the same UNDO tablespace by waiting for transactions to end by checking the query
    >> select XIDUSN,USED_UBLKS,USED_UREC from v$transaction;
    to verify how much of undo blocks returned by each undo segment, ADD a datafile to your undo tablespace by specifying a free disk with large extent size and high value for INITTRANS and MAXTRANS
    and then manually set SET TRANSACTION USE ROLLBACK SEGMENT SYS**?? based on the new UNDO SEGMENT NUMBER which you would get from
    select usn from v$ROLLNAME;
    but if your application is very urgent then you would have to kill some sessions using
    select username,sid,serial# from v$session;
    issue>> Alter session kill 'sid,serial#';
    of the low priority sessions.
    Do all the above and report to me if you have further problems.

  • Procedure recreation taking time

    Hai
    in the package we have wrongly commented the line
    exit when <var1> is nullNow when we execute the query the it HANGS. we do not know how to proceed further.
    we have tried to recreate the procedure but it hangs.
    Tell us a good solution
    Unix server, Oracle Version:10.2.0.4
    Kindly help
    S

    A Beginner wrote:
    Haii
    As you said i killed all the session running currently
    then again execute the sql script for package from unix server.
    it is still hanging.
    throws me error
    ERROR at line 1:
    ORA-04021: timeout occurred while waiting to lock object
    SOP_ADM.PK_CONSTRUCTEURSo pls help
    SYou killed the session, but is it currently rolling back?
    select  
       t.USED_UBLK,
       t.USED_UREC
    from
       v$transaction  t,
       v$session      s
    where
       t.addr = s.taddr
    and
       s.sid = :sid_you_killed;Run that 1 or 2 times (give it a couple seconds between runs) ... if the numbers are decreasing then the session is currently rolling back.
    You will have to wait until it's finished.

  • Rollback is taking ages

    I am deleting old data from a big table, first I deleted 2 million rows with no problems, it took 5 minutes.
    I did commit with no problems.
    Then I tried to delete another 8 millon rows. After 3 hours the query was still running so I killed the session.
    That was a couple of hours ago and the session is still marked as killed but the rollback seems to take forever and ever.
    I am the only one working against this table.
    Is there any way to calculate how much time will it take to terminate the session?
    Thanks

    In order to estimate the amount of time rollback will take, some queries on V$ views have to be performed.
    SELECT USED_UREC
    FROM V$TRANSACTION;
    Long operations have to be monitored from the v$session_long_ops where an estimated time can be calculated:
    select time_remaining
    from v$session_longops
    where sid = <sid of the session doing the rollback>;
    You can check this document, where this topic is further explained: http://www.oracle.com/technology/pub/articles/10gdba/week2_10gdba.html
    DELETE is the most resource consuming operation, as it has to store all the row inside the rollback segment. Verify that rollback tablespace is sized to the estimated required, otherwise, it will start dynamically allocating storage, wich reduces performance.
    Madrid

  • V$transaction used_urec but what is total available urec ?

    Hi,
    I wonder if I can know how many urec (undo records or undo block) I've got as whole in database.
    So if v$transaction says used_urec = 1000 I know thats the 10% of all undo records available .
    DB is 9.2.0.8 .
    Regards.
    GregG

    >
    I wonder if I can know how many urec (undo records or undo block) I've got as whole in database.
    So if v$transaction says used_urec = 1000 I know thats the 10% of all undo records available .
    DB is 9.2.0.8 .Undo records can be any size from about 100 bytes to an entires block, so there is no measure that you can apply. You can only consider the number of undo blocks, which is about the same as the number of undo blocks in the undo tablespace you are using.
    Regards
    Jonathan Lewis

  • V$transaction.used_urec

    I ran some simple tests on updates.
    create table mytable (myvar varchar(10));
    insert into mytable select substr(object_name,1,10) from dba_objects where rownum < 2001;
    commit;
    Now doing update and checked used_urec
    update mytable
    set myvar = 'NOOO';
    when I query used_urec I get 2000 used_urec records.
    This does not surprise me.
    I am running a large update that is joining 2 tables and updating 1.95 m records. The fields being updated are indexed.
    Should the total used_urec = the number of rows updated in this case since I am not updating an indexed field ?
    I have already done 2.6m used_urec records?

    >
    I wonder if I can know how many urec (undo records or undo block) I've got as whole in database.
    So if v$transaction says used_urec = 1000 I know thats the 10% of all undo records available .
    DB is 9.2.0.8 .Undo records can be any size from about 100 bytes to an entires block, so there is no measure that you can apply. You can only consider the number of undo blocks, which is about the same as the number of undo blocks in the undo tablespace you are using.
    Regards
    Jonathan Lewis

  • The transaction does not die after the kill and I have to restart Oracle

    Hi,
    I have this very hard issue with my production environment.
    A transaction started from java hangs after the user has closed the browser before the transaction was completed. The transaction remains in wait for "latch free" in v $ transaction.
    When the WebSphre is stopped the transaction is not closed. Neither the kill on Oracle or on Unix conclude the transaction. The restart of the DB is required.
    The rollback segment pointed to by the transaction is always the same. Although the procedure call by java is always the same.
    The database does not have performance problems and only one transaction per day waits for "latch free" and do not closed.
    The problem could be the rollback segment? Why Oracle is unable to resolve the transaction even if the client is dead and the WebSphere off?
    Regards,
    BingoBongo

    The average duration of the transaction is 10/15 seconds.
    When it lasts longer the client is closed and the transaction remains locked. But not always only in a particular case.
    From this moment the transaction is waiting for "latch free" and the value of the field USED_UBLK/USED_UREC does not increase and not decrease.
    The wait event is always the "latch free".
    The kill (Unix, Oralce) has no effect on the transaction.
    The rollback segment is always the same.
    The procedure call is always acts the same.
    The value of "SECONDS_IN_WAIT-WAIT_TIME/100" increases up to a certain point and then start over again.
    This is a snapshot of a transaction that requires restart of the DB:
    STATUS
    SECONDS_IN_WAIT-WAIT_TIME/100
    CR_CHANGE
    XIDUSN
    SECONDS_IN_WAIT
    WAIT_TIME
    STATE
    EVENT
    USED_UBLK
    USED_UREC
    OSUSER
    CLIENT_INFO
    ROW_WAIT_BLOCK#
    ROW_WAIT_OBJ#
    PROGRAM
    MODULE
    ACTIVE
    399,99
    178
    10
    400
    1
    WAITED KNOWN TIME
    latch free
    11
    738
    was5a
    0
    56204
    JDBC Thin Client
    JDBC Thin Client

  • ORA-01591: lock held by in-doubt distributed transaction string

    Hi All,
    How to find out which query is locking the table. this is what I got when I ran the below query.
    SQL> SELECT addr,KTUXEUSN, KTUXESLT, KTUXESQN, /* Transaction ID */
    2 KTUXESTA Status,
    3 KTUXECFL Flags
    4 FROM x$ktuxe
    5 WHERE ktuxesta!='INACTIVE'
    6 AND ktuxeusn=7;
    ADDR KTUXEUSN KTUXESLT KTUXESQN STATUS
    FLAGS
    5D32920C 7 35 1672382 PREPARED
    SCO|COL|REV|DEAD
    Thanks

    Here is the output:
    INST_ID SID SERIAL# STATUS
    MACHINE
    PROGRAM USED_UBLK
    HOURS_ACTIVE USED_UREC
    1 11 49014 ACTIVE
    \WSDB0335
    w3wp.exe 1
    64.295 1
    INST_ID SID SERIAL# STATUS
    MACHINE
    PROGRAM USED_UBLK
    HOURS_ACTIVE USED_UREC
    1 99 312 INACTIVE
    WSDB0335
    ORACLE.EXE 1
    64.295 1

  • Oracle Transaction Hanging

    A transaction from a packaged application is hanging and has to be aborted - no other sessions are active. It was working fine a week ago. There are no errrors in the Alert log. What is the best way to troubleshoot this without access to source code ? Is it possible to identify the SQL that is invovled and any locked objects ? I see a table v$locked_object but do not know if it would be useful
    thanks for any pointers

    you can creat a script like this one(it will not work properly due to need create some tables) to see what the application doing when it is hang:
    set lines 200
    set pages 1000
    set verify off
    set feedback off
    accept the_sid prompt "SID= "
    delete from temp_sql_hash_address where id_str='SIDINFO';
    set head off
    select 'SID(' || &the_sid || ')info' from dual;
    select '---------------' from dual;
    set head on
    column machine format a30
    column terminal format a30
    column program format a30
    select username,status,
    decode(command, 1,'CRE TAB',2,'INSERT',3,'SELECT',4,'CRE CLUSTER',5,'ALT CLUSTER',
    6,'UPDATE',7,'DELETE',8,'DRP CLUSTER',9,'CRE INDEX',10,'DROP INDEX',11,'ALT INDEX',
    12,'DROP TABLE',13,'CRE SEQ',14,'ALT SEQ',15,'ALT TABLE',16,'DROP SEQ',17,'GRANT',
    18,'REVOKE',19,'CRE SYN',20,'DROP SYN',21,'CRE VIEW',22,'DROP VIEW',23,'VAL INDEX',
    24,'CRE PROC',25,'ALT PROC',26,'LOCK TABLE',28,'RENAME',29,'COMMENT',30,'AUDIT',31,'NOAUDIT',
    32,'CRE DBLINK',33,'DROP DBLINK',34,'CRE DB',35,'ALTER DB',36,'CRE RBS',37,'ALT RBS',
    38,'DROP RBS',39,'CRE TBLSPC',40,'ALT TBLSPC',41,'DROP TBLSPC',42,'ALT SESSION',43,'ALT USER',
    44,'COMMIT',45,'ROLLBACK',46,'SAVEPOINT',47,'PL/SQL EXEC',48,'SET XACTN',49,'SWITCH LOG',
    50,'EXPLAIN',51,'CRE USER',52,'CRE ROLE',53,'DROP USER',54,'DROP ROLE',
    55,'SET ROLE',56,'CRE SCHEMA',57,'CRE CTLFILE',58,'ALTER TRACING',59,'CRE TRIGGER',
    60,'ALT TRIGGER',61,'DRP TRIGGER',62,'ANALYZE TAB',63,'ANALYZE IX',64,'ANALYZE CLUS',
    65,'CRE PROFILE',66,'DRP PROFILE',67,'ALT PROFILE',68,'DRP PROC',69,'DRP PROC',70,'ALT RESOURCE',
    71,'CRE SNPLOG',72,'ALT SNPLOG',73,'DROP SNPLOG',74,'CREATE SNAP',75,'ALT SNAP',76,'DROP SNAP',
    79,'ALTER ROLE',85,'TRUNC TAB',86,'TRUNC CLUST',88,'ALT VIEW',91,'CRE FUNC',92,'ALT FUNC',
    93,'DROP FUNC',94,'CRE PKG',95,'ALT PKG',96,'DROP PKG',97,'CRE PKG BODY',98,'ALT PKG BODY',99,'DRP PKG BODY',
    to_char(command)) command
    from v$session where sid=&the_sid;
    select osuser,machine,terminal,program
    from v$session where sid=&the_sid;
    select TADDR,lockwait,sql_address,sql_hash_value,
    row_wait_obj#,row_wait_block#,row_wait_row#
    from v$session where sid=&the_sid;
    column "blocker info" format a100
    select find_blocker(&the_sid) "blocker info" from dual;
    insert into temp_sql_hash_address
    select 'SIDINFO',sql_address,sql_hash_value from v$session where sid=&the_sid;
    commit;
    select 'ALTER SYSTEM KILL SESSION '''||sid||','||serial#||''';' from v$session where sid=&the_sid;
    select p.username "Proc username", p.USERNAME "username",p.PROGRAM "proc program",p.LATCHWAIT,p.LATCHSPIN,p.pid,p.spid
    from v$process p,v$session s
    where s.paddr=p.addr
    and s.sid=&the_sid;
    select addr,xidusn,xidslot,xidsqn,t.status,start_time
    from v$transaction t,v$session s
    where s.taddr=t.addr
    and s.sid=&the_sid;
    select used_ublk,used_urec,log_io,phy_io,cr_get,cr_change
    from v$transaction t,v$session s
    where s.taddr=t.addr
    and s.sid=&the_sid;
    select
    substr(a.os_user_name,1,12) "OS User"
    , substr(a.oracle_username,1,12) "DB User"
    , substr(b.owner,1,12) "Schema"
    , substr(b.object_name,1,30) "Object Name"
    , substr(b.object_type,1,10) "Type"
    , substr(c.segment_name,1,12) "RBS"
    , substr(d.used_urec,1,12) "# of Records"
    from v$locked_object a
    , dba_objects b
    , dba_rollback_segs c
    , v$transaction d
    , v$session e
    where a.object_id = b.object_id
    and a.xidusn = c.segment_id
    and a.xidusn = d.xidusn
    and a.xidslot = d.xidslot
    and d.addr = e.taddr
    and e.sid=&the_sid
    column message format a60
    select ELAPSED_SECONDS,TIME_REMAINING,message,sql_address,SQL_HASH_VALUE
    from v$session_longops where sid=&the_sid;
    insert into temp_sql_hash_address
    select 'SIDINFO',sql_address,sql_hash_value from v$session_longops where sid=&the_sid;
    select BLOCK_GETS,CONSISTENT_GETS,PHYSICAL_READS,BLOCK_CHANGES,CONSISTENT_CHANGES
    from v$sess_io where sid=&the_sid;
    break on address
    column event format a30
    select address,sql_text from v$sqltext
    where (address,hash_value) in (select address,hash_value
    from temp_sql_hash_address where id_str='SIDINFO')
    order by address,piece;
    select event,p1,p1raw,p2,p2raw,p3,p3raw,wait_time,seconds_in_wait
    from v$session_wait where sid=&the_sid;
    select n.name,s.value from v$sesstat s,v$statname n
    where sid=&the_sid and
    n.statistic#=s.statistic# and value>0
    and s.statistic# in (select statistic# from monitor_statistic);
    select EVENT,TOTAL_WAITS,TOTAL_TIMEOUTS,TIME_WAITED,AVERAGE_WAIT,MAX_WAIT from v$session_event where sid=&the_sid
    and event in (select event from monitor_event);

  • Can long lasting transaction fill up undo tablespace .

    Hi,
    Let's say we are on 9.2.0.8 and have long lasting transaction , I mean we started some update (1 row only but no commit/rollback) and do nothing for a couple of days .
    So the amount of undo is minimal ,but we are having one undo slot used and 1 entry in undo transaction table .
    Is that some kind of dangerous ? As far as I know undo is kind of circular buffer so we are fixing some upper end and preventing new transaction from using lower 'end' .
    Please elaborate . I've noticed some GUI reports such situation as undo 100% full , not sure if thats ok .
    Regards
    GregG

    Thanks, I knew it, my configuration is as follows (9.2.0.8):
    SQL> select * from dba_rollback_segs ;
    SEGMENT_NAME                   OWNER  TABLESPACE_NAME                SEGMENT_ID    FILE_ID   BLOCK_ID INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE STATUS           INSTANCE_NUM                             RELATIVE_FNO
    SYSTEM                         SYS    SYSTEM                                  0          1          9         114688                       1       32765              ONLINE                                                               1
    _SYSSMU1$                      PUBLIC UNDOTBS                                 1          2          9         131072                       2       32765              ONLINE                                                               2
    _SYSSMU2$                      PUBLIC UNDOTBS                                 2          2         25         131072                       2       32765              ONLINE                                                               2
    _SYSSMU3$                      PUBLIC UNDOTBS                                 3          2         41         131072                       2       32765              ONLINE                                                               2
    _SYSSMU4$                      PUBLIC UNDOTBS                                 4          2         57         131072                       2       32765              ONLINE                                                               2
    _SYSSMU5$                      PUBLIC UNDOTBS                                 5          2         73         131072                       2       32765              ONLINE                                                               2
    _SYSSMU6$                      PUBLIC UNDOTBS                                 6          2         89         131072                       2       32765              ONLINE                                                               2
    _SYSSMU7$                      PUBLIC UNDOTBS                                 7          2        105         131072                       2       32765              ONLINE                                                               2
    _SYSSMU8$                      PUBLIC UNDOTBS                                 8          2        121         131072                       2       32765              ONLINE                                                               2
    _SYSSMU9$                      PUBLIC UNDOTBS                                 9          2        137         131072                       2       32765              ONLINE                                                               2
    _SYSSMU10$                     PUBLIC UNDOTBS                                10          2        153         131072                       2       32765              ONLINE                                                               2
    _SYSSMU11$                     PUBLIC UNDOTBS                                11          2       1281         131072                       2       32765              ONLINE                                                               2
    _SYSSMU12$                     PUBLIC UNDOTBS                                12          2       4673         131072                       2       32765              ONLINE                                                               2
    _SYSSMU13$                     PUBLIC UNDOTBS                                13          2         17         131072                       2       32765              ONLINE                                                               2
    _SYSSMU14$                     PUBLIC UNDOTBS                                14          2        169         131072                       2       32765              ONLINE                                                               2
    _SYSSMU15$                     PUBLIC UNDOTBS                                15          2        193         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU16$                     PUBLIC UNDOTBS                                16          2        209         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU17$                     PUBLIC UNDOTBS                                17          2       1217         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU18$                     PUBLIC UNDOTBS                                18          2       1233         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU19$                     PUBLIC UNDOTBS                                19          2       4625         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU20$                     PUBLIC UNDOTBS                                20          2       4649         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU21$                     PUBLIC UNDOTBS                                21          2       4665         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU22$                     PUBLIC UNDOTBS                                22          2       4697         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU23$                     PUBLIC UNDOTBS                                23          2       1257         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU24$                     PUBLIC UNDOTBS                                24          2       4729         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU25$                     PUBLIC UNDOTBS                                25          2       2465         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU26$                     PUBLIC UNDOTBS                                26          2       7905         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU27$                     PUBLIC UNDOTBS                                27          2        393         131072                       2       32765              OFFLINE                                                              2
    _SYSSMU28$                     PUBLIC UNDOTBS                                28          2        417         131072                       2       32765              OFFLINE                                                              2
    undo_management                      string      AUTO
    undo_retention                       integer     10800
    SQL> select * from v$transaction;
    ADDR                 XIDUSN    XIDSLOT     XIDSQN     UBAFIL     UBABLK     UBASQN     UBAREC STATUS           START_TIME           START_SCNB START_SCNW START_UEXT START_UBAFIL START_UBABLK START_UBASQN START_UBAREC SES_ADDR               FLAG SPA REC NOU PTX NAME                                                                                                                                                                                                                                                             PRV_XIDUSN PRV_XIDSLT PRV_XIDSQN PTX_XIDUSN PTX_XIDSLT PTX_XIDSQN     DSCN-B     DSCN-W  USED_UBLK  USED_UREC     LOG_IO     PHY_IO     CR_GET  CR_CHANGE
    07000000536031B8          6         34    3374347          0          0          0          0 ACTIVE           07/04/12 08:26:02    2855444428       1809         14            2       229515         4958            1 0700000052175B60    4199939 NO  NO  NO  NO                                                                                                                                                                                                                                                                            0          0          0          0          0          0          0          0          1          1          4          0          0          0
    0700000053609420          8         30    3118147          0          0          0          0 ACTIVE           07/04/12 08:39:03    2855884108       1809          7            2       320063        31882            1 07000000501DBCB8    4199939 NO  NO  NO  NO                                                                                                                                                                                                                                                                            0          0          0          0          0          0          0          0          1          1          4          0          0          0
    070000005360DCB0         12         11     391269          2     675610     -14060          1 ACTIVE           06/26/12 17:12:52    2382349905       1809         47            2       675610       -14060            1 070000004F16E738       7683 NO  NO  NO  NO                                                                                                                                                                                                                                                                            0          0          0          0          0          0          0          0          1          1          6          0         33          0So I've got 28 segments , right ? Half of them are offline (no needed or so) .
    And now my long lasting (but small 1 undo rec) transaction can grow and take up all the free space in undo event there is no other activity on that session (only not commit/rollback).
    And one more think, could You tell how to troubleshoot that issue I mean how to know we are getting close to disaster (ora 1555 or out of undo space) , that long lasting transaction is taking only 1 undo record
    so seems not dangerous .
    Thanks in advance.
    Please bare in mind I've run select * from dba_rollback_segs ; AFTER killing that transaction so it can be missleading when comparing to v$transaction from time transaction was actice :).
    GregG

  • Cleanup log running transactions ..rollback segments

    Is there any metric in OEM which does the following...
    Am trying to read the document and find the metric which does the following ..not having much luck...
    #* Description : Process to monitor and notify DBA about any in-doubt
    #* transaction which is holding ROLLBACK Segment and
    #* troubling system resources for longer time.
    Thank you

    Below are more details on what it does...trying to find if any metric in OEM does this...thank you
    $sql_text  = "select c.USN  ";
       $sql_text .= ",d.name       ";
       $sql_text .= ",c.EXTENTS , ";
       $sql_text .= "a.username , a.osuser , a.sid , a.process, a.status  ";
       $sql_text .= ",b.start_time ";
       $sql_text .= ",b.status trans_stat, b.used_ublk*value as Bytes_Used ";
       $sql_text .= ",b.used_urec  as Records_used          ";
       $sql_text .= ",start_uext   as First_Extent          ";
       $sql_text .= ",a.MACHINE           ";
       $sql_text .= ",a.TERMINAL        ";
       $sql_text .= ",a.PROGRAM     ";
       $sql_text .= "from v\$session     a,                        ";
       $sql_text .= "     v\$transaction b,                        ";
       $sql_text .= "     v\$rollname    d,                        ";
       $sql_text .= "     (select value from v\$parameter          ";
       $sql_text .= "          where name = 'db_block_size' )  e , ";
       $sql_text .= "     v\$rollstat    c ,                       ";
       $sql_text .= "     dba_rollback_segs f                      ";
       $sql_text .= "where b.ses_addr = a.saddr (+)                ";
       $sql_text .= " and c.usn      = b.xidusn (+)                ";
       $sql_text .= " and d.usn      = c.usn                       ";
       $sql_text .= " and f.segment_id = c.usn                     ";
       $sql_text .= " and a.status     = 'INACTIVE'                ";
       $sql_text .= " and b.used_urec <=${rec_used}                ";
       $sql_text .= " and (round((sysdate - to_date(start_time,'mm/dd/yy HH24:mi:ss'))*1440)) >= ${time_interval} ";
       $sql_text .= " and a.username  <>  'DMIRROR'  

Maybe you are looking for