Beruflich Dokumente
Kultur Dokumente
NOTE:313279.1
Note (Sure) 313279.1 Get
In this Document
Symptoms
Cause
Incorrect use of RMAN backup command or RMAN Issue
Logs Stored in FRA - Flash Recovery Area
Logs not registered in dba_registered_archived_log
Logs marked as corrupted in system.logmnr_log$
required_checkpoint_scn issues
Capture Prevalidation of Logs in dba_registered_archived_log
Logs deleted in error or damaged due to OS/Storage issues
Solution
SCN reported in the Capture state related message - determine logs the SCN relates to
Check Capture tracefile to understand if mising logfile detailed
Determine if there are logfiles unregistered
Determine if there are logs marked as corrupt
RMAN - Recovery Manager can be used to identify archivelog files which may be missing
References
Applies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.3 to 10.1.0.5
Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.4
Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7
This problem can occur on any platform.
Oracle Server Enterprise Edition - Version: 10.1.0.3 to 10.1.0.5
Oracle Server Enterprise Edition - Version: 10.2.0.1 to 10.2.0.4
Oracle Server Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7
@Checked for relevance on 22-Aug 2008"
Symptoms
Capture process does not advance and appears stuck in one of the following states :
=======================
The nature of the problem could be :
- a missing logfile; or
- a logfile is not registered; or
- a logfile is corrupted; or
- Capture is verifying/prechecking logfiles
The process will remain in this state until the log is located,
it is registered, the corruption is resolved in which case it
will also be necessary to reregister the log or the Capture
process has checked the logfiles on disk
Cause
Common issues which can cause Capture to stop in this state are :
It should also be pointed out that archive logs may be deleted from the FRA
when the instance is shutdown and restarted.
Those archive logfiles deleted logs should be reported in the alert.log file.
required_checkpoint_scn issues
Logs may need to be manually deleted which can then affect Capture restart if the
required_checkpoint_scn (dba_capture view) is not advancing. This is a key value
for Capture as discussed below.
=======================
The following is useful background which should be used to help
understand what logs are relevant.
In a non RAC environment, all logs from the logfile containing the
required_checkpoint_scn have to be present on disk.
Note: the same information can also be obtain from <<Note 275323.1>> or
<<Note 290143.1>>.
Solution
In order to determine the problem logfile(s) and understand what
is going on please provide to Oracle Suport Services the
Streams Healthcheck output (<<Note 273674.1>>)) and the alert.log file(s) from
Upstream (if relevant) and downstream databases.
Note: please provide details from all nodes. Additionally, please collect the following:
SCN reported in the Capture state related message - determine logs the SCN
relates to
connect / as sysdba
set pagesize 1000
col first_scn format 999999999999999999
col next_scn format 999999999999999999
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
select
source_database,thread#,sequence#,name,modified_time,first_scn,next_scn,dicti
onary_begin,dictionary_end from dba_registered_archived_log where <SCN>
between first_scn and next_scn;
connect / as sysdba
set pagesize 1000
-- Capture
define capture_name='<Name of Capture Process>'
select p.spid Spid, 'C00'||c.capture#||' '||upper(lp.role) "Capture Process
", c.capture_name "Capture Name", p.pga_used_mem "PGA Memory Used",
p.pga_alloc_mem "PGA Memory Allocated", p.pga_max_mem "PGA Maximum Memory"
from v$streams_capture c, v$logmnr_process lp, v$session s, v$process p
where c.logminer_id = lp.session_id
and lp.role in ('reader','preparer','builder')
and lp.sid = s.sid
and lp.serial# = s.serial#
and s.paddr = p.addr
and c.capture_name = '&capture_name'
union
select p.spid, 'C00'||c.capture#||' Coordinator', c.capture_name,
p.pga_used_mem, p.pga_alloc_mem, p.pga_max_mem
from v$streams_capture c, v$session s, v$process p
where c.sid = s.sid
and c.serial# = s.serial#
and s.paddr = p.addr
and c.capture_name = '&capture_name'
order by 6,5;
Use the SPID (OS Process or thread id) for both the Capture process and
Reader process as follows :
connect / as sysdba
The trace files should identify the thread / sequence number and
the problematic logfile which Capture is looking for.
Note: ensure that you have the latest patchset installed otherwise
relevant trace information may not be present.
For example, in a Capture trace file you may see something like the following :
krvxalfs: Error 308 raised while opening log
/bugmnt21/em/celclnx8/tar20093554.6/app/oracle/product/10.2.0.3/dbs/arch1_35_67724198
5.dbf.
i.e ora-308 indicates : missing logfile
Note : The plsql block will need be be run more than once for RAC configurations.
connect / as sysdba
set serveroutput on
declare
begin
select required_checkpoint_scn into rcscn from dba_capture where capture_name
= user_capture;
select min(sequence#) into rseq from dba_registered_archived_log where
thread# = user_thread and consumer_name = user_capture and rcscn between
first_scn and next_scn;
select min(sequence#) into minseq from dba_registered_archived_log where
thread# = user_thread and consumer_name = user_capture and sequence# >= rseq;
select max(sequence#) into maxseq from dba_registered_archived_log where
thread# = user_thread and consumer_name = user_capture;
end;
/
For any logfile which are not registered, ensure that these are on
disk and register these using :
connect / as sysdba
set pagesize 1000
select * from system.logmnr_log$ where contents = 16 order by sequence#;
- dump out the logfile; the dump pf the logfile will appear in the user_dump_dest location.
connect / as sysdba
oradebug setmypid
oradebug unlimit
alter session set events '1354 trace name context forever, level 32768';
alter session set events '1348 trace name context forever, level 1032';
alter system dump logfile '&fqfn';
It may be that logfile will need to be restored or copied once again from
the primary.
One the above has been done the logfile can be reregistered as follows :
connect / as sysdba
create table system.logmnr_log$_bak as select * from system.logmnr_log$;
Note: you do not have to be familiar with RMAN for backup and restore
or have any experience of RMAN to use the commands detailed below.
- First of all determine where a Capture process will start from it were
restarted. This would be a convenient point to specify where to
check the existence of logs from.
- Record the restart SCN , the Thread number and Log Sequence number.
Note: The Thread number and the Log Sequence number should typically
be visible in the logfile name. This may not be the case however and will
depends on the setting of the parameter : log_archive_format.
Note :
Consider the following example where the Streams Healthcheck reports that
the capture process will restart from :
rman target /
set echo on
=======================
Checking RMAN output
....
archive log filename=<dir>/arch1_127_657120968.dbf recid=127 stamp=673799334
validation failed for archived log
archive log filename=<dir>/arch1_128_657120968.dbf recid=128 stamp=673806193
validation succeeded for archived log
...
To exit RMAN, type :
exit
If all logfiles are validated and RMAN performed the crosscheck validation
from the location that Capture would restart from , then the logs missing
may likely come after the last logs reported by RMAN. Further
inspection may be required.
References
@ <<BUG:4428833>> - CAPTURE LOOPS AT STARTUP : V$STREAMS_CAPTURE
:'INITALIZING' OR 'DICTIONARY INIT'
<<BUG:5770059>> - REQUIRED_CHECKPOINT_SCN NOT MOVING FORWARD
@ <<BUG:5893176>> - RMAN DELETES ARCHIVELOG NEEDED BY STREAMS WHEN
DATABASE IS NOT OPEN
<<BUG:6154377>> - NO LOGMNR CHECKPOINTS ARE BEING EXECUTED
<> FOLDER:CRMOD.Reserved Folder for Orion Data TOPIC:Reserved Topic for Orion Data
DOCUMENT-ID:313279.1 ALIAS: SOURCE:AWIZ 4424325.992 DOCUMENT-
TYPE:PROBLEM ZCXTECH TITLE:Capture Process : INITIALIZING/DICTIONARY
INITIALIZATION ; WAITING FOR DICTIONARY REDO: FIRST SCN ; WAITING FOR
REDO: LAST SCN MINED IMPACT:LOW SKILL-LEVEL:NOVICE STATUS:PUBLISHED
DISTRIBUTION:EXTERNAL ZCXPUBLIC ZCXCURRENT AUTHOR:MMCKELLA.UK
KEYWORD:STREAMS HEALTHCHECK ERROR:308 KEYWORD:LOOP ERROR:ORA-
308 KEYWORD:FRA ERROR:ERROR ERROR:ORA-1291 KEYWORD:STREAMS
KEYWORD:ARCHIVED LOGS KEYWORD:FLASH PRODID--1 COMPONENT:STREAMS
MINVER:3-2XSW-171 MAXVER:3-2XSW-195 PRODID--1 COMPONENT:STREAMS
MINVER:3-2XSW-218 MAXVER:3-2XSW-254 PRODID--1 COMPONENT:STREAMS
MINVER:3-2XSW-278 MAXVER:3-2XSW-288 PORTID-1-914CU FDRSEG-1066 FDRSEG-
1067