手机版
你好,游客 登录 注册
背景:
阅读新闻

如何处理undo tablespace 表空间太大的问题

[日期:2013-03-18] 来源:Linux社区  作者:chen [字体:大 中 小]
如何处理undo tablespace 表空间太大的问题
  (1)-- 创建一个新的小空间的undo tablespace
  create undo tablespace undotBS4 datafile 'C:\Oracle\oradata\dzq\eoffice\UNDOTBS4.DBF' size 500m;
  (2)-- 设置新的表空间为系统undo_tablespace
  alter system set undo_tablespace=undotBS4;
  (3)-- Drop 旧的表空间
  drop tablespace undotbs3 including contents;
 ==================================================================
 
-查看表空间明称
 
select name from v$tablespace;
 
- 检查数据库UNDO表空间占用空间情况以及数据文件存放位置
 
select file_name,bytes/1024/1024 from dba_data_files  where tablespace_name like 'UNDOTBS2';
 
-查看回滚段的使用情况,哪个用户正在使用回滚段的资源,如果有用户最好更换时间(特别是生产环境)
 
select s.username, u.name from v$transaction t,v$rollstat r, v$rollname u,v$session s where s.taddr=t.addr and t.xidusn=r.usn and r.usn=u.usn order by s.username;
 
-创建新的UNDO表空间,并设置自动扩展参数
 
create undo tablespace undotbs1 datafile '/oradata/oradata/ddptest/UNDOTBS1.dbf' size 1000m reuse autoextend on next 800m maxsize unlimited;
 
-查看每十分钟记录一次这段时间内使用的undo block数量
 select begin_time,end_time, undoblks from v$undostalinux
相关资讯       undo 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款