Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Posts
    2

    Unanswered: Read Oracle redo log file

    Hi,

    I am new to use oracle. can anyon help me how to read the oracle redo log file.

    Waiting for your kindly reply.

    John

  2. #2
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Use the logminer utility ... It is an Oracle utility that you can see the
    DML that has occurred .. There are quite a few queries that you can issue
    to look at ... the number of times a specific table was updated, the updates
    from a specific user, etc ...
    Below is an example of the sql to issue for logminer (please read up on logminer in the documentation)

    ----- Build the LogMiner dictionary -----
    EXECUTE sys.DBMS_LOGMNR_D.BUILD( -
    DICTIONARY_FILENAME =>'LogMiner_Dictionary.ora', -
    DICTIONARY_LOCATION => 'D:\oracle\admin\xxx\udump');

    ----- Specify logs you want to analyze ----

    EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( -
    LOGFILENAME => 'D:\Oradata\xxx\Archives\T001S01098.ARC', -
    OPTIONS => sys.dbms_logmnr.NEW);

    -- Add other logs --

    EXECUTE DBMS_LOGMNR.ADD_LOGFILE( -
    LOGFILENAME => 'C:\Oracle\oradata\xxx\redo03.log', -
    OPTIONS => dbms_logmnr.ADDFILE);

    --------- Start LogMiner (change datetime stamps) ------------

    EXECUTE SYS.DBMS_LOGMNR.START_LOGMNR( -
    DICTFILENAME => 'D:\oracle\admin\xxx\udump\LogMiner_Dictionary.ora ', -
    STARTTIME => to_date('25-MAY-2004 10:00:00', 'DD-MON-YYYY HH24:MIS'), -
    ENDTIME => to_date('25-MAY-2004 11:15:00', 'DD-MON-YYYY HH24:MIS'));

    -------------- a few queries that you can issue ----------------

    -- All info --
    SELECT operation, sql_redo FROM v$logmnr_contents;

    -- For a user --
    SELECT sql_redo, sql_undo FROM v$logmnr_contents
    WHERE USERNAME = 'SMITH' AND SEG_NAME = 'SHIPPER_LINE';

    --- Occurances for a table ---
    SELECT to_char(timestamp,'HH24:MIS'),USERNAME,OPERATION,STATUS, sql_redo
    FROM v$logmnr_contents
    WHERE SEG_NAME = 'LABOR_TICKET';



    hth
    Gregg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •