您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

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

2025/3/11 21:56:25发布23次查看
如何处理undo tablespace 表空间太大的问题 (1)-- 创建一个新的小空间的undo tablespace create undo tablespace undotbs4 dat
如何处理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$undosta
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product