What is archiving in Oracle database

What is archiving in Oracle database

Data archiving in Oracle volumes just can’t stop growing and there’s no denying the fact that the regulatory compliance across the globe is getting more complex as we speak.

However, in such scenarios, archiving solutions allow you to manage a significant amount of information effectively and achieve the goals you are looking for with your enterprise data.

However, archiving in Oracle database is a whole different story.

The in-database archiving allows you to archive all the rows within a specific table. You can do the same by just marking them as inactive. Such rows are in the database and could also be optimized using compression and aren’t visible to an application.

Data in these rows is made available for compliance purposes if the same is even needed by setting a simple session parameter.

In-Database Archiving allows you to store a large number of files and data in general for a long time within a single, simple database.

The archived data could also be compressed that allows the improvement of the backup performance along with updated to the archived data that could be deferred during the application upgrades for improving the performance.

Archiving in oracle database

Configuration of any database during its creation is almost every time necessary for the sake of easily recovering your data in case of a system failure.

The redo log files contain the full record of the changelog that was introduced to the primary data files. These log files could be present in the online redo log groups and the most important part is that there should at least be a couple of these log files present for your database.

As an online redo log file is filled, the log writer process the switches to a new group which allows the continuity of the writing process of the redo log files.

Any inactive group of the online redo log files could just be automatically saved by the Oracle database at a single (or multiple) destinations which are collectively addressed as an archived redo log. This process of conversion of log files is called Archiving.

Why Archiving?

Archiving involves the transportation of data that isn’t needed frequently and could be taken off the systems at any time.

It has a lot of advantages, like:

  • Archiving allows you to perform the online tablespace backups. These backups could be used to restore a tablespace in case of a media failure.
  • With the online and archived redo log files, database backups allows you to recover the transactions if an operating system or hardware fails.
  • It is an opportunity for a solution that has been designed for capacity over a primary data storage section that has been designed for performance.
  • In case you have a copy of the archived log files that were made during the backup of the data, you can even recover the database using that very backup that was taken while the database was just open and being used.
  • You can even keep a particular standby database current with the original database by just continuously applying the original archived redo log files.

Unless the group of the online redo log files is archived, it can’t be reused by the log writer.

However, if the log writer switches to a totally new group and leaves the previous one inactive for a while, the inactive group is going to become readily available for immediate reuse by the log writer process. However, this only happens if the database is running in the NOARCHIVELOG mode.

Any kind of a database instance failure usually is avoided in the NOARCHIVELOG mode. However, it doesn’t protect the database from any media failure.

Some of the most recent changes that are made to the database (that is stored in the online redo log files) involve the ones that are available for instant recovery.

Thus, to restore the database archiving in the NOARCHIVELOG mode, the entire database backups could be used that was snatched during the closure. As such, it’s essential to take frequent backups of the entire database as it operates in the NOARCHIVELOG mode to prevent any kind of data loss.