Home » RDBMS Server » Server Administration » Help about Log file Oracle (11g)
Help about Log file Oracle [message #621629] Fri, 15 August 2014 02:58 Go to next message
numbood
Messages: 1
Registered: August 2014
Location: Vietnam
Junior Member

Anyone help me:
In Oracle have logfile when i update, delete data.. in to db or not?
if answer is yes so where is it?
Sorry for my poor english level.
Re: Help about Log file Oracle [message #621653 is a reply to message #621629] Fri, 15 August 2014 09:14 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://docs.oracle.com/database/121/CNCPT/physical.htm#CNCPT11304
Re: Help about Log file Oracle [message #621654 is a reply to message #621629] Fri, 15 August 2014 09:16 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
There is an archiver process which collects and writes to disk all transactions as "archive logs".
In order to access these archive logs you would need to use the "Log miner" utility.
The location of these archive logs is set in the LOG_ARCHIVE_DEST_n initialization parameter(s).

Try from SQL*Plus:
 SQL> SHOW PARAMETER LOG_ARCHIVE_DEST 

Smile
Re: Help about Log file Oracle [message #621658 is a reply to message #621654] Fri, 15 August 2014 10:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
There is an archiver process which collects and writes to disk all transactions as "archive logs".


This is completely wrong.
You should read the link you provided.

Quote:
The archiver processes (ARCn) copy online redo log files to offline storage after a redo log switch occurs.


This is the LoG WRiter which does (about) what you say. Actually:

Quote:
The log writer process (LGWR) manages the redo log buffer. LGWR writes one contiguous portion of the buffer to the online redo log.


And the log buffer is

Quote:
Memory structure in the SGA that stores redo entries--a log of changes made to the database.


icon10.gif  Re: Help about Log file Oracle [message #621681 is a reply to message #621658] Fri, 15 August 2014 15:09 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
Yeah, you are right I was wrong ...
Friday dislexia, confusing redo with archive...etc
Embarassed
Re: Help about Log file Oracle [message #621688 is a reply to message #621629] Sat, 16 August 2014 08:07 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
numbood wrote on Fri, 15 August 2014 02:58
Anyone help me:
In Oracle have logfile when i update, delete data.. in to db or not?
if answer is yes so where is it?
Sorry for my poor english level.


I presume you are talking about an equivelent to MSSQL log file.

Of course Oracle has a transaction logging mechanism. Without such a mechanism, it would be impossible to recover a database. Every real database product has that mechanism in some form or another, but they all vary in the details.

Computers fundamental principal: All changes must happen first in memory.
In oracle this means any change to any data (creation of a new row, modifying an existing row, marking a row for deletion) happens in a data buffer, at the level of a data block.

Oracle then writes information about that changed data block to an online redo log (file), along with information to identify the block in space (disk file location) and time (the database sequence in which the change happened).

Online redo logs are pre-allocated and fixed in size. Ideally, they are multiplexed into log file groups. There must be a minimum of two log file groups, with a minimum of one file each.

When the log group is filled, oracle performs a log switch and begins writing the changes to the next log group. Then the next, then the next. When the last log group is filled, it will simply come back to the first and start over-writing the data that was in it, and continue like this, filling each log file group in sequence in round-robin fashion.

To preserve the change data that would be overwritten a database can (and should be, at least for production data) placed in archivelog mode. When configured thus, when a log group is filled and log writing switches to the next group, the another process will start making a copy of the just-filled group to a file known as an archivelog file. This file is uniquely named so there is no overwriting of the archivelogs. The collection of archivelog files present an unbroken chain of all changes to the database and is a key part of any database recovery operation.

I've left out a lot of details, but that should give you enough of an overview to start digging into the details in the docs at docs.oracle.com. Your key reference should be the Concepts Manual.

Re: Help about Log file Oracle [message #621693 is a reply to message #621629] Sat, 16 August 2014 09:49 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
numbood wrote on Fri, 15 August 2014 13:28

In Oracle have logfile when i update, delete data.. in to db or not


It would be good if you provide more information about your requirement.

I would step back and here is my thought, if you have a table for which you need to log the changes done through DML transactions, and assuming the tables are not a part of batch process(too frequent insert/update/delete). You can have user defined audit table to log the details of the DML changes via trigger, else it would slow down the process.

For example, if I have a table employee, and I want to log the changes about the employees. If the employee details are not updated much frequently, I would have an audit table to insert the old records into the audit table depending on the DML transaction.

So, would you please provide more information about your requirement.
Re: Help about Log file Oracle [message #621706 is a reply to message #621693] Sat, 16 August 2014 11:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I think there is no requirement and the question is the one Ed perfectly answered (and others before partially)(translating in rdbms general words): "Is there any transaction log in Oracle?"

Re: Help about Log file Oracle [message #621708 is a reply to message #621706] Sat, 16 August 2014 11:24 Go to previous message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Michel,

I agree, and I don't deny to what has been provided in the thread. I want to know from OP about his requirement in detail. I tried to explain OP about a small requirement regarding logging DML details against a table. If he is content with any of our solutions, then our job is done.
Previous Topic: Long running SELECT that should be erroneous
Next Topic: dba_tables.container_data
Goto Forum:
  


Current Time: Thu Mar 28 15:12:50 CDT 2024