Article Directory
Problem Description
The CRM system is abnormal and cannot be accessed, and the system reports the following warning errors:
java.sql.SQLException: ORA-00257: archiver error. Connect internal only, until freed.
problem analysis
The 400GB of database archive log space is suddenly full, and the archive logs are stored in the ASM DataGroup disk group.
Since business has stalled and must be restored immediately, the sudden growth of archive logs can only be analyzed later. At this stage, it is necessary to expand the capacity and continue to save the log.
problem solved
- Storage increase disk sdm
- ASM label production identification
- Set asm_diskstring parameter
- Expansion of ASM Disk Group
Additional information
- Query archive generation time and quantity
select logtime,
count(*),
round(sum(blocks * block_size) / 1024 / 1024) mbsize
from (select trunc(first_time, 'dd') as logtime, a.BLOCKS, a.BLOCK_SIZE
from gv$archived_log a
where a.DEST_ID = 1
and a.FIRST_TIME > trunc(sysdate - 7))
group by logtime
order by logtime desc;
- Logminer log analysis
PROMPT
PROMPT +------------------------------------------------------------------------+
PROMPT | Author:Eric.zhong([email protected]) |
PROMPT | Date:20160703 |
PROMPT | Desc:Easy to analyze oracle log. |
PROMPT +------------------------------------------------------------------------+
set lines 256
set pages 2000
col member format a50
col name format a50
col username for a10
col seg_owner for a10
col sql_redo for a70
col sql_undo for a70
col seg_name for a50
alter session set nls_date_format = "yyyy-mm-dd HH24:MI:SS";
PROMPT
PROMPT +------------------------------------------------------------------------+
PROMPT | Select Analyze LogFile |
PROMPT +------------------------------------------------------------------------+
select a.group#,a.sequence#,a.members,a.archived,a.status,b.member from v$log a,v$logfile b where a.group#=b.group#;
select name,completion_time from v$archived_log where deleted='NO' and dest_id='1';
execute dbms_logmnr.add_logfile(logfilename=>'&REDOLOG' ,options=>dbms_logmnr.new);
execute dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog + dbms_logmnr.PRINT_PRETTY_SQL);
PROMPT
PROMPT +------------------------------------------------------------------------+
PROMPT | Display Time Interval at Analyze LogFile |
PROMPT +------------------------------------------------------------------------+
SELECT FILENAME AS name, LOW_TIME, HIGH_TIME FROM V$LOGMNR_LOGS;
select seg_owner,operation,count(*) from v$logmnr_contents group by seg_owner,operation order by seg_owner;
SELECT * FROM (
SELECT SEG_OWNER, SEG_NAME, OPERATION, COUNT(*) AS Hits
FROM V$LOGMNR_CONTENTS WHERE SEG_NAME NOT LIKE '%$'
GROUP BY SEG_OWNER, SEG_NAME, OPERATION
ORDER BY Hits DESC) TMP
WHERE ROWNUM < 21;
PROMPT Display Operation SQLTEXT
PROMPT select username,seg_owner,scn,to_char(timestamp,'yyyy-mm-dd hh24:mi:mm') time,sql_redo from v$logmnr_contents where seg_owner='SEGOWNER' and operation='OPER';
PROMPT
PROMPT +------------------------------------------------------------------------+
PROMPT | End Command : execute dbms_logmnr.end_logmnr(); |
PROMPT +------------------------------------------------------------------------+