ORA-03113 通信通道的文件结尾(ORA-19804 ORA-16038-归档空间满的处理方法)

1、数据库启动报错
SQL> startup
ORACLE 例程已经启动。

Total System Global Area 1887350784 bytes
Fixed Size 2176848 bytes
Variable Size 1325402288 bytes
Database Buffers 553648128 bytes
Redo Buffers 6123520 bytes
数据库装载完毕。
ORA-03113: 通信通道的文件结尾
进程 ID: 1244
会话 ID: 96 序列号: 3

2、查看告警日志

Errors in file i:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_arc2_6848.trc:
ORA-19815: 警告: db_recovery_file_dest_size 字节 (共 5368709120 字节) 已使用 100.00%, 尚有 0 字节可用。
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
************************************************************************
Errors in file i:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_arc2_6848.trc:
ORA-19809: 超出了恢复文件数的限制
ORA-19804: 无法回收 11459584 字节磁盘空间 (从 5368709120 限制中)
ARC2: Error 19809 Creating archive log file to 'I:\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2015_03_31\O1_MF_1_75_%U_.ARC'
ARCH: Archival stopped, error occurred. Will continue retrying
Errors in file i:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_arc2_6848.trc:
ORA-16038: 日志 3 sequence# 75 无法归档
ORA-19809: 超出了恢复文件数的限制
ORA-00312: 联机日志 3 线程 1: 'I:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO3-1.LOG'
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Errors in file i:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_arc3_10064.trc:
ORA-19815: 警告: db_recovery_file_dest_size 字节 (共 5368709120 字节) 已使用 100.00%, 尚有 0 字节可用。
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
************************************************************************
db_recovery_file_dest_size已使用完,flash recovery area闪回恢复区空间满,无法再归档。

解决办法:
1.将归档设置到其他目录,修改alter system set log_archive_dest = 其他路径
2.转移或者删除闪回恢复区里的归档日志。
3.增大闪回恢复区。

如果RMAN未使用恢复目录,或是恢复目录与目标数据库在同一数据库下,由于目标数据库实例无法正常启动,所以只能查看参数文件或是启动日志来确定闪回恢复区大小及位置。RMAN也连接不到目标数据库来删除归档日志以释放空间。

==========================================
SQL> startup mount;
ORACLE 例程已经启动。

Total System Global Area 1887350784 bytes
Fixed Size 2176848 bytes
Variable Size 1325402288 bytes
Database Buffers 553648128 bytes
Redo Buffers 6123520 bytes
数据库装载完毕。

SQL> alter system set db_recovery_file_dest_size=10G scope=BOTH;  --增大闪回恢复区

系统已更改。

SQL> alter database open;  

数据库已更改。

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

C:\Users\Administrator>sqlplus / as sysdba;  --现在才可以正常连接到数据库实例
SQL> select * from v$flash_recovery_area_usage; --查看闪回恢复区使用情况

FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 6.4 0 24
BACKUP PIECE 6.23 0 5
IMAGE COPY 38.07 0 14
FLASHBACK LOG .15 0 1
FOREIGN ARCHIVED LOG 0 0 0

已选择7行。


C:\Users\Administrator>rman --在RMAN下删除目标数据库中过期的或是删除指定时间之前的归档日志。

恢复管理器: Release 11.2.0.1.0 - Production on 星期二 3月 31 11:42:53 2015

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

RMAN> connect catalog rcat/rcat@orcl;

连接到恢复目录数据库

RMAN> connect target sys/rusky@orcl;

连接到目标数据库: ORCL (DBID=1399092762)

RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all; --删除过期的归档日志

释放的通道: ORA_DISK_1
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=160 设备类型=DISK
说明与资料档案库中的任何归档日志都不匹配 --无过期日志可删除

RMAN> delete archivelog until time "sysdate-10"; --删除10天前的归档日志。或者:delete noprompt archivelog until time "sysdate - 10";
或者:
RMAN> delete archivelog until time "to_date('2015-03-10 23:59:59','yyyy-mm-dd hh24:mi:ss')"; --删除指定日期之前的所有归档日志。


==========================
Oracle关于日志文件基本操作
1.查询系统使用的是哪一组日志文件:
select * from v$log;

2.查询正在使用的组所对应的日志文件:
select * from v$logfile;

3.强制日志切换:
alter system switch logfile;

4.查询历史日志:
select * from v$log_history;

5.查询日志的归档模式:
select dbid,name,created,log_mode from v$database;

6.查询归档日志的信息:
select recid,stamp,thread#,sequence#,name from v$archived_log;

7.增加与删除日志文件组
alter database add logfile group 1 ('/home1/Oracle/oradata/ora8i/log1a.log'),'/home2/oracle/oradata/ora8i/log1b.log') size 100M;

alter database drop logfile group 1;

8.增加与删除日志成员
alter database add logfile member '/home1/oracle/oradata/ora8i/log1a.log' to group 1,'/home1/oracle/oradata/ora8i/log2a.log' to group 2;

alter database drop logfile member '/home1/oracle/oradata/ora8i/log1a.log' ;

9.日志文件移动
alter database rename file '/home1/oracle/oradata/ora8i/log1a.log' to '/home2/oracle/oradata/ora8i/log1a.log';
执行该命令之前必须保证该日志文件物理上已经移动到新目录

10.清除日志文件
alter database clear logfile '/home1/oracle/oradata/ora8i/log1a.log';
该命令用于不能用删除组及组成员命令删除日志时使用

8.查看归档日志占用空间:
SELECT space_limit/1024/1024/1024 AS "Quota_G",space_used/1024/1024 AS "Used_M",space_used/space_limit*100 "Used_%",space_reclaimable AS reclaimable,number_of_files AS files FROM v$recovery_file_dest ;

9.修改归档日志空间大小
alter system set DB_RECOVERY_FILE_DEST_SIZE=40g;

10.查看归档日志列表
RMAN> list archivelog all;
删除归档日志
RMAN> delete archivelog until time 'sysdate-1' ;
双机下也可以用
delete obsolete;
crosscheck archivelog all;
delete expired archivelog all;

11. 用list expired看看是否有失效的archive log,证明没有失效的archive log:
RMAN> list expired archivelog all;

posted on 2015-03-31 12:09  遠離塵世の方舟  阅读(3488)  评论(0编辑  收藏  举报

导航