ORA-19693
We saw error ORA-19693 when we tried to restore some archived logs from backup sets in a newly duplicated database.
RMAN> catalog start with 'd:\backup';
...
RMAN> restore archivelog from sequence 937194;
...
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/16/2023 20:35:51
ORA-19693: backup piece D:\BACKUP\0A1USK03_10_1_1 already included
It's pretty strange, we deliberately use the same directory structure as the original server to duplicate the database. It turned out that, we can't use the backup pieces we cataloged.
ORA-19693 means that RMAN sees duplicated backup piece in the catalog and the restoration can process only one instance of the backup piece.
How can it see double backup pieces in the same directory? Is it a case-sensitive problem with directory name? I supposed that we don't have case-sensitive problem on Windows.
Solutions
The solution you choose depends on how many backup pieces should be handled.
One or Few Backup Pieces
If there're only several backup pieces cannot be used in such case, you may re-catalog them one by one.
CHANGE BACKUPPIECE UNCATALOG
Here we remove the specified duplicate backup piece from the catalog.
RMAN> change backuppiece 'd:\backup\0A1USK03_10_1_1' uncatalog;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of uncatalog command at 06/16/2023 21:17:00
RMAN-20260: backup piece not found in the repository
RMAN-06092: error while looking up backup piece
Some warnings can be ignored.
CATALOG BACKUPPIECE
Then catalog it.
RMAN> catalog backuppiece 'd:\backup\0A1USK03_10_1_1';
channel ORA_DISK_1: cataloged backup piece
backup piece handle=D:\BACKUP\0A1USK03_10_1_1 RECID=13 STAMP=1139692625
...
It has been cataloged.
Many Backup Pieces
To deal with a lot of backup pieces, we may move them to a new place.
Move backup pieces to a new place.
Any place other than the original directory is no problem, e.g. d:\backup2.
CROSSCHECK BACKUP
RMAN> crosscheck backup;
DELETE EXPIRED BACKUP
RMAN> delete expired backup;
CATALOG START WITH
RMAN> catalog start with 'd:\backup2';
You can proceed your restoration.
We still have no answer to the questions. Is it a bug specific for 11g on Windows? Or maybe we shouldn't catalog the whole directory in the first place?