RMAN Diagnostics
CROSSCHECK
Use CROSSCHECK to identify mismatches between what backup files RMAN believes to be available and backup files that are actually available. This is useful, for example, if a backup file has been removed using OS tools rather than RMAN DELETE.
rman target /
crosscheck backup;
allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=245 device type=DISKcrosschecked backup piece: found to be 'AVAILABLE'backup piece handle=/fra/ORCL1/autobackup/2021_10_13/o1_mf_s_1085848020_jpfyp4cb_.bkp RECID=17609 STAMP=1085848020crosschecked backup piece: found to be 'AVAILABLE'backup piece handle=/fra/ORCL1/autobackup/2022_06_27/o1_mf_s_1108461063_kclvvqb0_.bkp RECID=18638 STAMP=1108461063crosschecked backup piece: found to be 'AVAILABLE'backup piece handle=/fra/ORCL1/autobackup/2022_07_06/o1_mf_s_1109333753_kdbvq9ky_.bkp RECID=18675 STAMP=1109333753crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u02/out/ORCL1/Databasefr1509o7_1_1 RECID=18824 STAMP=1112549127crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u02/out/ORCL1/Databasefs1509rh_1_1 RECID=18825 STAMP=1112549233crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u02/out/ORCL1/Databaseft150esv_1_1 RECID=18826 STAMP=1112554399crosschecked backup piece: found to be 'AVAILABLE'backup piece handle=/fra/ORCL1/autobackup/2022_08_12/o1_mf_s_1112554400_khf4wjpj_.bkp RECID=18827 STAMP=1112554400Crosschecked 7 objectsdelete expired backup;
using channel ORA_DISK_1List of Backup PiecesBP Key BS Key Pc# Cp# Status Device Type Piece Name------- ------- --- --- ----------- ----------- ----------18824 18824 1 1 EXPIRED DISK /u02/out/ORCL1/Databasefr1509o7_1_118825 18825 1 1 EXPIRED DISK /u02/out/ORCL1/Databasefs1509rh_1_118826 18826 1 1 EXPIRED DISK /u02/out/ORCL1/Databaseft150esv_1_1
Do you really want to delete the above objects (enter YES or NO)? yesdeleted backup piecebackup piece handle=/u02/out/forstandby/Databasefr1509o7_1_1 RECID=18824 STAMP=1112549127deleted backup piecebackup piece handle=/u02/out/forstandby/Databasefs1509rh_1_1 RECID=18825 STAMP=1112549233deleted backup piecebackup piece handle=/u02/out/forstandby/Databaseft150esv_1_1 RECID=18826 STAMP=1112554399Deleted 3 EXPIRED objects
Crosscheck Disk and Tape...
rman target /
RUN {
ALLOCATE CHANNEL t1 TYPE 'SBT_TAPE' PARMS 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
ALLOCATE CHANNEL d1 TYPE disk;
CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK BACKUP DEVICE TYPE 'SBT_TAPE';
RELEASE CHANNEL d1;
RELEASE CHANNEL t1;
}
Crosscheck Disk only...
rman target /
RUN {
ALLOCATE CHANNEL d1 TYPE disk;
CROSSCHECK BACKUP DEVICE TYPE DISK;
RELEASE CHANNEL d1;
}
CATALOG
If there are files on disk that RMAN is not aware of
(e.g. perhaps you deleted files due to a full FRA, ran a CROSSCHECK so Oracle is aware the files are missing, but then you need the files for a recovery operation)rman target /
catalog start with '/fra/ORCL1/archivelog/2024_10_09';
RMAN Progress
RMAN Wait Information
RMAN Session Information
RMAN Backup History
Debug & Trace
rman target / debug trace=/tmp/rman.trc
Known Errors
RMAN-04006 with ORA-01017
RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password; logon denied
This generally seems to occur when trying to connect to an auxiliary database.
It seems to be related to the content of the password file.
The issue may be related to a difference in case of the ORACLE_SID between the tnsnames.ora alias and the orapw${ORACLE_SID} file.
Could the password in the orapw${ORACLE_SID} file really have the wrong password?
If all else fails put in the full connect string (i.e. bypass the tnsnames.ora)... e.g...
connect auxiliary sys/MySecurePassword@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myHost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=myService)(UR=A)))
NOTE: UR=A stands for "User restricted = accepted". You should not use it in normal operations but it can be useful if the instance is in restricted mode and you have a user with the restricted session privilege.RMAN-06820 with ORA-17630
RMAN-06820: WARNING: failed to archive current log at primary database
ORACLE error from target database:
ORA-17629: Cannot connect to the remote database server
ORA-17630: Mismatch in the remote file protocol version client 2 server 3
Check that the Oracle patch levels match for Primary and Standby...
opatch lspatches
Bibliography
https://docs.oracle.com/cd/E18283_01/server.112/e17110/dynviews_1061.htm (V$BACKUP_SET)
https://community.oracle.com/mosc/discussion/3986057/ur-a-parameter-in-tnsnames-orahttps://oraclespin.com/2010/11/28/how-to-turn-on-debugtrace-when-running-rman/https://ocptechnology.com/how-to-check-rman-backup-status-and-timings/https://alphaoragroup.com/2021/06/19/rman-04006-error-from-auxiliary-database-ora-01017-invalid-username-password-logon-denied/