Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Differing statuses returned from dba_rollback_segs and v$roll

RE: Differing statuses returned from dba_rollback_segs and v$roll

From: Fink, Dan <Dan.Fink_at_mdx.com>
Date: Mon, 29 Jul 2002 13:38:40 -0800
Message-ID: <F001.004A53C1.20020729133840@fatcity.com>


Walt,

        The reason for the difference in status is that each view monitors a different aspect of rbs. v$rollstat is a performance view and would be constantly updated with such information. dba_rollback_segs is the metadata view and is fairly static. Imagine the thrashing that would occur if the performance info was actually kept in the data dictionary. You will also find similar differences between dba_data_files and v$datafile.

HTH,
Dan Fink

-----Original Message-----

Sent: Monday, July 29, 2002 2:59 PM
To: Multiple recipients of list ORACLE-L v$rollstat

Okay, so today one of our QA databases suddenly started spewing out ora-1552 errors. Turned out all of the rollback segments had a status of FULL. The problem was quickly fixed by taking the rollback segments offline, then back online. The reason why the rollback segments all became FULL is another story.

Anyway, before the problem was fixed we queried both dba_rollback_segs and v$rollstat to get the status of the rollback segments. v$rollstat returned FULL, but dba_rollback_segs returned ONLINE.

I thought this was interesting (I'm easily amused) so I dug up the DDL for the two views (shown below). The two views appear to get their information from two different places, and both use DECODEs to make the status meaningful. But, there's no DECODE value for FULL in dba_rollback_segs. In fact, the status values for the two can be quite different.

Why are they different? This bothers me. Steve Orr is off fishing today so he's not here to provide a rational explanation.

Is anyone else bothered by this? Or, should I just laugh it off, pick up the shattered pieces of my life, and soldier on?

I've also posted this on the appropriate (I think) Metalink forum.

Thanks,
--Walt Weaver

  Bozeman, Montana



create or replace view 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)
as
select un.name, decode(un.user#,1,'PUBLIC','SYS'),
       ts.name, un.us#, f.file#, un.block#,
       s.iniexts * ts.blocksize,
       decode(bitand(ts.flags, 3), 1, to_number(NULL),
                                      s.extsize * ts.blocksize),
       s.minexts, s.maxexts,
       decode(bitand(ts.flags, 3), 1, to_number(NULL),
                                      s.extpct),
       decode(un.status$, 2, 'OFFLINE', 3, 'ONLINE',
                          4, 'UNDEFINED', 5, 'NEEDS RECOVERY',
                          6, 'PARTLY AVAILABLE', 'UNDEFINED'),
       decode(un.inst#, 0, NULL, un.inst#), un.file#
from sys.undo$ un, sys.seg$ s, sys.ts$ ts, sys.file$ f
where un.status$ != 1
  and un.ts# = s.ts#

  and un.file# = s.file#
  and un.block# = s.block#
  and s.type# = 1
  and s.ts# = ts.ts#
  and un.ts# = f.ts#
  and un.file# = f.relfile#

GV$ROLLSTAT
select
inst_id,kturdusn,kturdext,kturdsiz,kturdwrt,kturdnax,kturdget,kturdwat, d ecode(kturdopt, -1,to_number(null), kturdopt), kturdhwm,kturdnsh,kturdnwp,kturdn
ex, kturdash,kturdaae, decode(kturdflg, 0,'ONLINE', 2,'PENDING OFFLINE', 3,'OFFL
INE', 4, 'FULL', 'UNKNOWN'), kturdcex, kturdcbk from x$kturd where kturd
siz!=0 and kturdflg != 3
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Weaver, Walt
  INET: wweaver_at_rightnow.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Fink, Dan
  INET: Dan.Fink_at_mdx.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Jul 29 2002 - 16:38:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US