Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open transaction in ARCHIVED_LOG files?

Status
Not open for further replies.

madhes

Programmer
Apr 16, 2001
18
US
Hi,
I just want to confirm whether ONLINE and ARCHIVED log files contain only the completed (COMMITTED) transactions. Or whether they may have open transactions?
For example, assume a given transaction that contains 10 statements (combination of INSERT/UPDATE/DELETE). Now, is this possible logfile-1 contains the first 5 statements and the next logfile contains the next 5 statements?
Thanks in Advance,
Madhes
 
You are actually asking two different questions.

1. Are uncommitted transactions written to the log? Yes. If the transaction is subsequently rolled back there will be no commit written to the log.

2. Can a single transaction be recorded in more than one log file? Yes. A single update statement can potentially update millions of rows. It's very possible that the redo log file is not large enough to hold the entire transaction, so of course Oracle allows a transaction to begin in one redo log and finish in another.
 
I do not agree. IMHO, Madhes asks about the archive logs -archived on a backup medium or still online.
The archive logs are REDO logs. This means, that they contain only successfully committed transactions. The uncommitted transactions reside only in memory or in swap space.

The only file, where uncommitted transactions might occur could be a transaction log created e.g. for security purposes (audit log) - I am not sure.
 
Oops!
I did a small mistake, in my question. I was asking about the completed transactions. (Those may be COMMITTED or ROLLEDBACK). I just want to confirm, whether the all statements belonging to a completed transaction might sit in a single REDO log file.
I believe, as Karluk notified, they may sit in different redo log files, as one update statement can generate a million update statements in the REDO log file.

thanks Karluk and Ija.
-madhes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top