oracel表空间undotabs表空间25000M被占用满了.
想对这个表空间做清理,请问怎么清理这个表空间.

解决方案 »

  1.   

    这个东东会越用越大,服务一直在用,你就需要清理的。我处理过9i和10G的过程如下(也是参看了网友的贴子):建议做之前做好所有备份。
    1)登陆到数据库oracle@suse:~> sqlplus '/as sysdba'SQL*Plus: Release 9.2.0.4.0 - Production on 星期五 9月 26 17:24:26 2008Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production2)创建一个新的回滚段表空间SQL> create undo tablespace undotbs2 datafile '/home/oracle/oradata/zxin/undotbs02.dbf' size 500M;Tablespace created.3)将回滚段指向新的表空间SQL> alter system set undo_tablespace=undotbs2 scope=spfile;System altered.4)重新启动数据库SQL> startup force
    ORACLE instance started.Total System Global Area  688985728 bytes
    Fixed Size                   452224 bytes
    Variable Size             671088640 bytes
    Database Buffers           16777216 bytes
    Redo Buffers                 667648 bytes
    Database mounted.
    Database opened.5)因为oracle9i默认是自动管理回滚段,为了防止其像原来那样的无限制的增长,可以将其设置为人工管理:
    SQL> alter system set undo_management =MANUAL scope=spfile;System altered.6)重新启动数据库:SQL> startup force
    ORACLE instance started.Total System Global Area  688985728 bytes
    Fixed Size                   452224 bytes
    Variable Size             671088640 bytes
    Database Buffers           16777216 bytes
    Redo Buffers                 667648 bytes
    Database mounted.
    Database opened.6)删除原来的回滚段:
    SQL> drop tablespace undotbs1 including contents and datafiles;Tablespace dropped.7)退出SQL> quit
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production。
    ************************
    select segment_name,bytes  from user_segments where tablespace_name='COLLEGE_DATA' order by byte
    truncate table
    **************************
      

  2.   


    参考我的blog:
    Oracle undo 回滚段管理
    http://blog.csdn.net/tianlesoftware/archive/2009/11/30/4901666.aspx
    ------------------------------------------------------------------------------ 
    Blog: http://blog.csdn.net/tianlesoftware 
    网上资源: http://tianlesoftware.download.csdn.net 
    相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx 
    Q Q 群:62697716 
      

  3.   

    重做undo就可以。 可以在http://blog.csdn.net/inthirties找找。不过最好是留意一下数据库,undo忽然的扩张,不是好现象