############# sample 0

asmcmd show free 37G in archive_log

ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 204800 37410 0 57410 0 ARCHIVE_LOG/

check asm usage:

ort ORACLE_SID=+ASM1
ARCHIVE_LOG/
-------------------------
set linesize 240

col g_n format 999
col f_n format 9999
col bytes format 999,999,999,999
col space format 999,999,999,999
col a_i format 999
col blocks format 999,999
col block_size format 999,999
col ftype format a16
col dir format a3
col s_created format a10
col full_alias_path format a60
col striped format a6
col rdun format a6
col au format 99999999
col calculated format 999,999,999,999

select x.gnum g_n,
x.filnum f_n,
substr(x.full_alias_path,1, 60) full_alias_path,
f.striped,
f.redundancy rdun,
f.bytes,
f.space,
case when calculated / x.au > 60 then calculated + 3 * x.au -- Over 60 direct extents consideration
else calculated
end calculated
from ( SELECT gnum,filnum,au, concat('+'||gname, sys_connect_by_path(aname, '/')) full_alias_path
from ( SELECT g.name gname,
g.allocation_unit_size au,
a.parent_index pindex,
a.name aname,
a.reference_index rindex,
a.group_number gnum,
a.file_number filnum
FROM v$asm_alias a, v$asm_diskgroup g
WHERE a.group_number = g.group_number)
START WITH (mod(pindex, power(2, 24))) = 0 CONNECT BY PRIOR rindex = pindex) x,
(select f.group_number gnum,
f.file_number filnum,
f.type ftype ,
f.bytes,
f.space,
f.blocks,
f.block_size,
f.striped,
f.redundancy,
case f.striped when 'FINE'
then ceil(((f.blocks * f.block_size + 1) / g.allocation_unit_size) / 8)
* decode(f.redundancy, 'HIGH', 3 , 'MIRROR', 2, 'UNPROT', 1 ) * 8 * g.allocation_unit_size
else ceil((f.blocks * f.block_size + 1) / g.allocation_unit_size)
* decode(f.redundancy, 'HIGH', 3 , 'MIRROR', 2, 'UNPROT', 1 ) * g.allocation_unit_size
end calculated
from v$asm_file f , v$asm_diskgroup g
where f.group_number = g.group_number
and g.name='ARCHIVE_LOG'
order by f.group_number,file_number) f
where x.filnum != 4294967295
and x.gnum=f.gnum and x.filnum=f.filnum
order by full_alias_path
/

sulution:
catalog start with "+archive_log/RCFRONT/ARCHIVELOG"
crosscheck archivelog all;
delete archivelog until time 'sysdate -30';

############

1.

C:\Users\Administrator>rman target  "sys/test123@test"
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Mar 3 11:26:55 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: IVRSPROD (DBID=3799003095)
RMAN>
RMAN>
RMAN> exit

crosscheck archivelog all;
delete noprompt expired archivelog all;
delete noprompt obsolete recovery window of 7 days;
delete noprompt archivelog until time 'sysdate - 7';

Recovery Manager complete.

2.

Wed Sep 06 15:13:42 2017
ARCH: Archival stopped, error occurred. Will continue retrying
ORACLE Instance edruat - Archival Error
ORA-16014: log 2 sequence# 14 not archived, no available destinations
ORA-00312: online log 2 thread 1: '/edruatdb/data/log2a.rdo'
ORA-00312: online log 2 thread 1: '/edruatdb/data/log2b.rdo'
Wed Sep 06 15:17:27 2017
Incremental checkpoint up to RBA [0x13.62847.0], current log tail at RBA [0x13.62847.0]

SQL> alter system switch logfile;

System altered.

RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;

3.

碰到一个问题specification does not match any foreign archived log in the repository

原因如下:

因为控制文件最多存储100个归档日志,如果之前,没有部署好清理归档的任务的话,导致旧的归档日志无法被删除.比如2个月之前的归档日志就无法被删除.这样导致目录消耗过大.

检查方法:

list archivelog 'D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\V10203\ARCHIVELOG\2007_11_13\O1_MF_1_6_3MM4NR1W_.ARC';


list archivelog all;

 

详细查看RMAN-20242 failure at RMAN Backup Archivelog - possible Cause and Solution (文档 ID 1634498.1)

解决方法

方法1:

脚本里加入

catalog  start with 'C:\APP\ORACLE\ARCHIVELOG' noprompt ;

方法2:

及时备份脚本,定时任务清理归档.

1/ windows(如果没有使用管理员用户创建定时任务,那么需要在 定时任务 属性里,选择 安全选项,选择最高权限 执行 ),确保定时任务可以在windows 下正常运行。

2.建议使用administrator 创建定时任务,创建数据库,分c,d 盘。

sapmle :

[oracle@db 2018_01_08]$ crontab -l
* 12 * * * sh /tmp/cron/delete_archive.sh > /tmp/cron/delete_archive.log

more /tmp/cron/delete_archive.sh

#!/bin/bash
source /home/oracle/profile_vats
rman target / <<eof
crosscheck archivelog all;
delete noprompt archivelog all;
eof

chmod 777 /tmp/cron/delete_archive.sh

archive log full ora-00257的更多相关文章

  1. DBA_Oracle Archive Log的基本应用和启用(概念)

    2014-11-15 Created By BaoXinjian

  2. alter system switch logfile与alter system archive log current的区别

    以前知道 ALTER SYSTEM SWITCH LOGFILE对单实例数据库或RAC中的当前实例执行日志切换, ALTER SYSTEM ARCHIVE LOG CURRENT会对数据库中的所有实例 ...

  3. Oracle 11g的Redo Log和Archive Log的分析方法

    自Oracle 11g起,无需设置UTL_FILE_DIR就可以使用LOGMNR对本地数据库的日志进行分析,以下是使用LOGMNR的DICT_FROM_ONLINE_CATALOG分析REDO和归档日 ...

  4. How to delete expired archive log files using rman?

    he following commands will helpful to delete the expired archive log files using Oracle Recovery Man ...

  5. DBA_Oracle日志文件 - altert / trace /audit / redo / archive log(概念)

    2014-07-26 Created By BaoXinjian

  6. alter system [switch logfile]与[archive log current]的区别

    --alter system [switch logfile]与[archive log current]的区别 ------------------------------------------- ...

  7. [Oracle维护工程师手记]为什么flashback 的时候既需要 flashback log ,又需要 archive log?

    为什么flashback 的时候既需要 flashback log ,又需要 archive log 呢? 如果数据库的活动不是很频繁,可以看到,其flashback log 是比较小的.那么是通过怎 ...

  8. alter system archive log current作用及和alter system switch logfile区别

    alter system archive log current 是归档当前的重做日志文件,不管自动归档有没有打都归档. alter system switch logfile 是强制日志切换,不一定 ...

  9. LOGMNR分析redo log和archive log教程

    自Oracle 11g起,无需设置UTL_FILE_DIR就可以使用LOGMNR对本地数据库的日志进行分析,以下是使用LOGMNR的DICT_FROM_ONLINE_CATALOG分析REDO和归档日 ...

  10. Archive log restore using RMAN for Logminer (http://www.dba-village.com/village/dvp_forum.OpenThread?ThreadIdA=26816)

    Subject: Archive log restore using RMAN for Logminer Author: Edwin Weele van der, Netherlands Date: ...

随机推荐

  1. OO的片段,继承与组合,继承的优点与目的,虚机制在构造函数中不工作

    摘自C++编程思想: ------------------------------ 继承与组合:接口的重用 ------------------------------- 继承和组合都允许由已存在的类 ...

  2. PrintWrite

    向文本输出流打印对象的格式化表示形式.此类实现在 PrintStream 中的所有 print 方法.它不包含用于写入原始字节的方法,对于这些字节,程序应该使用未编码的字节流进行写入. 与 Print ...

  3. AIM Tech Round (Div. 2) C. Graph and String

    C. Graph and String time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  4. poj 1469 COURSES 解题报告

    题目链接:http://poj.org/problem?id=1469 题目意思:有 N 个人,P个课程,每一个课程有一些学生参加(0个.1个或多个参加).问 能否使得 P 个课程 恰好与 P 个学生 ...

  5. html5--6-56 阶段练习5-翻转效果

    html5--6-56 阶段练习5-翻转效果 学习要点 运用所学过的知识完成一个简单的小练习,理解对动画的应用. @charset="UTF-8"; *{ ; ; } img{ w ...

  6. 【矩阵---求A的1到N次幂之和】

    引例: Matrix Power Series: 题目大意,给定矩阵A,求A^+A^+A^+...A^N. 题解:已知X=a,可以通过以下矩阵求出ans=a^+a^+...a^=矩阵^(n+)后右上格 ...

  7. [Selenium] 如何使用Chrome Options 定制测试Chrome 浏览器的特定属性 (类似FirefoxProfiles)

    Chrome Options 类似于FirefoxProfiles,用于定制待测试的Chrome 浏览器的特定属性 1)如果希望测试某个浏览器插件,可通过addExtensions方式提前加载以.cr ...

  8. 【204】显示3D大球球

    1. 光滑球  From Jan 28, 2016    2. 大球球 https://www.revolvermaps.com/?target=enlarge&i=0xoqkxnu52c&a ...

  9. 最优配餐_暴力bfs

    问题描述 栋栋最近开了一家餐饮连锁店,提供外卖服务.随着连锁店越来越多,怎么合理的给客户送餐成为了一个急需解决的问题. 栋栋的连锁店所在的区域可以看成是一个n×n的方格图(如下图所示),方格的格点上的 ...

  10. 4种java复制文件的方式

    尽管Java提供了一个可以处理文件的IO操作类,但是没有一个复制文件的方法.复制文件是一个重要的操作,当你的程序必须处理很多文件相关的时候.然而有几种方法可以进行Java文件复制操作,下面列举出4中最 ...