Home > Ask the Oracle Database / Applications Experts > Oracle database backup and recovery Questions & Answers > Questions about the redo logs from the Oracle 9i concepts manual
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Questions about the redo logs from the Oracle 9i concepts manual

Brian Peasland1 EXPERT RESPONSE FROM: Brian Peasland1

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 13 December 2004

In the Oracle 9i concepts manual, it says,

"Sometimes, if more buffer space is needed, LGWR writes redo log entries before a transaction is committed. These entries become permanent only if the transaction is later committed."

Why does Oracle even have to write uncommitted transactions in redo logs? Can I assume it is for a huge transaction which, say, updates/inserts something like a 50,000 rows? In this case Oracle cannot have all the entries in the memory and so it writes into the redo log files along with the data files. Am I right in making this assumption? How do those entries become 'not permanent' if the transaction is not committed? Rollback?

Regarding group commits, the manual also says,

"In times of high activity, LGWR can write to the online redo log file using group commits. If requests to commit continue at a high rate, then every write (by LGWR) from the redo log buffer can contain multiple commit records."

Don't we lose the distinction between different SCNs when we do group commits? How do we perform a recovery to a particular SCN with group commit or do we have forego that luxury?


>

You are correct in your assumption. The Log Buffer space (determined by the LOG_BUFFER parameter) in your instance's SGA is a finite size. Typically, this SGA memory component is not large compared to other memory structures in the SGA. If a transaction is sufficiently large, then there is no way the Log Buffer can accomodate all of the redo information. When this happens, data must be written to the online redo logs before the transaction is committed. If LGWR was not allowed to write to the online redo logs until a transaction is committed, then your transactions would have a finite size to them (in terms of redo bytes).

Your assumption focuses on the effects of one large transaction on the Log Buffer and LGWR. Now focus on many transactions. What if many, small transactions fill the Log Buffer? LGWR has no choice but to write the transactions, even though they are uncommitted, to the online redo log files.

The statement from the Oracle documentation is somewhat misleading. When I read that statement, I get the sense that transactions that are rolled back are not written to the online redo logs. This is not true. All transactions, committed or rolled back, are written to the online redo logs. At the end of each transaction is a marker to indicate if the transaction was committed or rolled back. So to make a transaction "not permanent", a rollback marker is written to the online redo logs.

When LGWR gets the signal to write to the online redo logs, it will typically write many transactions at once. Each transaction has its own SCN. While group commits may occur at what seems like the same time, they are not the same time. The SCN of each individual transaction denotes the relative time the individual transaction committed.

Your final question on restoring to a particular SCN is not a valid thought because each individual transaction has their own SCN, regardless of whether or not it participated in a group commit or not.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Redo logs
What happens to redo files in a crash?
Getting back to a particular day's state after committing something incorrectly
Updating a remote database using redo logs
Questions about redo logs
How is recovery possible in a roll forward phase when the database instance fails?
Purpose of roll forward and roll backward
Do I need to back up the online redo log?
Avoiding hot backup for online redo logs
Hot backup using export utility
Point-in-time recovery

Oracle database backup and recovery
Can I perform an Oracle server backup through a client machine?
How to execute DML in an Oracle trigger with EXECUTE IMMEDIATE
How to restore a dump file with the Oracle SHOW=Y option
Why do I get an Oracle not available error with Oracle 8i on Windows?
How to perform Oracle database recovery with a corrupt online redo log
Can I create an Oracle Catalog Database with the Enterprise Console?
Do I need to recreate views after an Oracle table reorg?
Client-based apps vs. web-based apps in Developer 2000
How to perform an Oracle 8i to 10g migration
Can I move the tablespace online with missing datafiles in Oracle?

Oracle database backup and recovery
Can I perform an Oracle server backup through a client machine?
How to execute DML in an Oracle trigger with EXECUTE IMMEDIATE
How to restore a dump file with the Oracle SHOW=Y option
Why do I get an Oracle not available error with Oracle 8i on Windows?
Oracle tutorial library: SearchOracle.com's learning guides
How to perform Oracle database recovery with a corrupt online redo log
Can I create an Oracle Catalog Database with the Enterprise Console?
Do I need to recreate views after an Oracle table reorg?
Client-based apps vs. web-based apps in Developer 2000
How to perform an Oracle 8i to 10g migration
Oracle database backup and recovery Research

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts