oracle 批量插入对undo影响(2)
1、查询undo表空间信息
Select a.tablespace_name, to_char(a.bytes / 1024 / 1024 / 1024, '99,999.999') total_bytes, to_char(b.bytes / 1024 / 1024 / 1024, '99,999.999') free_bytes, to_char(a.bytes / 1024 / 1024 / 1024 - b.bytes / 1024 / 1024 / 1024, '99,999.999') use_bytes, to_char((1 - b.bytes / a.bytes) * 100, '99.99') || '%' use, a.file_name from (select tablespace_name, sum(bytes) bytes, file_name from dba_data_files group by tablespace_name, file_name) a, (select tablespace_name, sum(bytes) bytes from dba_free_space group by tablespace_name) b, dba_tablespaces t2 where a.tablespace_name = b.tablespace_name and a.TABLESPACE_NAME = t2.TABLESPACE_NAME and t2.CONTENTS = 'UNDO'
2、查询数据文件的扩展方式
select b.FILE_NAME, b.TABLESPACE_NAME, b.blocks, b.STATUS, b.AUTOEXTENSIBLE from dba_data_files b where b.TABLESPACE_NAME like '%UNDO%';
3、修改表空间自动扩展功能(为了测试)
alter database datafile '/u01/app/oracle/oradata/sktest/undotbs01.dbf' autoextend on; 开启表空间自动扩展功能 alter database datafile '/u01/app/oracle/oradata/sktest/undotbs01.dbf' autoextend off; 关闭表空间自动扩展功能
4、一个undo表空间数据插入时间

5、扩展undo表空间
alter tablespace undo_new add datafile '/u01/oracle/oradata/yscsfx/newundotbs02.dbf' size 500M autoextend on;
6、扩展后数据插入时间

开源改变生活

浙公网安备 33010602011771号