• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

RMAN-06059 During RMAN Backup of archivelogs ( How to backup archivelogs moved to a different location)

by admin

The Problem

Archives were moved from their original archivelog destination to a new location. Experienced the following errors when running RMAN backup of the archivelogs:

RMAN-06059: expected archived log not found

ORA-19625: error identifying file /zklpdata/archive/zkpd/arch_1_44543_466886099.arc
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3

The Solution

RMAN is attempting to backup this archivelog file but is not able to access the physical file on disk, because either the archivelog file is manually moved or deleted at the operating system level, and RMAN metadata is not updated. The steps required depend on if the archivelog file exists based on the name and location returned by the error. Thus the first step is to check for the existence of the archivelog file.

Case 1 – Archiveloags moved to a different location

If the archivelog files have been moved to a different directory, then they can be moved back to their original directory. Otherwise, you can make RMAN aware of their new location using the following RMAN “catalog” command for each archivelog. The catalog command will update the database controlfile with the new location of the archivelogs.

RMAN> catalog archivelog '/temp/archive/zkpd/arch_1_44543_466886099.arc';

Starting in Oracle10g, if several archivelog files are effected, you may issue the RMAN command “catalog start with” as follows:

RMAN> catalog start with '[new_directory_of_archivelogs]';

For example:

RMAN> catalog start with '/temp/archive/zkpd/';

Now backup will find these files in the new location, as well as any new ones in the older location.

Note: Simply using the LIKE option is not enough, RMAN has to have a record of the archives.

Case 2 – Archivelogs are deleted manually

If the archivelogs are no longer physically available, then you can issue the RMAN command “crosscheck copy of archivelog all“.

RMAN> crosscheck copy of archivelog all;

This command checks for the physical existence of the archivelog file and will change the V$ARCHIVED_LOG.STATUS of the affected archivelog from “A” for AVAILABLE to “X” for EXPIRED. Once the archivelog file has a status of X, RMAN will no longer attempt to backup this archivelog file.

SQL> select sequence#,deleted,status from v$archived_log;

Expired logs that are no longer physically available should be removed from the RMAN repository:

RMAN>delete expired archivelog all;
NOTE: If there is no RMAN backup of the missing archivelog file, it is essential to perform a full-database backup. Otherwise, you may not be able to recover the database beyond missing log sequence number.

Conclusion

We recommend that you always use RMAN to delete archived redo log files and backup pieces from the backup media. If you use an OS command to delete files, then RMAN is unaware that the files have been removed from the backup media. When RMAN is unaware that the files are removed, then you will have to run a crosscheck command to update the target database control file and recovery catalog (if using one).

When running the crosscheck archivelog all command, RMAN will change the status of an archived redo log file to EXPIRED if it cannot locate the file. RMAN will not attempt to back up an archived redo log file with an EXPIRED status.

The catalog command is handy because you can use it to update the RMAN repository with information about relocated archived redo log files, RMAN backup pieces, and image copies. Use the catalog start with the command to tell RMAN which directory to look in for your relocated files.

Filed Under: oracle

Some more articles you might also be interested in …

  1. How to Manage Oracle database Audit File Directory Growth with cron (ASM Instances Only)
  2. Create an output file from GGSCI commands
  3. ORA-27125: unable to create shared memory segment; Error: 28: No space left on device
  4. How to startup an Oracle Database Instance using spfile or pfile(init.ora) parameter file
  5. How to check and repair ACFS with FSCK
  6. How to configure Partitioned Block Devices (Non-ASMLIB) And Assign Them To ASM
  7. Oracle Data Guard Command Line Reference (Cheat Sheet)
  8. How To Setup UDEV Rules For RAC OCR And Voting Devices on Partitions
  9. How to reclaim entire space of an oracle database table with “Truncate Table” statement
  10. How to Create or Remove Restore Point on Oracle Standby database

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright