有关缩小undotbs1表空间的datafile大小

oracle硬盘没有空间了,oracle不能启动,报错如下:
[oracle@rewin-db oracle]$ sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Mar 19 15:05:35 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:
ORA-09817: Write to audit file failed.
Linux Error: 28: No space left on device
ORA-09945: Unable to initialize the audit trail file
Linux Error: 28: No space left on device

解决办法:
把 /oracle/ora9.2/rdbms/audit 目录下的文件删掉

启动后查看oracle重做表空间占用空闲空间较大,为15G,表空间被用过了,收不回去,创建一个换过去!

顾UNDO的表空间最好不要设为UNLIMITED!方法如下:


-- 创建备用undo表空间
SQL> create undo tablespace UNDOTBS2 datafile '/ora_disk/rewin/UNDOTBS2.dbf' size 1000m;
需要设置一下自动增长??

Tablespace created

-- 切换undo表空间

SQL> alter system set undo_tablespace=UNDOTBS2 scope=spfile;

SQL> shutdown immediate

- drop原表空间
drop tablespace UNDOTBS1 including contents and datafiles;

-- 创建原undo表空间
SQL> create undo tablespace UNDOTBS1 datafile '/ora_disk/rewin/UNDOTBS1.dbf' size 1000m;

Tablespace created

-- 切换undo表空间
SQL> alter system set undo_tablespace=UNDOTBS1 scope=spfile;

System altered.

-- 关闭重起并把备用undo表空间drop
SQL> shutdown immediate
/
SQL> startup
/
SQL> drop tablespace UNDOTBS2 including contents and datafiles;

有关缩小表空间的方法2:
注意在使用OEM查看表空间时要看清是否只有一个dbf文件.
alter database datafile '/u03/oradata/undotbs01.dbf' resize 2000M

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值