I changed my RMAN settings after Tiaan's suggestions, beforehand retention policy was set to default:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
I performed a bk to DSSU
Run RMAN command list backupset
Manually launched a destaging job.
Run a crosscheck allocating device type sbt_tape
Launched again RMAN list backupset, attached are the complete outputs.
If we just look at one bk id before crosscheck:
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
23529 Full 160.75M SBT_TAPE 00:00:10 13-OCT-15
BP Key: 23531 Status: AVAILABLE Compressed: NO Tag: TAG20151013T154909
Handle: cntrl_1766_1_893000950 Media: /exa_zfs//dm01db01-priv1.service.intra_1444744154_C1_F1
Control File Included: Ckp SCN: 236401227140 Ckp time: 13-OCT-15
This is the same bk id after crosscheck:
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
23529 Full 160.75M SBT_TAPE 00:00:10 13-OCT-15
BP Key: 23531 Status: EXPIRED Compressed: NO Tag: TAG20151013T154909
Handle: cntrl_1766_1_893000950 Media: /exa_zfs//dm01db01-priv1.service.intra_1444744154_C1_F1
Control File Included: Ckp SCN: 236401227140 Ckp time: 13-OCT-15
This is bpimagelist of those bk ids:
Client: dm01db01-priv1.service.intra
Backup ID: dm01db01-priv1.service.intra_1444744154
Policy: 2_exadata
Policy Type: Oracle (4)
Proxy Client: (none specified)
Creator: oracle
Name1: (none specified)
Sched Label: week
Schedule Type: UBAK (2)
Retention Level: 1 week (0)
Backup Time: Tue Oct 13 15:49:14 CEST 2015 (1444744154)
Elapsed Time: 6 second(s)
Expiration Time: Tue Oct 20 15:49:14 CEST 2015 (1445348954)
Compressed: yes
Client Encrypted: no
Kilobytes: 6240
Number of Files: 1
Number of Copies: 1
Number of Fragments: 1
Histogram: 0 0 0 0 0 0 0 0 0 0
DB Compressed: no
Files File Name: 2_exadata_1444744154_UBAK.f
Previous Backup Files File Name: (none specified)
Parent Backup Image File Name: (none specified)
SW Version: (none specified)
Options: 0x0
MPX: 1
TIR Info: 0
TIR Expiration: Thu Jan 1 01:00:00 CET 1970 (0)
Keyword: dbm01
Ext Security Info: no
File Restore Raw: no
Image Dump Level: 0
File System Only: no
Object Descriptor: (none specified)
Previous BI Time: Thu Jan 1 01:00:00 CET 1970 (0)
BI Full Time: Thu Jan 1 01:00:00 CET 1970 (0)
Request Pid: 0
Backup Status: 0
Stream Number: 0
Backup Copy: Standard (0)
Files File size: 644
PFI type: 0
IMAGE_ATTRIBUTE: 0
Primary Copy: 1
Image Type: 0 (Regular)
Job ID: 1211263
Num Resumes: 0
Resume Expiration: Thu Jan 1 01:00:00 CET 1970 (0)
Data Classification: (none specified)
Data_Classification_ID: (none specified)
Storage Lifecycle Policy: (none specified)
Storage Lifecycle Policy Version: 0
STL_Completed: 0
Remote Expiration Time: Thu Jan 1 01:00:00 CET 1970 (0) Origin Master Server: (none specified)
Origin Master GUID: (none specified)
Snap Time: Thu Jan 1 01:00:00 CET 1970 (0)
IR Enabled: no
Client Character Set: 1
Image On Hold: 0
Indexing Status: 0
Copy number: 1
Fragment: 1
Kilobytes: 6240
Remainder: 0
Media Type: Disk (0)
Density: qscsi (0)
File Num: 0
ID: /exa_zfs//dm01db01-priv1.service.intra_1444744154_C1_F1
Host: examedia02
Block Size: 1048576
Offset: 0
Media Date: Thu Jan 1 01:00:00 CET 1970 (0)
Dev Written On: -1
Flags: 0x0
Media Descriptor: examedia02
Expiration Time: Tue Oct 20 15:49:14 CEST 2015 (1445348954)
MPX: 0
retention_lvl: 1 week (0)
Try to Keep Time: Thu Jan 1 01:00:00 CET 1970 (0)
Copy Creation Time: Tue Oct 13 15:49:20 CEST 2015 (1444744160)
Data Format: Tar
checkpoint: 0
resume num: 0
Key tag: *NULL*
STL tag: *NULL*
Copy on hold: 0
root@nb-ser:/# bpimagelist -backupid
dm01db01-priv1.service.intra_1444744135 -L
Client: dm01db01-priv1.service.intra
Backup ID: dm01db01-priv1.service.intra_1444744135
Policy: 2_exadata
Policy Type: Oracle (4)
Proxy Client: (none specified)
Creator: oracle
Name1: (none specified)
Sched Label: week
Schedule Type: UBAK (2)
Retention Level: 1 week (0)
Backup Time: Tue Oct 13 15:48:55 CEST 2015 (1444744135)
Elapsed Time: 5 second(s)
Expiration Time: Tue Oct 20 15:48:55 CEST 2015 (1445348935)
Compressed: yes
Client Encrypted: no
Kilobytes: 32
Number of Files: 1
Number of Copies: 1
Number of Fragments: 1
Histogram: 0 0 0 0 0 0 0 0 0 0
DB Compressed: no
Files File Name: 2_exadata_1444744135_UBAK.f
Previous Backup Files File Name: (none specified)
Parent Backup Image File Name: (none specified)
SW Version: (none specified)
Options: 0x0
MPX: 1
TIR Info: 0
TIR Expiration: Thu Jan 1 01:00:00 CET 1970 (0)
Keyword: dbm01
Ext Security Info: no
File Restore Raw: no
Image Dump Level: 0
File System Only: no
Object Descriptor: (none specified)
Previous BI Time: Thu Jan 1 01:00:00 CET 1970 (0)
BI Full Time: Thu Jan 1 01:00:00 CET 1970 (0)
Request Pid: 0
Backup Status: 0
Stream Number: 0
Backup Copy: Standard (0)
Files File size: 641
PFI type: 0
IMAGE_ATTRIBUTE: 0
Primary Copy: 1
Image Type: 0 (Regular)
Job ID: 1211260
Num Resumes: 0
Resume Expiration: Thu Jan 1 01:00:00 CET 1970 (0)
Data Classification: (none specified)
Data_Classification_ID: (none specified)
Storage Lifecycle Policy: (none specified)
Storage Lifecycle Policy Version: 0
STL_Completed: 0
Remote Expiration Time: Thu Jan 1 01:00:00 CET 1970 (0) Origin Master Server: (none specified)
Origin Master GUID: (none specified)
Snap Time: Thu Jan 1 01:00:00 CET 1970 (0)
IR Enabled: no
Client Character Set: 1
Image On Hold: 0
Indexing Status: 0
Copy number: 1
Fragment: 1
Kilobytes: 32
Remainder: 0
Media Type: Disk (0)
Density: qscsi (0)
File Num: 0
ID: /exa_zfs//dm01db01-priv1.service.intra_1444744135_C1_F1
Host: examedia02
Block Size: 1048576
Offset: 0
Media Date: Thu Jan 1 01:00:00 CET 1970 (0)
Dev Written On: -1
Flags: 0x0
Media Descriptor: examedia02
Expiration Time: Tue Oct 20 15:48:55 CEST 2015 (1445348935)
MPX: 0
retention_lvl: 1 week (0)
Try to Keep Time: Thu Jan 1 01:00:00 CET 1970 (0)
Copy Creation Time: Tue Oct 13 15:49:00 CEST 2015 (1444744140)
Data Format: Tar
checkpoint: 0
resume num: 0
Key tag: *NULL*
STL tag: *NULL*
Copy on hold: 0
root@nb-ser:/# bpimagelist -backupid
dm01db01-priv1.service.intra_1444744121 -L
Client: dm01db01-priv1.service.intra
Backup ID: dm01db01-priv1.service.intra_1444744121
Policy: 2_exadata
Policy Type: Oracle (4)
Proxy Client: (none specified)
Creator: oracle
Name1: (none specified)
Sched Label: week
Schedule Type: UBAK (2)
Retention Level: 1 week (0)
Backup Time: Tue Oct 13 15:48:41 CEST 2015 (1444744121)
Elapsed Time: 6 second(s)
Expiration Time: Tue Oct 20 15:48:41 CEST 2015 (1445348921)
Compressed: yes
Client Encrypted: no
Kilobytes: 448
Number of Files: 1
Number of Copies: 1
Number of Fragments: 1
Histogram: 0 0 0 0 0 0 0 0 0 0
DB Compressed: no
Files File Name: 2_exadata_1444744121_UBAK.f
Previous Backup Files File Name: (none specified)
Parent Backup Image File Name: (none specified)
SW Version: (none specified)
Options: 0x0
MPX: 1
TIR Info: 0
TIR Expiration: Thu Jan 1 01:00:00 CET 1970 (0)
Keyword: dbm01
Ext Security Info: no
File Restore Raw: no
Image Dump Level: 0
File System Only: no
Object Descriptor: (none specified)
Previous BI Time: Thu Jan 1 01:00:00 CET 1970 (0)
BI Full Time: Thu Jan 1 01:00:00 CET 1970 (0)
Request Pid: 0
Backup Status: 0
Stream Number: 0
Backup Copy: Standard (0)
Files File size: 641
PFI type: 0
IMAGE_ATTRIBUTE: 0
Primary Copy: 1
Image Type: 0 (Regular)
Job ID: 1211258
Num Resumes: 0
Resume Expiration: Thu Jan 1 01:00:00 CET 1970 (0)
Data Classification: (none specified)
Data_Classification_ID: (none specified)
Storage Lifecycle Policy: (none specified)
Storage Lifecycle Policy Version: 0
STL_Completed: 0
Remote Expiration Time: Thu Jan 1 01:00:00 CET 1970 (0) Origin Master Server: (none specified)
Origin Master GUID: (none specified)
Snap Time: Thu Jan 1 01:00:00 CET 1970 (0)
IR Enabled: no
Client Character Set: 1
Image On Hold: 0
Indexing Status: 0
Copy number: 1
Fragment: 1
Kilobytes: 448
Remainder: 0
Media Type: Disk (0)
Density: qscsi (0)
File Num: 0
ID: /exa_zfs//dm01db01-priv1.service.intra_1444744121_C1_F1
Host: examedia02
Block Size: 1048576
Offset: 0
Media Date: Thu Jan 1 01:00:00 CET 1970 (0)
Dev Written On: -1
Flags: 0x0
Media Descriptor: examedia02
Expiration Time: Tue Oct 20 15:48:41 CEST 2015 (1445348921)
MPX: 0
retention_lvl: 1 week (0)
Try to Keep Time: Thu Jan 1 01:00:00 CET 1970 (0)
Copy Creation Time: Tue Oct 13 15:48:47 CEST 2015 (1444744127)
Data Format: Tar
checkpoint: 0
resume num: 0
Key tag: *NULL*
STL tag: *NULL*
Copy on hold: 0
I read somewhere that, if default device type in RMAN is disk then crosscheck marks EXPIRED all backup in its Catalog that are no longer on disk (in this case are on tape)
If I grep for "Status:" in the output of list backupset run after crosscheck, I do not see any Available bk anymore.
As long as the bks are marked EXPIRED I guess I cannot restore then back regardless if they are still on tape, correct? How about NB_ORA_COPY_NUMER ?
Any help is greatly appreciated.
Francesco