Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Shrinking Rollback Segemnts in a Proc
Kenneth Koenraadt wrote:
> Comment below. > > On Sat, 04 Oct 2003 08:42:54 +1000, "Howard J. Rogers" > <howardjr2000_at_yahoo.com.au> wrote: >
> > Absolutely. You should *monitor* RBS and *then* possibly shrink (or do > whatever else necessary) if something is evidently wrong, but you > should not just shrink without first examining if anything was wrong, > which I understood the OP wanted to do. That way user craziness may > never be detected.
I don't want particularly to drag this one out, but that statement's not right either. From v$rollstat, you can find out the current rollback segment size (rssize) and also the segments' high water marks (ie, its historically biggest size). Where there is a wide disparity, it is evident that the segment has been subject to massive growth in the past. You don't need, particularly, to check that before doing the (manual) shrink.
Moreover, there's nothing to stop our original poster's procedure from writing the size of the segment it's about to shrink into some sort of logging (text) file. So every time the script runs, you can see what it's done, and thus detect continuing problems that way.
My strong recommendation is to size your rollback segments sufficient to house all normal transactional activity (and I think we agree on that). And then to have a script which blindly shrinks the segments back to that size at midnight, 2am or whatever time seems appropriate. And to have that script execute nightly. And to do post-mortem daily review of v$rollstat or the logfile output from your shrinking procedure to see whether there is a continuing problem. If there is, you can get involved manually to try and track it down.
Point is, the OP was on the right path, as far as I"m concerned.
Regards
HJR
Received on Sat Oct 04 2003 - 04:24:20 CDT
![]() |
![]() |