Creating Backup Sets   «Prev  Next»

Lesson 7Archive log backup set
Objective Identify archive log backup sets.

Archive log Backup Sets

Oracle 19c still supports and actively uses Archive Log Backup Sets, just as Oracle 8 did.
What Are "Archive Log Backup Sets"?
  • Archive log backup sets are created when Oracle's Recovery Manager (RMAN) backs up archived redo log files.
  • A backup set is an RMAN-specific format that combines one or more archived redo logs into a single, compressed backup file.

Oracle 8 and Archive Log Backup Sets:
  • Oracle 8 introduced early implementations of RMAN, allowing backup of archived redo logs into backup sets.
  • The process was simpler and less feature-rich compared to later Oracle versions.

Oracle 19c and Archive Log Backup Sets:
  • Oracle 19c fully supports Archive Log Backup Sets and has significantly enhanced their efficiency, reliability, and features.
  • Improvements include better compression, encryption options, and improved integration with incremental backups and Data Recovery Advisor (DRA).

RMAN Example to Create Archive Log Backup Set (Oracle 19c):
Here is a simple example of an archive log backup set creation:
RMAN> BACKUP ARCHIVELOG ALL;

Or, to back up logs generated within a specific timeframe:
RMAN> BACKUP ARCHIVELOG FROM TIME 'SYSDATE-1' UNTIL TIME 'SYSDATE';

Verifying Backup Sets:
RMAN> LIST BACKUP OF ARCHIVELOG ALL;

Benefits in Oracle 19c vs. Oracle 8:
Feature Oracle 8 Oracle 19c
Backup Format Basic Backup Sets Backup Sets with Compression, Encryption
Compression and Encryption Limited or None Advanced compression/encryption options
Backup Speed Moderate Enhanced via parallelism and fast recovery areas
Recovery Features Basic Recovery Features Advanced recovery features, flashback technology, and Data Recovery Advisor

Conclusion: Oracle 19c continues using Archive Log Backup Sets but has significantly advanced capabilities and efficiencies compared to the original implementation in Oracle 8.
Archive logs are the log files that have been filled by your Oracle8 database. You can back up your archive logs whether the database is open or closed.
You can have numerous archive logs. The following table lists syntax options for specifying which archive logs to include in a backup set.
ARCHIVELOG ALL This will copy all currently archived logs to the backup set.
ARCHIVELOG LIKE 'string' The value of the string literal is used for the selection of archive logs. You would usually use this form ofARCHIVELOG syntax with a wildcard and a standard naming convention.
ARCHIVELOG FROM/UNTIL 'time' These two syntax options allow you to specify a start time and an end time for the date on the archive log. If you use only theFROM option, the backup set will include the archive logs from the specified time until the current time. If you use onlythe UNTIL option, the backup set will include the archive logs from the earliest log until the specified time.
ARCHIVELOG FROM/UNTIL scn These two syntax options work the same as the time options above, except that the scn variable is an integer that represents asystem control number.

  • Parallelism and Data Files
    Potentially, you could have quite a few archive log files in your backup set, and you may not even know how many files will be in the set when you start the job. For this scenario, the number of channels you allocate and the filesperset option can have a much more varied impact. The following series of images illustrates this scenario:


Process of Parallel Archive Log Backup in Oracle 19c

In Oracle Database, Parallel Archive Log Backup is a feature that allows you to back up archived redo logs in parallel, improving the performance and efficiency of the backup process. This is particularly useful in environments with a high volume of redo log generation, such as OLTP (Online Transaction Processing) systems.
Here’s an explanation of the process and how it works in Oracle 19c:
What are Archived Redo Logs?
Archived redo logs are copies of the online redo logs that have been filled and are no longer needed for crash recovery. They are essential for:
  • Database recovery (point-in-time recovery or complete recovery).
  • Data Guard configurations for standby databases.
  • Backup and restore operations.

Parallel Archive Log Backup:
Parallel Archive Log Backup allows you to back up multiple archived redo logs simultaneously using multiple channels in RMAN (Recovery Manager). This is achieved by distributing the backup workload across multiple processes, which can significantly reduce the time required to back up a large number of archived redo logs.
Steps to Perform Parallel Archive Log Backup
  1. Configure RMAN Channels:
    • RMAN uses channels to perform backup and restore operations. Each channel corresponds to a server session that performs the work.
    • To enable parallelism, you need to allocate multiple channels. Each channel can process a separate archived redo log file simultaneously.

    Example:

        RUN {
            ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
            ALLOCATE CHANNEL c2 DEVICE TYPE DISK;
            ALLOCATE CHANNEL c3 DEVICE TYPE DISK;
            BACKUP ARCHIVELOG ALL;
        }
        

    In this example, three channels (c1, c2, and c3) are allocated, allowing three archived redo logs to be backed up in parallel.
  2. Backup Archived Redo Logs:
    • Use the BACKUP ARCHIVELOG command to back up the archived redo logs.
    • The ALL keyword backs up all archived redo logs that have not been backed up yet.

    Example:

        BACKUP ARCHIVELOG ALL;
        
  3. Enable Parallelism:
    • Oracle automatically distributes the archived redo logs across the allocated channels to achieve parallelism.
    • The degree of parallelism depends on the number of channels allocated.
  4. Monitor the Backup:
    • You can monitor the progress of the backup using RMAN commands or by querying the V$SESSION_LONGOPS view.

Benefits of Parallel Archive Log Backup
  • Faster Backups: By backing up multiple archived redo logs simultaneously, the overall backup time is reduced.
  • Efficient Resource Utilization: Parallelism allows you to make better use of available system resources (CPU, I/O bandwidth).
  • Scalability: As the volume of archived redo logs increases, parallelism ensures that backups remain efficient.
Considerations
  • Resource Contention: Parallelism can increase resource usage (CPU, I/O), so ensure that your system has sufficient resources to handle the load.
  • Channel Configuration: The number of channels should be carefully configured based on the system's capabilities and the workload.
  • Backup Destination: Ensure that the backup destination (e.g., disk or tape) can handle the increased I/O load from parallel backups.

Example of a Complete RMAN Script
RUN {
    ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
    ALLOCATE CHANNEL c2 DEVICE TYPE DISK;
    ALLOCATE CHANNEL c3 DEVICE TYPE DISK;
    BACKUP ARCHIVELOG ALL DELETE INPUT;
}
  • This script allocates three channels and backs up all archived redo logs in parallel.
  • The DELETE INPUT clause deletes the archived redo logs after they have been successfully backed up, freeing up space in the archive log destination.

Conclusion Parallel Archive Log Backup in Oracle 19c is a powerful feature that enhances the efficiency of backing up archived redo logs. By leveraging multiple channels, you can significantly reduce backup times and improve overall database performance. Proper configuration and monitoring are essential to ensure that the system resources are used optimally during the backup process.
1) For this example, you can assume that there have already been three backup channels.
1) For this example, you can assume that there have already been three backup channels.

2) You create an archive log backup set with a FILESPERSET of 2.
2) You create an archive log backup set with a FILESPERSET of 2.

3) If there are five individual archive logs, you will have two for each of the first two channels and one for the last channel.
3) If there are five individual archive logs, you will have two for each of the first two channels and one for the last channel.

4)  If there are nin individual archive logs, you will have more than one backup set per channel.
4) If there are nin individual archive logs, you will have more than one backup set per channel.


Parallelism Backup Sets - Quiz

Click the Quiz link below to test your knowledge of parallelism and the creation of backup sets.
Parallelism Backup Sets - Quiz
The next lesson is the module wrap-up.

SEMrush Software