Home  >  Article  >  Database  >  undo表空间太大解决办法

undo表空间太大解决办法

WBOY
WBOYOriginal
2016-06-07 17:16:011925browse

1、检查原来undo表空间情况:select file_name,bytes/1024/1024 as MB from dba_data_files where tablespace_name like

1、检查原来undo表空间情况:

select file_name,bytes/1024/1024 as MB from dba_data_files where tablespace_name like 'UNDO%';

2、创建新的undo表空间:

create undo tablespace undotbs2 datafile '/u01/app/Oracle/oradata/orcl/undotbs02.dbf' size 2g autoextend on next 10m maxsize 10g;

3、切换到新的undo表空间:

alter system set undo_tablespace=undotbs2 scope=both;

4、检查原来undo表空间是否还在使用:

select usn,xacts,rssize/1024/1024/1024,hwmsize/1024/1024/1024,shrinks from v$rollstat order by rssize;

如果没有PENDING OFFLINE字样表示已经不再使用。

5、删除原来undo表空间:

drop tablespace undotbs1 including contents and datafiles;

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn