Oracle数据库的归档日志写满磁盘空间解决办法

Oracle数据库的归档日志写满磁盘空间解决办法


1、数据库不能启动

SQL> startup

ORACLE 例程已经启动。

Total System Global Area 289406976 bytes

Fixed Size 1248576 bytes

Variable Size 83886784 bytes

Database Buffers 197132288 bytes

Redo Buffers 7139328 bytes

数据库装载完毕。

ORA-16038: 日志 2 序列号 44 无法归档

ORA-19809: 超出了恢复文件数的限制

ORA-00312: 联机日志 2 线程 1:

'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG'

2、查看$ORACLE_HOME\admin\SID\bdump\alert_SID.log日志

Thu Feb 19 09:45:33 2009

Errors in file d:\oracle\product\10.2.0\admin\orcl\bdump\orcl_arc1_660.trc:

ORA-19815: WARNING: db_recovery_file_dest_size of 2147483648 bytes is 99.95% used, and has 1129472 remaining bytes available.

Thu Feb 19 09:45:33 2009

Errors in file d:\oracle\product\10.2.0\admin\orcl\udump\orcl_ora_4708.trc:

ORA-19815: 警告: db_recovery_file_dest_size 字节 (共 2147483648 字节) 已使用 99.95%, 尚有 1129472 字节可用。

Thu Feb 19 09:45:33 2009

************************************************************************

You have following choices to free up space from flash recovery area:

1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,

Thu Feb 19 09:45:33 2009

************************************************************************

then consider changing RMAN ARCHIVELOG DELETION POLICY.

2. Back up files to tertiary device such as tape using RMAN

You have following choices to free up space from flash recovery area:

BACKUP RECOVERY AREA command.

3. Add disk space and increase db_recovery_file_dest_size parameter to

1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,

reflect the new space.

then consider changing RMAN ARCHIVELOG DELETION POLICY.

4. Delete unnecessary files using RMAN DELETE command. If an operating

system command was used to delete files, then use RMAN CROSSCHECK and

2. Back up files to tertiary device such as tape using RMAN

DELETE EXPIRED commands.

************************************************************************

BACKUP RECOVERY AREA command.

Thu Feb 19 09:45:34 2009

Errors in file d:\oracle\product\10.2.0\admin\orcl\bdump\orcl_arc1_660.trc:

ORA-19809: limit exceeded for recovery files

ORA-19804: cannot reclaim 44217856 bytes disk space from 2147483648 limit

从上面信息知道是flash recovery area闪回恢复空间中默认2G的空间被归档日志占满了,没有空间进行存放归档日志。

3、退出sqlplus,进入rman

SQL> exit


从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options 断开

C:\Documents and Settings\mengzhaoliang>rman target/

恢复管理器: Release 10.2.0.1.0 - Production on 星期四 2月 19 09:57:48 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

已连接到目标数据库: ORCL (DBID=1193443472, 未打开)

4、查看归档日志

RMAN> list archivelog all;

使用目标数据库控制文件替代恢复目录

已存档的日志副本列表

关键字 Thrd Seq S 短时间 名称

------- ---- ------- - ---------- ----

40 1 1 A 17-11月-08 D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\O

RCL\ARCHIVELOG\2008_11_18\O1_MF_1_1_4L44Z9CQ_.ARC

41 1 2 A 18-11月-08 D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\O

RCL\ARCHIVELOG\2008_11_18\O1_MF_1_2_4L4W4O0H_.ARC

42 1 3 A 18-11月-08 D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\O

5、可以先把归档日志备份到其他的空间,然后用rman删除归档日志;

RMAN> delete archivelog all;

释放的通道: ORA_DISK_1

分配的通道: ORA_DISK_1

通道 ORA_DISK_1: sid=151 devtype=DISK

已存档的日志副本列表

关键字 Thrd Seq S 短时间 名称

------- ---- ------- - ---------- ----

40 1 1 A 17-11月-08 D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\O

RCL\ARCHIVELOG\2008_11_18\O1_MF_1_1_4L44Z9CQ_.ARC

是否确定要删除以上对象 (输入 YES 或 NO)? yes

已删除的存档日志

存档日志文件名 =D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\200

_11_18\O1_MF_1_1_4L44Z9CQ_.ARC 记录 ID=40 时间戳 =671101294

6、退出rman,进入sqlplus,打开数据库

RMAN> exit

恢复管理器完成。

C:\Documents and Settings\mengzhaoliang>sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 2月 19 10:03:02 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

连接到:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

SQL> alter database open;

数据库已更改。

数据库已经打开!

相关文档
最新文档