Need to understand when  redo log files content  is wrote to datafiles

Hi all
I have a question about the time when redo log files are wrote to the datafiles
supposing that the database is in NOARCHIVELOG mode, and all redo log files are filled, the official oracle database documentation says that: *a filled redo log file is available
after the changes recorded in it have been written to the datafiles* witch mean that we just need to have all the redo log files filled to "*commit*" changes to the database
Thanks for help
Edited by: rachid on Sep 26, 2012 5:05 PM

rachid wrote:
the official oracle database documentation says that: a filled redo log file is available after the changes recorded in it have been written to the datafiles It helps if you include a URL to the page where you found this quote (if you were using the online html manuals).
The wording is poor and should be modified to something like:
<blockquote>
+"a filled online redo log file is available for re-use after all the data blocks that have been changed by change vectors recorded in the log file have been written to the data files"+
</blockquote>
Remember if a data block that is NOT an undo block has been changed by a transaction, then an UNDO block has been changed at the same time, and both change vectors will be in the redo log file. The redo log file cannot, therefore, be re-used until the data block and the associated UNDO block have been written to disc. The change to the data block can thus be rolled back (uncommitted changes can be written to data files) because the UNDO is also available on disc if needed.
If you find the manuals too fragmented to follow you may find that my book, Oracle Core, offers a narrative description that is easier to comprehend.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
Author: <b><em>Oracle Core</em></b>

Similar Messages

  • What will happen when redo log file or archive log file, which is yet to be

    What will happen when redo log file or archive log file, which is yet to be read by logminer is corrupted? It seems that the captures process hangs between “Paused for flow control” and “Enqueuing Messages”. How to come out of this condition without recreating the captures process?
    Any clue is helpful
    Thanks in advance for your help.

    Basically you can't skip SCN since it will result in a data integrity issues (say you had skipped some inserts and later there will be some updates to a not replicated data).
    Streams maintain their own checkpoint tables with transaction related stuff. So there is no way you can jump over a range of SCN's without recreating capture.
    The only thing you can try - temporary give capture process a rule without any objects. But it will need to mine through the redo anyway.

  • Redo log file contents

    How can I check the contents of the redo log files?
    I recently install 10g. We haven't used the db yet, but the redo logs are very active.
    Is there a query to determine what activity is filling the redo log files?
    Thank you for any help.
    Take Care.
    S

    The Automatic Workload Repository takes snapshots of
    statistics, via scheduled job, at hourly intervals.
    This is probably responsible for some of the redo.
    You can see if this feature is turned on by checking
    the job queue (simply: select * from dba_jobs).
    The default settings on AWR can be managed using the
    DBMS_WORKLOAD_REPOSITORY built-in package.
    Hope this helps.
    Kailash.

  • Changing names of datafiles, tempfiles and redo log files

    DB version:10g Release 2
    Can i use
    ALTER DATABASE RENAME FILE ...command to rename datafiles, tempfiles and redo log files?

    ScottsTiger wrote:
    DB version:10g Release 2
    Can i use
    ALTER DATABASE RENAME FILE ...command to rename datafiles, tempfiles and redo log files?Why not check the Fine Manual found at tahiti.oracle.com?
    Please note that when you use this command, you are doing nothing to the actual files on the OS. You are simply changing the db's knowledge of them, as stored in the control file.

  • Oracle standby/redo log file shipping keeps needing logs re-registering

    Hi
    We have Log File Shipping enabled and the prod system ships redo logs over to the LFS server. It's kept 24 hours behind. It usually ships the logs (and I believe automatically registers them) without issue.
    EXCEPT - it keeps complaining about missing redo log files.
    The file is usually there; but just needs registering with:
    alter database register or replace logfile '/oracle/S1P/saparch/S1Parch1_636443_654987192.dbf';
    (we found if we left out the 'or replace' it takes a very long time or even hangs)
    It then plods on and applies the next... can go for another 2 or 3... or 20... but then often gets stuck again, and you need to register the next.
    Can spend whole days on this...!!
    We did try running a script to register the next 1365 redo logs! It failed on 4, so I ran it again... it worked on those 4, but turned up 3 others it had worked with before! HUH?!? So manually did those 3 ... fine... it carried on rolling forward... but got stuck after 10 minutes again when it hit another it reckoned needed registering (we'd already done it twice!!).
    Any ideas?
    Ross

    Hi
    We have Log File Shipping enabled and the prod system ships redo logs over to the LFS server. It's kept 24 hours behind. It usually ships the logs (and I believe automatically registers them) without issue.
    EXCEPT - it keeps complaining about missing redo log files.
    The file is usually there; but just needs registering with:
    alter database register or replace logfile '/oracle/S1P/saparch/S1Parch1_636443_654987192.dbf';
    (we found if we left out the 'or replace' it takes a very long time or even hangs)
    It then plods on and applies the next... can go for another 2 or 3... or 20... but then often gets stuck again, and you need to register the next.
    Can spend whole days on this...!!
    We did try running a script to register the next 1365 redo logs! It failed on 4, so I ran it again... it worked on those 4, but turned up 3 others it had worked with before! HUH?!? So manually did those 3 ... fine... it carried on rolling forward... but got stuck after 10 minutes again when it hit another it reckoned needed registering (we'd already done it twice!!).
    Any ideas?
    Ross

  • Do I need to create new group for standby redo log files?

    I have 10 group of redo log files with 2 members for each group for my primary database , Do I need to create new group for standby redo log files for the standby database
    Group#     Members
    ==============
    1              2
    2              2
    3             2
    4             2
    5             2
    6             2
    7             2
    8             2
    9             2
    10           2
    If So, The following statment is correct? or nto
    ALTER DATABASE ADD STANDBY LOGFILE GROUP 1 ('D:\Databases\epprod\StandbyRedoLog\REDO01.LOG',D:\Databases\epprod\StandbyRedoLog\REDO01_1.LOG');
    please correct me if am doin mistake
    becuase when I issue the statment I getting error message sayin the group is already created.

    Thanks John
    I just find the answer
    Yes, it's recomeded to add new group , for instnace If I have 10 group from 1 to 10 then the standby shoudl be from 11 to 20
    Thanks I found the answer.

  • Bottleneck when switching the redo log files.

    Hello All,
    I am using Oracle 11.2.0.3.
    The application team reported that they are facing slowness at certain time.
    I monitored the database and I found that at some switching of the redo log files (not always) I am facing a slowness at the application level.
    I have 2 threads since my database is RAC, each thread have 3 redo log groups multiplexed to the FRA, with size 300 MB each.
    Is there any way to optimize the switch of redo log files? knowing that my database is running in ARCHIVELOG mode.
    Regards,

    Hello Nikolay,
    Thanks for your input I am sharing with you the below information. I have 2 instances so I will provide the info from each instance
    Instance 1:
    Load Profile              Per Second    Per Transaction   Per Exec   Per Call
    ~~~~~~~~~~~~         ---------------    --------------- ---------- ----------
          DB Time(s):                4.9                0.0       0.00       0.00
           DB CPU(s):                1.1                0.0       0.00       0.00
           Redo size:        3,014,876.2            3,660.4
       Logical reads:           32,619.3               39.6
       Block changes:            7,969.0                9.7
      Physical reads:                0.2                0.0
    Physical writes:              164.0                0.2
          User calls:            7,955.4                9.7
              Parses:              288.9                0.4
         Hard parses:               96.0                0.1
    W/A MB processed:                0.2                0.0
              Logons:                0.9                0.0
            Executes:            2,909.4                3.5
           Rollbacks:                0.0                0.0            
    Instance 2:
    Load Profile              Per Second    Per Transaction   Per Exec   Per Call
    ~~~~~~~~~~~~         ---------------    --------------- ---------- ----------
          DB Time(s):                5.5                0.0       0.00       0.00
           DB CPU(s):                1.4                0.0       0.00       0.00
           Redo size:        3,527,737.9            3,705.7
       Logical reads:           29,916.5               31.4
       Block changes:            8,893.7                9.3
      Physical reads:                0.2                0.0
    Physical writes:              194.0                0.2
          User calls:            7,742.8                8.1
              Parses:              262.7                0.3
         Hard parses:               99.5                0.1
    W/A MB processed:                0.4                0.0
              Logons:                1.0                0.0
            Executes:            2,822.5                3.0
           Rollbacks:                0.0                0.0
        Transactions:              952.0
    Instance 1:
    Top 5 Timed Foreground Events
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                               Avg
                                                              wait   % DB
    Event                                 Waits     Time(s)   (ms)   time Wait Class
    DB CPU                                            1,043          21.5
    log file sync                       815,334         915      1   18.9 Commit
    gc buffer busy acquire              323,759         600      2   12.4 Cluster
    gc current block busy               215,132         585      3   12.1 Cluster
    enq: TX - row lock contention        23,284         264     11    5.5 Applicatio
    Instance 2:
    Top 5 Timed Foreground Events
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                               Avg
                                                              wait   % DB
    Event                                 Waits     Time(s)   (ms)   time Wait Class
    DB CPU                                            1,340          24.9
    log file sync                       942,962       1,125      1   20.9 Commit
    gc buffer busy acquire              377,812         594      2   11.0 Cluster
    gc current block busy               211,270         488      2    9.1 Cluster
    enq: TX - row lock contention        30,094         299     10    5.5 Applicatio
    Instance 1:
    Operating System Statistics        Snaps: 1016-1017
    -> *TIME statistic values are diffed.
       All others display actual values.  End Value is displayed if different
    -> ordered by statistic type (CPU Use, Virtual Memory, Hardware Config), Name
    Statistic                                  Value        End Value
    AVG_BUSY_TIME                             17,451
    AVG_IDLE_TIME                             81,268
    AVG_IOWAIT_TIME                                1
    AVG_SYS_TIME                               6,854
    AVG_USER_TIME                             10,548
    BUSY_TIME                                420,031
    IDLE_TIME                              1,951,741
    IOWAIT_TIME                                  288
    SYS_TIME                                 165,709
    USER_TIME                                254,322
    LOAD                                           3                6
    OS_CPU_WAIT_TIME                         523,000
    RSRC_MGR_CPU_WAIT_TIME                         0
    VM_IN_BYTES                              311,280
    VM_OUT_BYTES                          75,862,008
    PHYSICAL_MEMORY_BYTES             62,813,896,704
    NUM_CPUS                                      24
    NUM_CPU_CORES                                  6
    NUM_LCPUS                                     24
    NUM_VCPUS                                      6
    GLOBAL_RECEIVE_SIZE_MAX                4,194,304
    GLOBAL_SEND_SIZE_MAX                   4,194,304
    TCP_RECEIVE_SIZE_DEFAULT                  16,384
    TCP_RECEIVE_SIZE_MAX      9.2233720368547758E+18
    TCP_RECEIVE_SIZE_MIN                       4,096
    TCP_SEND_SIZE_DEFAULT                     16,384
    TCP_SEND_SIZE_MAX         9.2233720368547758E+18
    TCP_SEND_SIZE_MIN                          4,096
    Operating System Statistics - Detail  Snaps: 1016-101
    Snap Time           Load    %busy    %user     %sys    %idle  %iowait
    22-Aug 11:33:55      2.7      N/A      N/A      N/A      N/A      N/A
    22-Aug 11:50:23      6.2     17.7     10.7      7.0     82.3      0.0
    Instance 2:
    Operating System Statistics         Snaps: 1016-1017
    -> *TIME statistic values are diffed.
       All others display actual values.  End Value is displayed if different
    -> ordered by statistic type (CPU Use, Virtual Memory, Hardware Config), Name
    Statistic                                  Value        End Value
    AVG_BUSY_TIME                             11,823
    AVG_IDLE_TIME                             86,923
    AVG_IOWAIT_TIME                                0
    AVG_SYS_TIME                               4,791
    AVG_USER_TIME                              6,991
    BUSY_TIME                                475,210
    IDLE_TIME                              3,479,382
    IOWAIT_TIME                                  410
    SYS_TIME                                 193,602
    USER_TIME                                281,608
    LOAD                                           3                6
    OS_CPU_WAIT_TIME                         615,400
    RSRC_MGR_CPU_WAIT_TIME                         0
    VM_IN_BYTES                               16,360
    VM_OUT_BYTES                          72,699,920
    PHYSICAL_MEMORY_BYTES             62,813,896,704
    NUM_CPUS                                      40
    NUM_CPU_CORES                                 10
    NUM_LCPUS                                     40
    NUM_VCPUS                                     10
    GLOBAL_RECEIVE_SIZE_MAX                4,194,304
    GLOBAL_SEND_SIZE_MAX                   4,194,304
    TCP_RECEIVE_SIZE_DEFAULT                  16,384
    TCP_RECEIVE_SIZE_MAX      9.2233720368547758E+18
    TCP_RECEIVE_SIZE_MIN                       4,096
    TCP_SEND_SIZE_DEFAULT                     16,384
    TCP_SEND_SIZE_MAX         9.2233720368547758E+18
    TCP_SEND_SIZE_MIN                          4,096
    Operating System Statistics - Detail Snaps: 1016-101
    Snap Time           Load    %busy    %user     %sys    %idle  %iowait
    22-Aug 11:33:55      2.6      N/A      N/A      N/A      N/A      N/A
    22-Aug 11:50:23      5.6     12.0      7.1      4.9     88.0      0.0
              -------------------------------------------------------------

  • Where are BLOB Files stored when using redo log files.

    I am using Archive Log Mode for my backups. I was wondering if Blob files get stored in the redo log files or if they are archived somewhere else?
    Rob.

    BLOB are just columns of some tables and are stored in related tablespace table by default in their own segments. Changes to BLOB columns are also stored in redo log more or less like any other column.
    See an short example for default LOB storage in Re: CLOB Datatype [About Space allocation]
    Edited by: P. Forstmann on 27 avr. 2011 07:20

  • Redo log files in case of NOARCHIVELOG Mode.

    Question is related with the oracle architure..
    database requires a minimum of two redo log files to guarantee that one is always available for writing while the other is being archived, this sounds perfect when DB is running in ARCHIVELOG mode but at the same time it also forces database to have 2 redo log files even when the DB is running in NOARCHIVELOG mode?
    Any particular reason..
    I would look for reasons not answers on what redo log is and what information it holds etc..

    pgoel wrote:
    If you had only one file all further changes would have to stop until all changed data blocks had been written to disc. By insisting on a minimum of two log files Oracle can allow the log writer to fill the second log file as the database writer writes out the dirty blocks covered by changes desrcibed in the first log file.What about having a big size redo log file instead of two? Checkppoint being initiated when the redo log file is half filled
    I mean, understand the logic, two is better, even best.. but still not getting convinced. I am just trying to think, can not Oracle work with 1 group with 1 big file..specailly when Noarch mode ? Having
    Edited by: pgoel on Mar 12, 2011 7:27 PMNo, you still didn't understand and I am not sure how else we can say it. Okay, think about log groups as two buckets which are used to fill the redo content. The LGWR is filling one bucket at a time till it can't accept any more content. Once filled, rather than spilling the content out, it jumps over to the second bucket. Now, taking your statement of big sized redo, Pgoel, it doesn't matter how big sized bucket you bring in, eventually it will fill in. Its not possible that you wont be able to fill it , it just would take more longer than the normal timings. Thats all. So in any case , you need the second bucket. And I am not sure that why you are struck on the archivelog mode. I hope you do understand that its an optional mode. This means, this may or may not be there. If there, its a good thing that before doing the flush of the redo content, Oracle would be able to save the contents in the archived (think about the name, it's very meaning is to preserve, to archive) log file. If not, the redo content wuold be lost and there won't be any record of transactions leaving you to reenter the lost transactions. Its a meaningless point on which you are struck i.e. the archive or no-archivelog mode. Be it whatever, Oracle would still need minimum of the two log groups.
    HTH
    Aman....

  • Hoping for a quick response : EXP and Archived REDO log files

    I apologize in advance if this question has been asked and answered 100 times. I admit I didn't search, I don't have time. I'm leaving on vacation tomorrow, and I need to know if I'm correct about something to do with backup / restore.
    we have 10g R2 running a single instance on a single server. The application vendor has "embedded" oracle with their application. The vendor's backup is a batch file using EXP - thus:
    exp system/xpwdxx@db full=y file=D:\Orant\admin\db\EXP\db_full.dmp log=D:\Orant\admin\db\EXP\db_full.txt direct=y compress=y
    This command is executed nightly at midnight. The files are then backed up by our nightly backup to offsite storage media.
    Te database is running in autoarchive mode. The problem is, the archived redo files filled the drive they were being stored on, and it is the drive the database is on. I used OS commands to move 136G of archived redo logs onto other storage media to free the drive.
    My question: Since the EXP runs at midnight, when there is likely NO activity, do I need to run in AutoArchive Mode? From what I have read, you cannot even apply archived redo log files to this type of backup strategy (IMP) Is that true? We are ok losing changes since our last EXP. I have read a lot of stuff about restoring consistent vs. inconsistent, and just need to know: If my disk fails, and I have to start with a clean install of Oracle and nothing else, can I IMP this EXP and get back up and running as of the last EXP? Or do I need the autoarchived redo log files back to July 2009 (136G of them).
    Hoping for a quick response
    Best Regards, and thanks in advance
    Bruce Davis

    Bruce Davis wrote:
    Amardeep Sidhu
    Thank you for your quick reply. I am reading in the other responses that since I am using EXP without consistent=y, I might not even have a backup. The application vendor said that with this dmp file they can restore us to the most recent backup. I don't really care for this strategy as it is untested. I asked them to verify that they could restore us and they said they tested the dmp file and it was OK.
    Thank you for taking the time to reply.
    Best Regards
    BruceThe dump file is probably ok in the sense it is not corrupted and can be used in an imp operation. That doesn't mean the data in it is transactionally consistent. And to use it at all, you have to have a database up and running. If the database is physically corrupted, you'll have to rebuild a new database from scratch before you can even think about using your dmp file.
    Vendors never understand databases. I once had a vendor tell me that Oracle's performance would be intolerable if there were more than 5 concurrent connections. Well, maybe in HIS product ..... Discussions terminated quickly after he made that statement.

  • Database not starting,REDO log file error?

    My DB was working fine uptill last evening, when i restarted it for some DB task it showed me an error ..
    ORA-00333: redo log read error block 57346 count 8192
    I studied the alert log file & related trace file .... but could not conclude what to do ?? Can any one suggest me what could be the solution...
    ORACLE 10g R2
    Windows 2003 Server
    Database in NOARCHIVELOG mode.
    I don't have the recent backup.The one i have is 20 days old.
    Alert Log file contents : -
    Wed Jun 02 20:22:19 2010
    Aborting crash recovery due to error 333
    Wed Jun 02 20:22:19 2010
    Errors in file e:\oracle\product\10.2.0\admin\ora10g\udump\ora10g_ora_140.trc:
    ORA-00333: redo log read error block 57346 count 8192
    ORA-333 signalled during: ALTER DATABASE OPEN...
    Wed Jun 02 20:37:15 2010
    db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.
    Wed Jun 02 20:43:53 2010
    Shutting down instance: further logons disabled
    Wed Jun 02 20:43:53 2010
    Stopping background process CJQ0
    Wed Jun 02 20:43:54 2010
    Stopping background process MMNL
    Wed Jun 02 20:43:55 2010
    Stopping background process MMON
    Wed Jun 02 20:43:56 2010
    Shutting down instance (immediate)
    License high water mark = 3
    Wed Jun 02 20:43:56 2010
    Stopping Job queue slave processes
    Wed Jun 02 20:43:56 2010
    Job queue slave processes stopped
    Waiting for dispatcher 'D000' to shutdown
    All dispatchers and shared servers shutdown
    Wed Jun 02 20:43:58 2010
    ALTER DATABASE CLOSE NORMAL
    ORA-1109 signalled during: ALTER DATABASE CLOSE NORMAL...
    Wed Jun 02 20:43:58 2010
    ALTER DATABASE DISMOUNT
    Completed: ALTER DATABASE DISMOUNT
    ARCH: Archival disabled due to shutdown: 1089
    Shutting down archive processes
    Archiving is disabled
    Archive process shutdown avoided: 0 active
    ARCH: Archival disabled due to shutdown: 1089
    Shutting down archive processes
    Archiving is disabled
    Archive process shutdown avoided: 0 active
    Trace file to read ora10g_ora_140.trc:-
    Dump file e:\oracle\product\10.2.0\admin\ora10g\udump\ora10g_ora_140.trc
    Wed Jun 02 20:22:18 2010
    ORACLE V10.2.0.1.0 - Production vsnsta=0
    vsnsql=14 vsnxtr=3
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Windows Server 2003 Version V5.2 Service Pack 1
    CPU                 : 2 - type 586, 1 Physical Cores
    Process Affinity    : 0x00000000
    Memory (Avail/Total): Ph:3527M/4094M, Ph+PgF:4386M/5973M, VA:800M/2047M
    Instance name: ora10g
    Redo thread mounted by this instance: 1
    Oracle process number: 15
    Windows thread id: 140, image: ORACLE.EXE (SHAD)
    *** SERVICE NAME:() 2010-06-02 20:22:18.406
    *** SESSION ID:(159.3) 2010-06-02 20:22:18.406
    Successfully allocated 2 recovery slaves
    Using 545 overflow buffers per recovery slave
    Thread 1 checkpoint: logseq 14261, block 2, scn 86974094
      cache-low rba: logseq 14260, block 4023
        on-disk rba: logseq 14262, block 3758, scn 86978396
      start recovery at logseq 14261, block 2, scn 86974094
    ORA-00333: redo log read error block 57346 count 8192
    ORA-00312: online log 2 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA10G\REDO02.LOG'
    ORA-27070: async read/write failed
    OSD-04016: Error queuing an asynchronous I/O request.
    O/S-Error: (OS 2) The system cannot find the file specified.
    ORA-00333: redo log read error block 57346 count 8192
    ORA-00312: online log 2 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA10G\REDO02.LOG'
    ORA-27091: unable to queue I/O
    ORA-27070: async read/write failed
    OSD-04006: ReadFile() failure, unable to read from file
    O/S-Error: (OS 2) The system cannot find the file specified.
    ORA-00333: redo log read error block 57346 count 8192
    *** 2010-06-02 20:43:58.812
    *** 2010-06-02 20:43:58.812 60680 kcrr.c
    ARCH: Archival disabled due to shutdown: 1089
    *** 2010-06-02 20:43:59.812 60680 kcrr.c
    ARCH: Archival disabled due to shutdown: 1089

    Hi,Aman this(following) may is not good way for opening database,but OP can try and open own database:
    @ DBA4 you will see from following example how you can open your database.In your online log files was corrupted,therefore you have to do following step by step then you database will open.
    SQL> alter database clear unarchived logfile group 2;
    alter database clear unarchived logfile group 2
    ERROR at line 1:
    ORA-01624: log 2 needed for crash recovery of instance p (thread 1)
    ORA-00312: online log 2 thread 1:
    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\REDO02.LOG'
    SQL> alter database backup controlfile to trace as 'D:\oracle\product\10.2.0\ora
    data\P\c.txt';
    Database altered.
    SQL> shutdown abort;
    ORACLE instance shut down.
    SQL> startup nomount;
    ORACLE instance started.
    Total System Global Area  125829120 bytes
    Fixed Size                  1288100 bytes
    Variable Size              75499612 bytes
    Database Buffers           41943040 bytes
    Redo Buffers                7098368 bytes
    SQL> CREATE CONTROLFILE REUSE DATABASE "P" RESETLOGS   ARCHIVELOG
      2      MAXLOGFILES 16
      3      MAXLOGMEMBERS 3
      4      MAXDATAFILES 100
      5      MAXINSTANCES 8
      6      MAXLOGHISTORY 292
      7  LOGFILE
      8    GROUP 1 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\REDO01.LOG'  SIZE 50M,
      9    GROUP 2 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\REDO02.LOG'  SIZE 50M,
    10    GROUP 3 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\REDO03.LOG'  SIZE 50M
    11  DATAFILE
    12    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\SYSTEM01.DBF',
    13    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\UNDOTBS01.DBF',
    14    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\SYSAUX01.DBF',
    15    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\USERS01.DBF',
    16    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\TS_TEST.ORA',
    17    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\TEST.ORA',
    18    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\TEST1.ORA'
    19  CHARACTER SET WE8MSWIN1252;
    Control file created.
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\SYSTEM01.DBF'
    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 2032832 generated at 06/03/2010 12:42:29 needed for thread 1
    ORA-00289: suggestion :
    D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\P\ARCHIVELOG\2010_06_03\O1_MF_1_87_
    %U_.ARC
    ORA-00280: change 2032832 for thread 1 is in sequence #87
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\SYSTEM01.DBF'
    ORA-01112: media recovery not started
    then add *_allow_resetlogs_corruption=true* in pfile then startup database with pfile as
    SQL> startup mount pfile=D:\oracle\product\10.2.0\admin\P\pfile\init.ora.pr
    ORACLE instance started.
    Total System Global Area  125829120 bytes
    Fixed Size                  1288100 bytes
    Variable Size              62916700 bytes
    Database Buffers           54525952 bytes
    Redo Buffers                7098368 bytes
    Database mounted.
    SQL> recover;
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 2032832 generated at 06/03/2010 12:42:29 needed for thread 1
    ORA-00289: suggestion :
    D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\P\ARCHIVELOG\2010_06_03\O1_MF_1_87_
    %U_.ARC
    ORA-00280: change 2032832 for thread 1 is in sequence #87
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\P\SYSTEM01.DBF'
    ORA-01112: media recovery not started
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
    SQL> alter database open resetlogs;
    Database altered.
    SQL>finally remove allowresetlogs_corruption=true parameter from pfile.

  • Backup vs redo log files

    Hi,
    Can anyone tell me what's the real difference between a backup file and a redo log file/archived redo log file and the scenarios (examples) when each of them can be used (for example, "......") ? Both are used for database/instance recovery. I have read the concepts of there 2 terms, but I need some additional information about the difference.
    Thanks!

    Roger25 wrote:
    What i still don't understand is how redo mechanism works; I know, redo logs records changes made to the database and it's used to re-do informations in case of a system failure/crash, for example. Ok, let's say I have a huge update, but when the system crash has occured, the transaction is neither comitted, nor rolled back. Then, how this redo is useful? If a system crash occur, all those updates aren't rolled back automatically? So the database state is as before executing that huge update? So in this case, 'what to redo'?No, with the system's crash, the transaction never gets a chance to get committed (and even rolled back) because a commit is only supposed to happen if there is an explicit or implicit commit statement is issued. Now, for the redo , with the statement, a commit marker is entered at the end of the redo stream of that transaction denoting that it's finally over now and for the corresponding transaction, the status is cleared from the transaction table that's stored in the Undo segment in which the Undo information of that transaction is stored. If you have given a huge update, the redo would be very highly required as you should be knowing that it's not all the time that the dirty buffers that are written to the data files unlikely the redo log files which are written every 3 econds. This means, there is a very fair chance that many changes have yet not even propagated to the data files for which the change vectors are now already there in the redo log files. Now, for the sake of clarity, assume that this transaction was actually committed! So now, without those changes be applied to the data files how Oracle can actually show the committed reults when the database next time would be opened? For this purpose, the redo change vectors are required. And for the uncommitted transactions , the applcation of the redo change vectors would keep on updating the Checkpoint numbers of the data files and would eventually get them synched with the control file and redo log files, without which the database would never be opened.
    HTH
    Aman....

  • Redo log file corupted, database not getting open

    I am Oracle Funda-1 student.
    Have install standard Oracle 9I on Windows XP pro service pack 2.
    I made some changes in sample table & given commit. So log buffer will flush to redo log file.
    Then I open current redo log file from OS & selected all junk characters [select all] & deleted same. Save the file. Causing redo file size 0KB.
    Then made more changes to table & issue commit. no errors ! every thing working file.
    Even chked V$log & V$logfile.
    Again I open current redo log file from OS & selected all junk characters [ select all ] & deleted same. Save the file. Causing redo file size 0KB.
    Then issue manual log switch. Alter system switch logfile
    I got disconnected from database & database was close.
    When I reconnected & try to open database in normal mode. Gave error saying redolog_1.log is corrupted & needed for recovery.
    Now not even allowing me clear redo group 1. with alter database clear logfile group 1. as database is not coming to open stage.
    just able to mount the database. with error rdolog_1 corrupted.
    Wasn't oracle suppose to be halted when very 1st time I corrupted redo log file.
    Why it disconnected me & got close.
    When then one use alter database clear logfile group 1.

    I may try this ALTER DATABASE OPEN RESETLOGS;
    As no backup & not multiplex.
    Still looking for explanation why database got close down instead of getting halt.
    I have found one more status in V$log, which is not given in Oracle university book or online document.
    INVALIDATED
    Which come as a result when oracle unable to switch to next on line group due to non availability of next group redo log physical file.
    SQL> select group#,members,status from V$log;
    GROUP# MEMBERS STATUS
    1 1 INVALIDATED
    2 1 INACTIVE
    4 1 UNUSED
    As matter of fact, it's only portion of a big
    document which happen to cover what you are testing
    in detail.
    I would invest time to read the document to
    understand how things work instead of getting dirty
    quick answers.

  • What is the difference between undo tablespace and online redo log files.

    what is the difference between undo tablespace and online redo log files. I am confused
    as per my knowledge undo tablespace is used to store the undo information when a table is being updated so that, just incase we need to rollback a transaction we know what was present in the table earlier.
    when a transaction fails the SMON performs the rollback of the data.
    This undo data is stored in the undo tablespace and read consistency if any is enforced.
    is my understanding till here correct?
    Now, can this undo data/before image not be stored in the redo log buffer and online redolog files?
    can redo-log files not store this information?
    in fact, is it that when undo tablespaces exist in a database, the undo data/before image is stored in both the undo tablespace and also the redo log files?
    kindly clarify my doubt.
    thank you.

    This question has been asked many times before. The answer is always the same.
    Yes, redo contains the before image of data (and the after-image). Therefore, it **COULD** be used to roll back a transaction.
    BUT... Redo is written sequentially. Using it to rollback your transaction would involve reading through all the redo written by maybe thousands of other people. It would be painfully slow.
    Your transaction is, however, directly linked to just the UNDO that it generates (which is JUST the before image of the data). So, your undo is your undo and doesn't share space with anyone else's undo. Therefore, using it to roll back YOUR transaction is fast.
    The fact that undo is only the before image of the data also makes it faster than wading through a sea of before and AFTER images as you'd find in redo. About twice as fast, in fact, since there's half the data. Roughly.
    Redo also gets written and flushed to disk whenever there's a commit, 3 seconds are up or too much (1MB, actually) redo gets generated between flushes caused by other factors. Your redo gets flushed when those things happen, even if you haven't actually committed your transaction. And redo logs recycle themselves, meaning that your redo -even if your transaction hasn't been committed yet- can be over-written by later transactions. Try rolling back when that's happened, if redo was the source of your rollback data!
    Undo, however, cannot be over-written if the transaction has not been committed. Ever. If you don't commit for three years, there will be three years' undo stored in your database (assuming you had the space, of course!).
    I could go on, but that will do. Redo is there fore RECOVERY, after catastrophe. Undo is there for read-consistency (and the occasional change of mind). Two different functions. Two different mechanisms. Each one highly tuned to doing what it does, why it does it, most efficiently and effectively.

  • How to recover from one corrupted redo log file in NOARCHIVE mode?

    Oracle 10.2.1.
    The redo log file was corrupted and Oracle can't work.
    When I use STARTUP mount, I got no error msg.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area 1652555776 bytes
    Fixed Size 1251680 bytes
    Variable Size 301991584 bytes
    Database Buffers 1342177280 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    But I have some applications which are depended on Oracle can't be started.
    So, I tried STARTUP open. But I got error msg.
    SQL> startup open
    ORACLE instance started.
    Total System Global Area 1652555776 bytes
    Fixed Size 1251680 bytes
    Variable Size 301991584 bytes
    Database Buffers 1342177280 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    ORA-00368: checksum error in redo log block
    ORA-00353: log corruption near block 497019 change 42069302 time 11/07/2007
    23:43:09
    ORA-00312: online log 4 thread 1:
    'G:\ORACLE\PRODUCT\10.2.0\ORADATA\NMDATA\REDO04.LOG'
    So, how can I restore and recover my database?
    If use RMAN, how to do that?
    Any help will be appreciated.
    Thanks.

    Hi, Yingkuan,
    Thanks for the helps.
    Actually, I have 10 redo log files exists. All of them are here.
    I tried your suggestion:
    alter database clear unarchived logfile group 4;
    The error msg I got is the same as before:
    SQL> alter database clear unarchived logfile group 4;
    alter database clear unarchived logfile group 4
    ERROR at line 1:
    ORA-01624: log 4 needed for crash recovery of instance nmdata (thread 1)
    ORA-00312: online log 4 thread 1:
    'G:\ORACLE\PRODUCT\10.2.0\ORADATA\NMDATA\REDO04.LOG'
    Compared to losing all the data, it is OK for me lose some of them.
    I have more than 1 TB data stored and 99.9% of them are raster images.
    The loading of these data were the headache. If I can save them, I can bear the lost.
    I want to grasp the last straw.
    But I don't know how set the parameter: allowresetlogs_corruption
    I got the error msg:
    SQL> set allowresetlogs_corruption=true;
    SP2-0735: unknown SET option beginning "_allow_res..."
    I have run the command:
    Recover database until cancel
    Alter database open resetlogs
    The error msg I got is the following:
    SQL> recover database until cancel
    ORA-00279: change 41902930 generated at 11/05/2007 22:01:48 needed for thread 1
    ORA-00289: suggestion :
    D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\NMDATA\ARCHIVELOG\2007_11_09\O1_MF_
    1_1274_%U_.ARC
    ORA-00280: change 41902930 for thread 1 is in sequence #1274
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\NMDATA\SYSTEM01.DBF'
    ORA-01112: media recovery not started
    SQL>
    From the log file, I got the following:
    ALTER DATABASE RECOVER database until cancel
    Fri Nov 09 00:12:48 2007
    Media Recovery Start
    parallel recovery started with 2 processes
    ORA-279 signalled during: ALTER DATABASE RECOVER database until cancel ...
    Fri Nov 09 00:13:20 2007
    ALTER DATABASE RECOVER CANCEL
    Fri Nov 09 00:13:21 2007
    ORA-1547 signalled during: ALTER DATABASE RECOVER CANCEL ...
    Fri Nov 09 00:13:21 2007
    ALTER DATABASE RECOVER CANCEL
    ORA-1112 signalled during: ALTER DATABASE RECOVER CANCEL ...
    Thank you very much. and I am looking forward to your followup input.

Maybe you are looking for