I am studying for my second test in Data Administration and I have a question. I am reading about redo log files and Archiving. Why do you have both. It seems to me that they are the same except for the fact that the archive files don't get over written. When the redo log file is written to the online files and a checkpoint is called it seems to me that the changes are in the datafiles and if the database crashes the info is already in the datafiles. Why do you need the archive logs??
The redo logs are required because the information for the data files is not written out at the same time the redo log information is written. The information is written to the datafiles after it is written to the redo log files. If the system crashes, after the redo log information is written, but before the information can be written to the datafiles, the database needs the redo logs to recover the database.
On the other hand, if you want to recover back to a prior point in time because a user has accidently dropped a table or deleted data and committed it, you will want to restore the database back to the point in time before the drop or delete was done. In this case the existing datafiles do not have the required information because the data has been removed from them. However, the archived redo logs will have information that will allow the DBA to recover the database back to the time before the data was removed. The DBA can recover the database by restoring all the datafiles and applying the archived redo logs to the point in time before the information was removed.