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 objects

delete expired backup;

using channel ORA_DISK_1
List 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

SESSION_KEY INPUT_TYPE    STATUS     RMAN_BKUP_START_TIM RMAN_BKUP_END_TIME     HOURS----------- ------------- ---------- ------------------- ------------------- --------      27679 DB INCR       COMPLETED  12-24-2022 19:00:08 12-24-2022 19:02:03      .03      27689 DB INCR       COMPLETED  12-25-2022 19:00:08 12-25-2022 19:01:13      .02      27699 DB INCR       COMPLETED  12-26-2022 19:00:08 12-26-2022 19:01:22      .02      27709 DB INCR       COMPLETED  12-27-2022 19:00:07 12-27-2022 19:01:22      .02      27719 DB INCR       COMPLETED  12-28-2022 18:00:06 12-28-2022 18:20:01      .33      27729 DB INCR       COMPLETED  12-29-2022 19:00:44 12-29-2022 19:01:48      .02      27739 DB INCR       COMPLETED  12-30-2022 19:00:08 12-30-2022 19:01:03      .02      27749 DB INCR       COMPLETED  12-31-2022 19:00:08 12-31-2022 19:01:13      .02      27759 DB INCR       COMPLETED  01-01-2023 19:00:07 01-01-2023 19:00:51      .01      27769 DB INCR       COMPLETED  01-02-2023 19:00:07 01-02-2023 19:01:02      .02      27779 DB INCR       COMPLETED  01-03-2023 19:00:07 01-03-2023 19:01:15      .02      27789 DB INCR       COMPLETED  01-04-2023 18:00:08 01-04-2023 18:20:37      .34      27799 DB INCR       COMPLETED  01-05-2023 19:00:42 01-05-2023 19:02:17      .03      27809 DB INCR       COMPLETED  01-06-2023 19:00:07 01-06-2023 19:01:52      .03      27819 DB INCR       COMPLETED  01-07-2023 19:00:08 01-07-2023 19:01:33      .02      27829 DB INCR       COMPLETED  01-08-2023 19:00:07 01-08-2023 19:01:02      .02      27839 DB INCR       COMPLETED  01-09-2023 19:00:06 01-09-2023 19:01:15      .02      27849 DB INCR       COMPLETED  01-10-2023 19:00:07 01-10-2023 19:01:52      .03      27859 DB INCR       COMPLETED  01-11-2023 18:00:06 01-11-2023 18:19:42      .33      27869 DB INCR       COMPLETED  01-12-2023 19:00:50 01-12-2023 19:02:15      .02      27879 DB INCR       COMPLETED  01-13-2023 19:00:07 01-13-2023 19:01:42      .03      27889 DB INCR       COMPLETED  01-14-2023 19:00:08 01-14-2023 19:02:02      .03      27899 DB INCR       COMPLETED  01-15-2023 19:00:07 01-15-2023 19:01:22      .02      27909 DB INCR       COMPLETED  01-16-2023 19:00:07 01-16-2023 19:02:32      .04      27919 DB INCR       COMPLETED  01-17-2023 19:00:07 01-17-2023 19:02:02      .03      27929 DB INCR       COMPLETED  01-18-2023 18:00:07 01-18-2023 18:21:23      .35      27939 DB INCR       COMPLETED  01-19-2023 19:00:43 01-19-2023 19:02:58      .04      27949 DB INCR       COMPLETED  01-20-2023 19:00:08 01-20-2023 19:03:04      .05
backup_typeD = DefaultL = ArchivelogI = Incremental
COMPLETION_ TYPE                 MB        MIN----------- ------------ ---------- ----------2023-JAN-11 ARCHIVELOG           20          02023-JAN-11 LEVEL0            78091         182023-JAN-12 ARCHIVELOG         2665          12023-JAN-12 LEVEL1              603          02023-JAN-13 ARCHIVELOG         3288          12023-JAN-13 LEVEL1              566          02023-JAN-14 ARCHIVELOG         3907          12023-JAN-14 LEVEL1              698          02023-JAN-15 ARCHIVELOG         2539          12023-JAN-15 LEVEL1              654          02023-JAN-16 ARCHIVELOG         6317          22023-JAN-16 LEVEL1              967          02023-JAN-17 ARCHIVELOG         4898          12023-JAN-17 LEVEL1              735          02023-JAN-18 ARCHIVELOG         4387          12023-JAN-18 CONTROLFILE           9          02023-JAN-18 LEVEL0            78091         202023-JAN-19 ARCHIVELOG         5745          22023-JAN-19 CONTROLFILE           9          02023-JAN-19 LEVEL1              819          02023-JAN-20 ARCHIVELOG         7667          22023-JAN-20 CONTROLFILE           9          02023-JAN-20 LEVEL1             1315          02023-JAN-21 CONTROLFILE           8          02023-JAN-21 DEFAULT               8          0

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

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://support.oracle.comRMAN-04006 ORA-01017 when connecting to auxiliary database on Standby From Primary (Doc ID 2445873.1)RMAN Duplicate for Standby Fails with ORA-01017 at Restore Clone from Service (Doc ID 2809728.1)RMAN-4006 ORA-1017 When Instance Shut Down During Active Database Duplication (Doc ID 1998133.1)SRDC - Required Diagnostic Data Collection for RMAN Issues (Doc ID 1671431.1)
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/