数据库

位置:IT落伍者 >> 数据库 >> 浏览文章

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


发布日期:2020年12月16日
 
Oracle数据库的归档日志写满磁盘空间解决办法

数据库不能启动

SQL> startup

ORACLE 例程已经启动

Total System Global Area bytes

Fixed Size bytes

Variable Size bytes

Database Buffers bytes

Redo Buffers bytes

数据库装载完毕

ORA: 日志 序列号 无法归档

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

ORA: 联机日志 线程 :

D:\ORACLE\PRODUCT\\ORADATA\ORCL\REDOLOG

查看$ORACLE_HOME\admin\SID\bdump\alert_SIDlog日志

Thu Feb ::

Errors in file d:\oracle\product\\admin\orcl\bdump\orcl_arc_trc:

ORA: WARNING: db_recovery_file_dest_size of bytes is % used and has remaining bytes available

Thu Feb ::

Errors in file d:\oracle\product\\admin\orcl\udump\orcl_ora_trc:

ORA: 警告: db_recovery_file_dest_size 字节 (共 字节) 已使用 % 尚有 字节可用

Thu Feb ::

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

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

Consider changing RMAN RETENTION POLICY If you are using Data Guard

Thu Feb ::

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

then consider changing RMAN ARCHIVELOG DELETION POLICY

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

Add disk space and increase db_recovery_file_dest_size parameter to

Consider changing RMAN RETENTION POLICY If you are using Data Guard

reflect the new space

then consider changing RMAN ARCHIVELOG DELETION POLICY

Delete unnecessary files using RMAN DELETE command If an operating

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

Back up files to tertiary device such as tape using RMAN

DELETE EXPIRED commands

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

BACKUP RECOVERY AREA command

Thu Feb ::

Errors in file d:\oracle\product\\admin\orcl\bdump\orcl_arc_trc:

ORA: limit exceeded for recovery files

ORA: cannot reclaim bytes disk space from limit

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

退出sqlplus进入rman

SQL> exit

从 Oracle Database g Enterprise Edition Release Production

With the Partitioning OLAP and Data Mining options 断开

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

恢复管理器: Release Production on 星期四 ::

Copyright (c) Oracle All rights reserved

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

查看归档日志

RMAN> list archivelog all;

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

已存档的日志副本列表

关键字 Thrd Seq S 短时间 名称

A D:\ORACLE\PRODUCT\\FLASH_RECOVERY_AREA\O

RCL\ARCHIVELOG\__\O_MF___LZCQ_ARC

A D:\ORACLE\PRODUCT\\FLASH_RECOVERY_AREA\O

RCL\ARCHIVELOG\__\O_MF___LWOH_ARC

A D:\ORACLE\PRODUCT\\FLASH_RECOVERY_AREA\O

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

RMAN> delete archivelog all;

释放的通道: ORA_DISK_

分配的通道: ORA_DISK_

通道 ORA_DISK_: sid= devtype=DISK

已存档的日志副本列表

关键字 Thrd Seq S 短时间 名称

A D:\ORACLE\PRODUCT\\FLASH_RECOVERY_AREA\O

RCL\ARCHIVELOG\__\O_MF___LZCQ_ARC

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

已删除的存档日志

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

__\O_MF___LZCQ_ARC 记录 ID= 时间戳 =

退出rman进入sqlplus打开数据库

RMAN> exit

恢复管理器完成

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

SQL*Plus: Release Production on 星期四 ::

Copyright (c) Oracle All rights reserved

连接到:

Oracle Database g Enterprise Edition Release Production

With the Partitioning OLAP and Data Mining options

SQL> alter database open;

数据库已更改

数据库已经打开!

上一篇:OracleERP:EBS功能结构分析

下一篇:一个SQL的优化过程