Test on adding REDO logfile to log miner

  • From: Sreejith S Nair <Sreejith.Sreekantan@xxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 2 Sep 2010 16:01:56 +0530

 This was the test I did. I created a function to add log redo log file to 
dbms_logmnr, I added it from command line and also from a cursor reading 
from a table. But the latter does not seem to work.

Am I missing something ? Please help.


SQL*Plus: Release 10.2.0.1.0 - Production on Thu Sep 2 15:25:52 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit 
Production
With the Partitioning, OLAP and Data Mining options

SQL> set serveroutput on;
SQL> CREATE OR REPLACE PROCEDURE test_mine (
2 log_file VARCHAR2
3 )
4 IS
5 BEGIN
6 --start logminer
7 DBMS_OUTPUT.put_line ('Log File' || log_file);
8 SYS.DBMS_LOGMNR.add_logfile (logfilename => log_file,
9 options => SYS.DBMS_LOGMNR.NEW);
10 END;
11 /

Procedure created.

SQL> exec test_mine('/applns/oracle/oradata/CBA01/redo02.log');
Log File/applns/oracle/oradata/CBA01/redo02.log

PL/SQL procedure successfully completed.

SQL> select * from audit_redo_logs;

LOG_FILE_NM



--------------------------------------------------------------------------------
FILE_CREA P TMSTMP

--------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------
 CMT_TXT

--------------------------------------------------------------------------------
'/applns/oracle/oradata/CBA01/redo02.log'
02-SEP-10 N 02-SEP-10


SQL> DECLARE
2 v_log VARCHAR2 (100);
3 BEGIN
4 FOR i IN (SELECT log_file_nm
5 FROM audit_redo_logs)
6 LOOP
7 DBMS_OUTPUT.put_line (' Log file ' || i.log_file_nm);
8 test_mine (i.log_file_nm);
9 DBMS_OUTPUT.put_line (' Log file ' || i.log_file_nm);
10 END LOOP;
11 END;
12 /
Log file '/applns/oracle/oradata/CBA01/redo02.log'
Log File'/applns/oracle/oradata/CBA01/redo02.log'
DECLARE
*
ERROR at line 1:
ORA-01284: file '/applns/oracle/oradata/CBA01/redo02.log' cannot be opened
ORA-00308: cannot open archived log 
''/applns/oracle/oradata/CBA01/redo02.log''
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-06512: at "SYS.DBMS_LOGMNR", line 68
ORA-06512: at "CTS_BAD01.TEST_MINE", line 8
ORA-06512: at line 8


Thank You,

Kind Regards,
Sreejith Nair






DISCLAIMER: 

"The information in this e-mail and any attachment is intended only for 
the person to whom it is addressed and may contain confidential and/or 
privileged material. If you have received this e-mail in error, kindly 
contact the sender and destroy all copies of the original communication. 
IBS makes no warranty, express or implied, nor guarantees the accuracy, 
adequacy or completeness of the information contained in this email or any 
attachment and is not liable for any errors, defects, omissions, viruses 
or for resultant loss or damage, if any, direct or indirect."




Other related posts: