Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2004
    Posts
    86

    Unanswered: Oracle Redo Logs

    Can anybody explain how Oracle handles it's redo log files. When are they truncated. How does this compare with SQL server when performing a backup and truncate of the log file?

  2. #2
    Join Date
    Jan 2004
    Posts
    370
    I'm not sure what you mean by truncating the redo log files.

    You can do an open resetlogs during a point in time recovery which will zero out the remainder of the log files from that point onwards.

    I don't know how it compares with SQL Server when performing a backup and truncate of the log file - you don't truncate Oracle log files.

  3. #3
    Join Date
    Feb 2004
    Posts
    86
    So does Oracle truncate the log after a backup? At what point are transactions removed from the redo log files? SQL server will truncate the log after a backup, but Oracle doesn't seem to have the same functionality. Where can I find more details on how redo log files function in great detail?

  4. #4
    Join Date
    Nov 2002
    Posts
    833
    AFAIK Oracle never truncates the redologs. Except you issue

    alter system switch logfile; then all commitable transactions will we persistently written and you have a good point to do a consistent export of your data ....

    more information can be found tahiti.oracle.com or http://asktom.oracle.com

  5. #5
    Join Date
    Mar 2004
    Posts
    21
    Oracle doesn't handle it's transaction logs in the same way SQL server does. Oracle basically has a rotating set of logs that switch when they are full. You determine the size of your redo logs at the time of database creation (this can be changed later on though) and establish certain log groups. Let's say they are all 5 MB and you have two logs. When log #1 reaches 5 MB, the database switches to writing to log #2. If you are running in ARCHIVELOG mode, then while log #2 is being written to, log #1 is 'archived' into a separate location and log #1 is cleared out so it can be written to when #2 fills up. You can use RMAN or a simple filesystem backup to backup your archived redo logs and then delete them (when using RMAN, it forces a log switch so that everything in the current set of redo logs can be archived and backed up).

    With a basic SQL server configuration (and my experience is somewhat more limited here), it writes to one very large log. That log can then be backed up and once the backup is complete, the log is truncated.

    In essence, they both accomplish the same thing (for both you need the logs to be able to recover the database to a point-in-time), but go about it differently. You can roughly equate the clearing out the Oracle archive log directory after backup to truncating the SQL Server transaction log.

  6. #6
    Join Date
    Oct 2003
    Posts
    17
    Mr.dbatteiger says

    ...size of your redo logs at the time of database creation
    ("this can be changed later on though")
    and establish certain ....


    I am not sure how we can change redo log file size.

    We can rename/copy to someother location...and create a new one with
    a larger file name.

    But..how to we resize an existing redo log file.

    Help Please dbatteiger !!!

  7. #7
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    I don't believe that you can change the size of an existing redo log, you must delete it and add another one with a different size

    Gregg

  8. #8
    Join Date
    Mar 2004
    Posts
    21
    This is not exactly a simple task. The basic steps are as follows (but I would advise you to looking up some notes on MetaLink or oracle doc to make sure you understand all the steps):

    1) This whole thing is probably best done by shutting down and starting up in restricted mode. (not absolutely necessary, but as you will find out, if your logs are switching fast, this can be risky if the DB is available to online users).

    2) Figure out which log group is inactive (select from v$log or the info can be found in OEM under Storage -> redo log groups)

    3) Drop the inactive group (alter database drop logfile group X)

    4) Add a new group with the same name and the new size you want to use (alter database add logfile group X 'file_name' size 50M reuse)

    5) Force a log switch (alter system switch logfile)

    6) Now a different group should be inactive and you can repeat 3 & 4 to resize them.

  9. #9
    Join Date
    Feb 2004
    Posts
    86
    Thanks for the input guys, this is great information.

  10. #10
    Join Date
    Jul 2004
    Posts
    10

    redologs

    Sorry , I suppose don't get confused. Better u go through any backup and recovery manual and learn it on ur own.

Posting Permissions

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