This video lists the two types of Oracle backup files you should know about and how they complement each other to provide the ability to recover the database from failure.
- [Teacher] For the grand finale of our Oracle Database Storage discussion, let's talk about a few other types of database files you should know about. Starting with files that relate to database backups. Database backup files include any backups of your database that you have taken and placed somewhere safe, as well as copies of the redo log files created by the database archiver process. There are a lot of technologies you can use to back up your Oracle database. These are outside the scope of our course, but from a database storage perspective, it is still very important to mention database backup files when talking about database storage.
We can assume that at least once in your career, you will be tasked with restoring an Oracle database from failure. Let's just hope that it's only once. When you take a backup of your Oracle database, the consistent state of the database used for recovery is known as the database backup files. These are usually copies of your database data files, redo logs, and control file. These are the database storage files that are currently used by your database. Without these files included as part of your backup, you won't be able to recover your database to a consistent state.
Archived redo log files are also very important from a database backup perspective. Those are the files createD by the Oracle archiver background process. Because the redo log files contain information about all of the transactions which have been performed in our database, they are instrumental if there is ever a need to recover your database from backup to a specific point in time. That is exactly why copying the redo logs and storing them in a safe and secure backup location is essential, as these archived copies of the redo logs can be used during database recovery.
Let's take a closer look on how you can use Oracle database backup files to restore your database. Assume your database was functioning normally at 2:00 PM. You took a full database backup at 2:00 PM. That backup took two hours to complete. The backup finished at 4:00 PM but contains a consistent backup of your database from 2:00 PM. That's because an Oracle backup will always be consistent to the point in time in which it was taken.
You took another database backup because you are a very diligent Oracle DBA, but this time at 4:00 PM. This backup also took two full hours to complete. So the second backup was ready at 6:00 PM, but contained a consistent image of the database from 4:00 PM. That's when the backup was started. Take it all in. Make sure you are with me up to this point. Assuming it's now 10:00 PM, and your database just crashed, you want to recover it.
You need to recover it. So great news, as a diligent Oracle DBA, you took a backup of your database from 4:00 PM. Let's use that backup to restore our database. This backup might just save the day. Hold on. Wait. Major problem. Your database was restored, but to the state when the full backup was taken, which is 4:00 PM. The database crashed at 10:00 PM. What happened to all of the data that was generated by users and stored in your database between 4:00 PM and 10:00 PM? Should we, I don't know, panic? No, no need to panic.
If you have your archived redo log copies, which remember, contain a copy of your database transactions in a safe and accessible location, we should have most of the changes that were applied to the database between 4:00 PM, the time our last full backup was taken, and 10:00 PM, the current time, the time when the database crashed. So we can use the database change vectors or redo entries stored in those archived redo log files to roll forward our database to the current time.
The database restored from backup can use these archived redo log files to perform something known as roll-forward recovery and redo the lost transactions. Redo. That's why they are called redo logs. The database will use those archived redo logs to apply all of the transactions that have occurred after the full backup was taken and right before the time our database crashed.
After completing this course, you'll have fundamentals required for installation, configuration, and administration of an Oracle 12c database.
- Database instance and storage
- Instance memory pools
- Instance background processes
- Client connections
- Database storage file types
- Control files and backup files
- Multitenant databases
- Starting and stopping the database
- Installing Oracle 12c software
- Using the developer tools
- Database management