posts - 496,comments - 227,trackbacks - 0

http://hi.baidu.com/taojia/blog/item/7d5656b5af5165c637d3ca55.html

ORA-00257: archiver error. Connect internal only, until freed.

Oracle 10g数据库物理空间管理方式与以前Oracle发生了变化,对归档日志所在的Flash_Recovery_Area空间进行了另外限制

Flash_Recovery_Area空间缺省安装时比较小,只有2GB,容易用完

解决过程

  根据数据库目前可用存储空间情况、FLASH_RECOVERY_AREA空间为2GB的实际情况,把FLASH_RECOVERY_AREA的空间修改为20GB()

SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=20g;

系统已更改。

(其实问题的本质是归档日志的使用已经达到了spfile等启动参数文件中指定的最大值。oracle 10g中归档日志默认的存放地是闪回目录,即%ORACLE_BASE%/flash_recovery_area的相应实例名下面,这个位置的大小在参数文件中有个限制,解决空间不足的问题可以通过两种方式来实现,一个修改这个大小限制,还有一个就是修改归档日志存放位置。)

如果不要这些archivelog的话,可以删除一些

rman>DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'SYSDATE-3'; 直接运行这条 这样会只保留三天的归档

sql> select * from v$flash_recovery_area_usage;

FILE_TYPE                PERCENT_SPACE_USED    PERCENT_SPACE_RECLAIMABLE   NUMBER_OF_FILES

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

CONTROLFILE                    0                                                           0                                        0

ONLINELOG                        0                                                          0                                        0

ARCHIVELOG                 6.11                                                          0                                        3

BACKUPPIECE                   0                                                          0                                        0

IMAGECOPY                     0                                                         0                                         0

FLASHBACKLOG                0                                                        0                                         0

还可参考:http://www.eygle.com/archives/2004/12/rman_crosscheck.html

Rman Crosscheck删除失效归档

当手工删除了归档日志以后,Rman备份会检测到日志缺失,从而无法进一步继续执行。

所以此时需要手工执行crosscheck过程,之后Rman备份可以恢复正常。

1.Crosscheck日志

    $ rman target /

    Recovery Manager: Release 9.2.0.4.0 - 64bit Production

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

    connected to target database: AVATAR2 (DBID=2480694409)

    RMAN> crosscheck archivelog all;

    using target database controlfile instead of recovery catalog

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: sid=25 devtype=DISK

    validation failed for archived log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2714.dbf recid=2702 stamp=545107659

    validation failed for archived log

   archive log filename=/opt/oracle/oradata/avatar2/archive/1_2715.dbf recid=2703 stamp=545108268

    ...........

    validation failed for archived log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2985.dbf recid=2973 stamp=545399327

    validation succeeded for archived log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2986.dbf recid=2974 stamp=545400820

    validation succeeded for archived log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2987.dbf recid=2975 stamp=545401757

    validation succeeded for archived log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2988.dbf recid=2976 stamp=545402716

    validation succeeded for archived log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2989.dbf recid=2977 stamp=545403661

    validation succeeded for archived log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2990.dbf recid=2978 stamp=545404946

    validation succeeded for archived log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2991.dbf recid=2979 stamp=545406220

    Crosschecked 278 objects

    RMAN>

2.使用delete expired archivelog all 命令删除所有过期归档日志:

    RMAN> delete expired archivelog all;

    released channel: ORA_DISK_1

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: sid=12 devtype=DISK

    List of Archived Log Copies

    Key    Thrd Seq    S Low Time Name

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

   376    1    2714    X 23-NOV-04 =/opt/oracle/oradata/avatar2/archive/1_2714.dbf

    .....

3.简要介绍一下report obsolete命令

使用report obsolete命令报告过期备份

    RMAN> report obsolete;

    RMAN retention policy will be applied to the command

    RMAN retention policy is set to redundancy 1

    Report of obsolete backups and copies

    Type                Key    Completion Time    Filename/Handle

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

    Backup Set          125    01-NOV-04      

      Backup Piece      125    01-NOV-04          /data1/oracle/orabak/full_1_541045804

    Backup Set          131    04-NOV-04      

      Backup Piece      131    04-NOV-04          /data1/oracle/orabak/full_AVATAR2_20041104_131

   ....

    Backup Set          173    06-DEC-04      

      Backup Piece      173    06-DEC-04          /data1/oracle/orabak/full_AVATAR2_20041206_173

    Backup Set          179    11-DEC-04      

      Backup Piece      179    11-DEC-04          /data1/oracle/orabak/arch544588206.arc

    .....

      Backup Piece      189    17-DEC-04          /data1/oracle/orabak/arch545106606.arc

    Backup Set          190    17-DEC-04      

      Backup Piece      190    17-DEC-04          /data1/oracle/orabak/arch545106665.arc

    Backup Set          191    20-DEC-04      

      Backup Piece      191    20-DEC-04          /data1/oracle/orabak/arch_AVATAR2_20041220_194

    Archive Log          2973 20-DEC-04          /opt/oracle/oradata/avatar2/archive/1_2985.dbf

    Archive Log          2971 20-DEC-04          /opt/oracle/oradata/avatar2/archive/1_2984.dbf

    .....

    Archive Log          2705 17-DEC-04          /opt/oracle/oradata/avatar2/archive/1_2717.dbf

    Archive Log          2704 17-DEC-04          /opt/oracle/oradata/avatar2/archive/1_2716.dbf

    Archive Log          2703 17-DEC-04          /opt/oracle/oradata/avatar2/archive/1_2715.dbf

    Archive Log          2702 17-DEC-04          /opt/oracle/oradata/avatar2/archive/1_2714.dbf

4.使用delete obsolete命令删除过期备份:

    RMAN> delete obsolete;

    RMAN retention policy will be applied to the command

    RMAN retention policy is set to redundancy 1

    using channel ORA_DISK_1

    Deleting the following obsolete backups and copies:

    Type                Key    Completion Time    Filename/Handle

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

    Backup Set          125    01-NOV-04      

      Backup Piece      125    01-NOV-04          /data1/oracle/orabak/full_1_541045804

    ....

    Archive Log          2704 17-DEC-04          /opt/oracle/oradata/avatar2/archive/1_2716.dbf

    Archive Log          2703 17-DEC-04          /opt/oracle/oradata/avatar2/archive/1_2715.dbf

    Archive Log          2702 17-DEC-04          /opt/oracle/oradata/avatar2/archive/1_2714.dbf

    Do you really want to delete the above objects (enter YES or NO)? yes

    deleted backup piece

    backup piece handle=/data1/oracle/orabak/full_AVATAR2_20041206_173 recid=173 stamp=544156241

    .....

    deleted archive log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2715.dbf recid=2703 stamp=545108268

    deleted archive log

    archive log filename=/opt/oracle/oradata/avatar2/archive/1_2714.dbf recid=2702 stamp=545107659

    Deleted 286 objects

    RMAN> crosscheck archivelog all;

    released channel: ORA_DISK_1

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: sid=19 devtype=DISK

    specification does not match any archive log in the recovery catalog

-The End-

posted on 2010-04-21 17:36 SIMONE 阅读(1418) 评论(0)  编辑  收藏 所属分类: oracle

只有注册用户登录后才能发表评论。


网站导航: