Bytes in REDO log
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Bytes in REDO log

  1. #1
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Hi,

    I am running my database in ARCHIVELOG mode, it has 3 logfiles and 2 members in each of 5M.

    I would like to know, Is there any way to find out how much my REDO log file is filled...?

    say.. out of 5M, how much data is written to it in bytes

    Thanks

    Sameer

  2. #2
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    I think I have asked very wrong question.. Nobody is answering.. :-(

    Actually I need to know if there are any entries written to current log or there are no transactions took place after archival of last logswitch.

    Hope am not frustrating

    Sameer

  3. #3
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    3,997
    You should know how much of the redo log was used by looking at the archive log files. If your database is generating 5M archive log files then your logfiles are fully used before a log switch. If you force a log switch you will generate a file that is smaller than 5MB. Look at the Alert log and count the number of log switches in a day. To many or too few log switches can be a problem. IMHO depending on the system a log switch every 20-30 minutes is fine during peak usage. Other people will have different numbers.

  4. #4
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Originally posted by gandolf989
    You should know how much of the redo log was used by looking at the archive log files. If your database is generating 5M archive log files then your logfiles are fully used before a log switch. If you force a log switch you will generate a file that is smaller than 5MB.
    If the logfile gets full then ofcourse a logswitch takes place.

    What I want to do is If there are transactions in redolog but less than 5M, in this situation automatically logswitch will not take place. Unless an untill logswitch, archived logfile will not be shipped to my standby database.

    consider.

    last sequence# is 301 at 10:55 AM and it has automatically shiped to my standby database. My standby database has also applied 301 log.

    at 11:00 AM another transactions took place of 2M, my standby database is updated till 301 and this last transaction is not in my standby database as logswitch hasn't took place.

    I want to see if last switch has taken place in last 30 mins, if not I want to make a logswitch.

    But I don't want to go on switching logs if there are no transactions in current log

    so I would like to know if my current log is empty or not.. If it has transaction less than 5M, and logswitch hasn't taken place for last 30 mins, then I want to perform a logswitch so that my standby DB will get these transactions.

  5. #5
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    No, I don't think you can find out how much space is used in your current redo log file, why would you want to do that ?

    The only way is to force a log switch and check the size of the archived log file.
    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

  6. #6
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    this is a problem with standby database.

    You want both system to be in synch as often as possible, but standby is only in synch up to the last applied logfile. You can lose up to 1 log's worth of data.

    If the data is that important to you consider something like replication.

    You may be able to writes some pl/sql to run every half an hour which checks v$archived_log for completion time.
    If completion_time > 30mins then force a log switch.


    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

  7. #7
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Originally posted by Sureshy
    You may be able to writes some pl/sql to run every half an hour which checks v$archived_log for completion time.
    If completion_time > 30mins then force a log switch.
    TRUE.. I wrote a PL/SQL and made a logswitch for the last data of say 2M which was in current redo and it got transfered to standby database.

    NEXT: afte 30 min, If I make a logswitch it will be empty logfile..

    and this is what I want to avoid... I don't want to switch logs if log is empty.. In this case I will go on just switching logfiles..

    If the data is that important to you consider something like replication
    May be...

    Well, thanks for the replies...

  8. #8
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    what version of the db are you running?

    if you're in 9i ship your arch logs with ......

    AFFIRM
    Ensures that archived redo log contents are written to disk successfully and are available immediately for database recovery. The AFFIRM attribute performs all I/O operations to disk synchronously, while NOAFFIRM performs I/O operations asynchronously.

    SYNCH
    Indicates that network I/O operations for log transport services are to be done synchronously and in parallel or not for all LGWR destinations.

    and you will be step closer to being fault tolerant
    I'm stmontgo and I approve of this message

Posting Permissions

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



Click Here to Expand Forum to Full Width