Lesson 8
Backup Recovery Strategy Conclusion
In this module you learned about the formulation of a solid backup and recovery strategy.
There are many considerations that go into your backup and recovery plan. Many of these concerns are out of your control, yet
they dictate the options and operating parameters that you must live by. Now that you have completed this module, you should be comfortable with the following:
- DBA responsibilities
- Business considerations
- Operational considerations
- Technical considerations
- The components of a disaster recovery plan
- Importance of testing a backup and recovery strategy
How does Oracle keep track of Database Transactions?
Oracle keeps track of database transactions using a mechanism called the System Global Area (SGA), which is a shared memory area that is used to store database information and structures. Within the SGA, Oracle uses a component called the Database Buffer Cache to hold data blocks that have been modified by transactions. When a transaction modifies a data block, Oracle copies the original block to the buffer cache, where it is modified in memory. Once the transaction has been committed, the modified block is written back to disk, where it replaces the original block.
Oracle also uses a component called the Redo Log Buffer to record changes made by transactions. The redo log buffer is a circular buffer in memory that records changes to the database in real-time. When a transaction is committed, the redo log buffer is flushed to the redo log file on disk, which provides a record of all changes made to the database.
In addition to the redo log buffer, Oracle uses a component called the Undo Tablespace to track changes made by transactions. The Undo Tablespace is used to store the before-images of modified data blocks, which can be used to undo changes made by transactions if needed. When a transaction modifies a data block, Oracle copies the original block to the Undo Tablespace before modifying it in memory.
Finally, Oracle uses a component called the Transaction Control System to manage transactions. The Transaction Control System is responsible for ensuring that transactions are executed in a consistent manner and that changes made by transactions are either committed or rolled back.
Overall, Oracle uses a combination of memory structures and disk-based files to track database transactions. The SGA provides a shared memory area for storing database information and structures, while the redo log buffer, the Undo Tablespace, and the Transaction Control System provide mechanisms for recording and managing transactions. This approach helps ensure that transactions are executed in a consistent and reliable manner, and that changes made to the database are recorded and can be recovered if needed.
How Oracle Keeps Records of Database Transactions
To understand the basics of backup and recovery, you need to understand how Oracle records are transformed into a database.
Every time a change is made, Oracle generates a record of both
- the changed and
- the original value
in the redo log buffer in memory.
This record is called a redo record and records both committed and uncommitted changes in redo log buffers.
Oracle frequently writes the redo log buffers to the on-disk online redo log. The online redo log contains at least two online redo log files. Oracle writes to these logs in a circular fashion: first it writes to one log file, then switches to the next available file when the current log is full, then back to the other file, and so forth.
Depending on whether Oracle runs in ARCHIVELOG or NOARCHIVELOG mode, the system begins archiving the redo information in the non-current online redo log file by copying the file to specified locations on disk. The online and archived redo logs are crucial for recovery because they contain records of all changes to the database.
As an Oracle DBA you will be faced with various backup methods and will need to determine what kind of backup is appropriate for your site.
The next module examines memory, processes, files, and some of the various structures and components of the Oracle database.
Backup Recovery Considerations - Quiz