Doubts in Redo log

Hi,
DB: 10.2.0.4
OS: UNIX/Windows
I have some doubts in archive log generation.
*1)* Once current redo log is filed , LGWR will move to next redo log which is available with status INACTIVE , and current one will become ACTIVE.If more archive logs are generating , based on business , ACTIVE will become INACTIVE after sometime and can use for CURRENT redo log.
If no archive logs are generated , my redo log is not coming out from status ACTIVE to INACTIVE .Even i waited for 5 minutes , but i had the same status.
What will be the time to make ACTIVE to INACTIVE?. What causing to make this happen ?.
Normally , when checkpoint is happened DBWR will write the CURRENT log data to data files , right?.In ACTIVE state , has archive log generated?. Many times i seen archive log is generated even it is in ACTIVE state.
*2)* My Archive logs size (25MB) is not equal to the redo log size. Normally , when we switch the logs or any rman backup , logs will be switched automatically and how much redo is filled , same will be generated with size.
But, in my case , more archive logs are generating and many have the different size out of generated and no manual switching or rman script are running during this period.
Any idea on this?.
Thanks,
Sunand

sunand wrote:
Hi,
DB: 10.2.0.4
OS: UNIX/Windows
I have some doubts in archive log generation.
*1)* Once current redo log is filed , LGWR will move to next redo log which is available with status INACTIVE , and current one will become ACTIVE.If more archive logs are generating , based on business , ACTIVE will become INACTIVE after sometime and can use for CURRENT redo log.
If no archive logs are generated , my redo log is not coming out from status ACTIVE to INACTIVE .Even i waited for 5 minutes , but i had the same status.
What will be the time to make ACTIVE to INACTIVE?. What causing to make this happen ?.
Normally , when checkpoint is happened DBWR will write the CURRENT log data to data files , right?.In ACTIVE state , has archive log generated?. Many times i seen archive log is generated even it is in ACTIVE state.
That is wrong.DBWR process write dirty blocks from database buffer cache to datafiles but not "CURRENT log data to data files".So if your current online log group is full then ARCH process will try archiving this group to available destination and without archiving there will not happen LOG SWITCH.After archiving log switch will happen and LOG SEQUENCE NUMBER will increase then you will get new current log group.IF old group status is ACTIVE it means this group still need instance recovery.SO when you execute ALTER SYSTEM CHECKPOINT in this case status of this group will INACTIVE.
*2)* My Archive logs size (25MB) is not equal to the redo log size. Normally , when we switch the logs or any rman backup , logs will be switched automatically and how much redo is filled , same will be generated with size.
But, in my case , more archive logs are generating and many have the different size out of generated and no manual switching or rman script are running during this period.
Any idea on this?.
As you know archivelogs is a copy of online redologs,but there can be several reasons and result these size can be different.For example manual log switch or if you set ARCHIVE_LAG_TARGET != 0.Finally archive logs contains information for media recover,but online redo logs contain instance and media recovery it means these size can be different.

Similar Messages

  • Redo Log and Supplemental Logging related doubts

    Hi Friends,
    I am studying Supplemental logging in detail. Have read lots of articles and oracle documentation about it and redo logs. But couldnot found answers of some doubts..
    Please help me clear it.
    Scenario: we have one table with primary key. And we execute an update query on that table which is not using the primary key column in any clause..
    Question: In this case, does the redo log entry generated for the changes done by update query contain the primary columns values..?
    Question: If we have any table with primary key, do we need to enable the supplemental logging on primary columns of that table? If yes, in which circumstances, do we need to enable it?
    Question: If we have to configure stream replication on that table(having primary key), why do we actually need to enable its supplemental logging ( I have read the documentation saying that stream requires some more information so.., but actually what information does it need. Again this question is highly related to the first question.)
    Also please suggest any good article/site which provide inside details of redo log and supplemental logging, if you know.
    Regards,
    Dipali..

    1) Assuming you are not updating the primary key column and supplemental logging is not enabled, Oracle doesn't need to log the primary key column to the redo log, just the ROWID.
    2) Is rather hard to answer without being tautological. You need to enable supplemental logging if and only if you have some downstream use for additional columns in the redo logs. Streams, and those technologies built on top of Streams, are the most common reason for enabling supplemental logging.
    3) If you execute an update statement like
    UPDATE some_table
      SET some_column = new_value
    WHERE primary_key = some_key_value
       AND <<other conditions as well>>and look at an update statement that LogMiner builds from the redo logs in the absence of supplemental logging, it would basically be something like
    UPDATE some_table
      SET some_column = new_value
    WHERE rowid = rowid_of_the_row_you_updatedOracle doesn't need to replay the exact SQL statement you issued, (and thus it doesn't have to write the SQL statement to the redo log, it doesn't have to worry if the UPDATE takes a long time to run (otherwise, it would take as long to apply an archived log as it did to generate the log, which would be disasterous in a recovery situation), etc). It just needs to reconstruct the SQL statement from the information in redo, which is just the ROWID and the column(s) that changed.
    If you try to run this statement on a different database (via Streams, for example) the ROWIDs on the destination database are likely totally different (since a ROWID is just a physical address of a row on disk). So adding supplemental logging tells Oracle to log the primary key column to redo and allows LogMiner/ Streams/ etc. to reconstruct the statement using the primary key values for the changed rows, which would be the same on both the source and destination databases.
    Justin

  • RMAN x Online redo logs - doubt

    When using RMAN's online hot backup, RMAN does not back up the online redo logs, does it?
    Is there a way to do that?

    The online redo logs files are never backed up by RMAN or any hot backup method.
    The online redo logs files contain the latest data or redo generated by the database.(The data comes from redo log buffer written by LGWR).
    The contents of the current redo logs are not archived until a log switch occurs.
    This means if all your members in a redo log group fails, you would lose the latest information. So its best practice to invoke log switch before starting archivelog backup.

  • BRARCHIVE backup for high volume offline redo log files on Standby Database

    Hi All,
    We are through with all of Standby database activity, also started applying the offline redo log files on the Standby site.
    The throughput is not utilizing the actual available bandwith.
    So we are not able to copy the offline redo files on time, as the offline redo files are piling up on the Production side.
    My query is how we can parallely copy the offline redo log files on the DR site (ie. 4-5 redo files at a time).
    Kindly guide for the same.
    Regards,
    Shaibaz

    hi,
    I have one doubt.
    On other server (r3qas) the Umask settings are as followed
    User     UMASK value
    <sid>adm          077              
    ora<SID>           077
    root                   077
    Running SAP System :   SAP R3 4.6C
    Running DBMS          :  Oracle 9.0
    Operating System      :- HP_UX
    On this system The new offline redo log files are created with 600 permissions. There is not a problem here, while taking the backup. I checked last "r3qas-archive" backups. There, i have not found any single error related to permissions, or any others (something like, Cannot open /oracle/RQ1/../.........dbf).
    If everything is working fine, with this umask setting on this server, then, what's going wrong with the BW Quality server, which have the same umask settings (also others) for all the concerned users, as mentioned above.
    Regards,
    Bhavik Shroff

  • The file structure online redo log, archived redo log and standby redo log

    I have read some Oracle documentation for file structure and settings in Data Guard environment. But I still have some doubts. What is the best file structure or settings in Oracle 10.2.0.4 on UNIX for a data guard environment with 4 primary databases and 4 physical standby databases. Based on Oracle documents, there are 3 redo logs. They are: online redo logs, archived redo logs and standby redo logs. The basic settings are:
    1. Online redo logs --- This redo log must be on Primary database and logical standby database. But it is not necessary to be on physical standby database because physical standby is not open. It doesn't generate redo log. However, if don't set up online redo log on physical standby, when primary failover and switch standby as primary. How can standby perform without online redo logs? In my standby databases, online redo logs have been set up.
    2. Archived redo logs --- It is obviously that primary database, logical and physical standby database all need to have this log file being set up. Primary use it to archive log files and ship to standby. Standby use it to receive data from archived log and apply to database.
    3. Standby redo logs --- In the document, it says A standby redo log is similar to an online redo log, except that a standby redo log is used to store redo data received from another database. A standby redo log is required if you want to implement: The maximum protection and maximum availability levels of data protection and Real-time apply as well as Cascaded destinations. So it seems that this standby redo log only should be set up on standby database, not on primary database. Am my understanding correct? Because I review current redo log settings on my environment, I have found that Standby redo log directory and files have been set up on both primary and standby databases. I would like to get more information and education from experts. What is the best setting or structure on primary and standby database?

    FZheng:
    Thanks for your input. It is clear that we need 3 type of redo logs on both databases. You answer my question.
    But I have another one. In oracle ducument, it says If you have configured a standby redo log on one or more standby databases in the configuration, ensure the size of the current standby redo log file on each standby database exactly matches the size of the current online redo log file on the primary database. It says: At log switch time, if there are no available standby redo log files that match the size of the new current online redo log file on the primary database. The primary database will shut down
    My current one data gurard envirnment setting is: On primary DB, online redo log group size is 512M and standby redo log group size is 500M. On the standby DB, online redo log group size is 500M and standby redo log group size is 750M.
    This was setup by someone I don't know. Is this setting OK? or I should change Standby Redo Log on standby DB to 512M to exactly meatch with redo log size on primary?
    Edited by: 853153 on Jun 22, 2011 9:42 AM

  • Why Redo log files not backup

    Hi everyone,
    I have a scenario where the my DB is running in archivelog mode and users are making changes to DB as usual, and all of a sudden my db crashes due to some power outage or failed disks or something bad..
    Now my DB is inconsistent i can't access my DB due to a failed disk. I need to perform a complete recovery of the database as the database is in archivelog mode I can restore from a previous backup and apply the redo from the archived logfiles. Here comes my doubt what about the current online redologfile that has not been archived and which contain info about the commited transaction. how to recover the db upto the point of failure. help need in this situation..
    Edited by: user8710159 on Feb 14, 2010 1:18 PM

    user8710159 wrote:
    Hi everyone,
    I have a scenario where the my DB is running in archivelog mode and users are making changes to DB as usual, and all of a sudden my db crashes due to some power outage or failed disks or something bad..
    Now my DB is inconsistent i can't access my DB due to a failed disk. I need to perform a complete recovery of the database as the database is in archivelog mode I can restore from a previous backup and apply the redo from the archived logfiles. Here comes my doubt what about the current online redologfile that has not been archived and which contain info about the commited transaction. how to recover the db upto the point of failure. help need in this situation..
    Edited by: user8710159 on Feb 14, 2010 1:18 PMIf you still had a viable copy of the online redo and current control file, the recover would apply them as well. Without them, you'll have to do an incomplete recovery and reset logs.
    Which is why you always want to multiplex your control file and online redo - and have the multiplexed copies as physically separate as possible. Those multiplexed copies are your backup for the online redo logs that have not yet been archived.
    Edited by: EdStevens on Feb 14, 2010 5:07 PM

  • Multiplexing redo log files

    I am using 9i R2 database.
    I just want to clear some doubts.
    I am having 3 redo log groups with one member each.
    Now for mutiplexing redo log files
    i want to add one one member to each group so
    that each group will have 2 members in some different path.
    my current path of log member are
    /oracle/files/a1.log (group 1)
    /oracle/files/b1.log (group 2)
    /oracle/files/c1.log (group 3)
    I want to add
    /oracle/sysfiles/a2.log (group 1)
    /oracle/sysfiles/b2.log (group 2)
    /oracle/sysfiles/c2.log (group 3)
    A--So is there any need to take database in any mode (nomunt,mount) or i can do it while
    database is open ?
    I will issue
    ALTER DATABASE ADD LOGFILE MEMBER /oracle/sysfiles/a2.log TO GROUP 1 ;
    First in inactive group,then
    alter system switch logfile; (To make 2 group inactive....and then 3)
    B-- All memebers in a redolog group must be of same size? if i am having
    100 M.B. of one member(a1.log) is there no need to specify size while adding new member(a2.log)?
    Can some one validate and correct my steps or suggest me regarding this?

    Hi,
    All the solutions are in oracle documentaiton.
    See, Members of the same multiplexed redo log group must be the same size (that all member in with in the group ) and Members of different groups can have different sizes. If the same of Files are different resultant would be the with Checkpoints. Since you can not gurantee that Checkpoints will occur at regular internals (Log switch with respect log members). Better to follow the Rules of traffic similarly follow the instrcutions of ORACLE Documentation.. :-)
    - Pavan Kumar N

  • Filled redo log files are available to LGWR for reuse

    Hi,
    Oracle version:
    Oracle Database 10g Release 10.2.0.4.0 -
    OS:Windows XP
    In oracle documentation it is mentioned that:
    Filled redo log files are available to LGWR for reuse depending on whether archiving is enabled.
    *> If archiving is disabled (the database is in NOARCHIVELOG mode), a filled redo log file is available after the changes recorded in it have been written to the datafiles*.
    Link for Documentation is:
    http://docs.oracle.com/cd/B28359_01/server.111/b28310/onlineredo001.htm
    My doubt is:
    Redo Records are written to datafiles also??

    user12141893 wrote:
    Does it mean:
    Suppose:
    Online redo log files contains some redo entries and database buffer cache contains some data and this data belong to redo entries of redo log files.
    Now this redo log file can't be reused until those (related) blocks of database buffer cache are written into datafiles.
    This is sort of correct. If the log file would be filled up , LGWR would switch over to the next log group and would initiate a Log Switch which would further trigger DBWR to start checkpointing the content protected by this log group to the data file. By the time this operation would be going on, the Log group's members would have the status of Active and once it would be complete, the status would be marked to Inactive which means that this log group and its members can be reused by LGWR.
    HTH
    Aman....

  • Current redo log file is lost

    Hi All,
    I got a scenario in which my current redo log file is lost:
    Do I need to:
    1)Clear log file group
    (or)
    2)I should perform incomplete recovery.
    What are the steps I should follow to recover this current redo log file?
    1)*If it is inactive* I can make use of
    ALTER DATABASE CLEAR LOGFILE UNARCHIVED GROUP 2;
    which will drop and recreate the log file.To recover from loss of an active online log group in NOARCHIVELOG mode:
    If the media failure is temporary, then correct the problem so that the database can reuse the group when required.
    Restore the database from a consistent, whole database backup (datafiles and control files) as described in "Restoring Datafiles Before Performing Incomplete Recovery". For example, enter:
    % cp /disk2/backup/*.dbf $ORACLE_HOME/oradata/trgt/
    Mount the database:
    STARTUP MOUNT
    Because online redo logs are not backed up, you cannot restore them with the datafiles and control files. In order to allow the database to reset the online redo logs, you must first mimic incomplete recovery:
    RECOVER DATABASE UNTIL CANCEL
    CANCEL
    Open the database using the RESETLOGS option:
    ALTER DATABASE OPEN RESETLOGS;
    Shut down the database consistently. For example, enter:
    SHUTDOWN IMMEDIATE
    Make a whole database backup.
    To recover from loss of an active online redo log group in ARCHIVELOG mode:
    If the media failure is temporary, then correct the problem so that the database can reuse the group when required. If the media failure is not temporary, then use the following procedure.
    Begin incomplete media recovery, recovering up through the log before the damaged log.
    Ensure that the current name of the lost redo log can be used for a newly created file. If not, then rename the members of the damaged online redo log group to a new location. For example, enter:
    ALTER DATABASE RENAME FILE "?/oradata/trgt/redo01.log" TO "/tmp/redo01.log";
    ALTER DATABASE RENAME FILE "?/oradata/trgt/redo01.log" TO "/tmp/redo02.log";
    Open the database using the RESETLOGS option:
    ALTER DATABASE OPEN RESETLOGS;
    My question is when the redo log file is current. What steps we should follow?
    Best regards,
    Rafi.
    http://rafioracledba.blogspot.com/
    2)If it is active then I can make use of below steps:

    Rafi (Oracle DBA) wrote:
    Hi Asif,
    This link I have seen by refering to previous post.I just have a slight doubt in mind.
    1)Do I need to make use of statement:
    Alter database clear unarchived log file group#;
    (or)
    Only if your group is current(or you are not able to drop it) and is not archived then you should use above query.
    We should perform incomplete recovery for this.If we have to perform incomplete recovery what are the steps I should follow?
    I doubt you should be performing incomplete recovery for this.
    Eg:Let us say my group 1 is dropped it has only one member and it is in active state.How to recover database?Can I get the steps?
    You would not be able to drop it if it is in active state, did you meant it is corrupted? If yes then you can use below query
    Alter database clear [unarchived] LOGFILE GROUP #;>
    Best regards,
    Rafi
    http://rafioracledba.blogspot.com/
    Make sure to backup your database after above activity.
    Regards
    Anurag

  • Clearing Online redo logs on the target physical standby

    Hi,
    Version 11202.
    Primary on machine A
    Standby on machine B
    Following note: 11.2 Data Guard Physical Standby Switchover Best Practices using SQL*Plus [ID 1304939.1].
    Online redo logs on the target physical standby need to be cleared before that standby database can become a primary database. And later :
    On the target physical standby run the following query to determine if the online redo logs have not been cleared... 1) I did not understand where i should run the query. On machine A or on machine B ?
    2)
             Online redo logs on the target physical standby need to be CLEARED
            What does it mean that it need to be CLEARED ? Does transaction might be lost by running the clearing command?
    Thanks

    I have used my note many times in production.
    For example they needed to do some power work on the main server room a few months back on the weekend.
    We did switchovers until the work was complete and then a switch back.
    I wrote a short document called "Switchover post-mortem lessons" the main point from that was :
    1.
    getting ORA-01017 issues in Oracle forms (  Application ) after the switchover to standby.
    The issue was caused by the Standby database having a different parameter for passwords than the Primary database.
    This did not show up in testing because all the tester we used had converted passwords from Oracle 10.
    Solution
    When in doubt issue this on the new Primary :
    SQL>ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE;
    Note: This command can be issued repeatedly with no negative effect on the system.2.
    The query to check switch_over status was returning "LOG SWITCH GAP"
    select switchover_status from v$database;
    This is an issue because Oracle says the return values should be one of these :
    NOT ALLOWED
    SESSIONS ACTIVE
    SWITCHOVER PENDING
    SWITCHOVER LATENT
    TO PRIMARY
    TO STANDBY
    RECOVERY NEEDED
    LOG SWITCH GAP is not one of the expected value. In addition this phase is not search friendly either on the Oracle support site or your favorite search engine.
    Given this I ran this query :
    SELECT 
      NAME AS STANDBY,
      SEQUENCE#,
      APPLIED,
      COMPLETION_TIME
    FROM
      V$ARCHIVED_LOG;
    Solution
    SQL>ALTER SYSTEM SWITCH LOGFILE;
    And wait a few minutesMy switchover document had no issue.
    Best Regards
    mseberg

  • Regarding Online Redo log backup

    Dear all,
    I am running "Whole database online + Redo log backup" in production server which running successfully with return code 0000.
    Is this  backup takes online redo log file also?????? because in backup log i didn't  see any directory like .../../orilog A, .../../orilog B etc which contains online redo log file.
    Without this online redo log backup i don't thing we can do point to point recovery.
    I am beginner for oracle so please clear this doubt.
    thanks,
    Tarun

    Tarun verma wrote:
    > Oraarch having offline redo log file and saparch having redo log backup log file, but both of this related to offline redo log backup.
    >
    > I want to know about online redolog backup??? Is it possible to take or not??? and how we can check online redo log backup is running or not??
    You have offline redo log files in 'oraarch' --> this means that 'online redo logs' are getting backed up into 'oraarch'.
    sql > archive log list
    http://www.adp-gmbh.ch/ora/sqlplus/archive_log.html
    Above command tells whether the logging is ON or not. If it is ON, then online logs will be generated w.r.t. every sap work and as soon as the online logs gets filled up - it gets backed up into 'oraarch' - to accommodate more logging with time.
    Thanks

  • Redo log backup

    Hi,
    I´ve the next doubt about the archive logs of oracle.
    The task of db13 redo log backup makes the backup of the archive logs and after the backup erase the archive logs of the directory?
    More thanks

    Ruben Torres wrote:
    > Thanks,
    >
    > If I edit the initsid.sap, i´ve to restart the oracle database to take effect?
    Surely NOT !
    initSID.sap is a SAP configuration file, which gets no inspection from Oracle at all.
    As far as DB13 is concerned, leave the tape volume field empty, that's it.
    Volker

  • Checksum error in redo log block

    I received ORA-00368 in my database and to resolve it I tried following steps:-
    1) recover database until cancel;
    2) alter database open resetlogs;
    ERROR at line 1:
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/u01/oracle/data/system01.dbf'
    3) recover database;
    ORA-00283: recovery session canceled due to errors
    ORA-00368: checksum error in redo log block
    ORA-00353: log corruption near block 12018 change 5983381348672 time 05/18/2010
    16:08:24
    ORA-00312: online log 10 thread 1: '/u02/oracle/data/log10b.dbf'
    ORA-00312: online log 10 thread 1: '/u01/oracle/data/log10a.dbf'
    There are 4 log groups with 2 members each and the database is in archive mode. Log group# 10 is current and all others are inactive.
    Could you please let me know how should I proceed further either with or without losing transaction in group# 10 redo log?
    Thanks
    Rajkum

    How can I drop the CURRENT log group# 10 and start the database with remaining 3 log groups? Database is in archive mode.Short answer: You cant. It is the CURRENT redo log... most probably your database wasnt shut down cleanly hence requiring a recovery. This recovery cannot be done because you have a corruption in your redo log needed to roll-forward the changes.
    Without a valid backup and a restore/recovery until time there is no chance of opening the database without the help of Oracle. I strongly suggest you open a SR and prepare your management for some costs because you are running a unsupported database version on a unsupported (at least today) operating system. I also doubt you have a valid support contract for a 9i database...
    Ronny Egner
    My Blog: http://blog.ronnyegner-consulting.de

  • Recover from missing files(redo log file/control file) and state of the DB

    Hello,
    i hv go through the doc. as well. But have some doubts what will happen in each on these situations.
    Pls help me to clarify these!
    Scenario is like this;
    hv 3 redo log files - multiplxed
    hv 3 control files - multiplxed
    - What will happen if 1 redo log file missing when starting the DB?
    - What will happen if 1 redo log file missing when using(performing operations) the DB?
    (will it recover automatically/db abort/even redo log lost will the DB run as usual... ?)
    -How to recover this lost redo log?
    - What will happen if 1 control file missing when starting the DB?
    - What will happen if 1 control file missing when using(performing operations) the DB?
    (will it recover automatically/db abort/even control file lost will the DB run as usual... ?)
    -How to recover this lost redo log?
    thanks

    - What will happen if 1 redo log file missing when starting the DB?IF you have multiplexed the members you can drop the lost file and will be able to open the DB
    What will happen if 1 redo log file missing when using(performing operations) the DB?Again if multiplexed it will drop a warinign in the alert log and contnue to write on othere members
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/recoscen.htm#sthref1385
    - What will happen if 1 control file missing when starting the DB?Just remove the entry from the init.ora and start the DB
    What will happen if 1 control file missing when using(performing operations) the DB?Will shutdown

  • Configure archiver to read from both redo log members

    Hi, We have moved our Data Warehouse to a new SAN. The luns for the redo logs are getting hit heavily. Just trying to find out if on AIX it is possible to configure archiver so that it reads from both members, current iostat data shows reads of the redo logs are only happening against the first member of each group and none against the second member. Thanks Tom Cullen

    See a recent discussion on this issue :
    Redo log Doubt
    Hemant K Chitale

Maybe you are looking for