BACKUP KEYS USED IN RMAN ORACLE

BACKUP KEYS USED IN RMAN ORACLE

In rman with catalog database, key indicate an unique id for identifying a backuppiece.

RMAN> list backup summary;


List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
258     B  F  A DISK        28-JUL-21       1       1       NO         TAG20210728T134713
259     B  F  A DISK        28-JUL-21       1       1       NO         TAG20210728T182247
291     B  F  A DISK        29-JUL-21       1       1       NO         TAG20210729T212303
292     B  F  A DISK        29-JUL-21       1       1       NO         TAG20210729T212311
311     B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
312     B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
313     B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
314     B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
315     B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
344     B  F  A DISK        02-AUG-21       1       1       NO         TAG20210802T180128

This information can be get using below query with BS_KEY column of rc_backup_set view. Note that the BS_KEY column shows the rman backup of all the databases recorded or registered in the recovery catalog

SQL> select BS_KEY,BACKUP_TYPE,INCREMENTAL_LEVEL,PIECES,ELAPSED_SECONDS,STATUS,BLOCK_SIZE from rcat.rc_backup_set;

    BS_KEY B INCREMENTAL_LEVEL     PIECES ELAPSED_SECONDS S BLOCK_SIZE
---------- - ----------------- ---------- --------------- - ----------
       291 D                            1               4 A      16384
       292 D                            1               2 A      16384
        81 D                            1               2 A      16384
       258 D                            1               2 A      16384
       259 D                            1               1 A      16384
        56 D                            1              51 A       8192
        57 D                            1               4 A      16384
       311 D                            1              74 A       8192
       312 D                            1              24 A       8192
       313 D                            1              24 A       8192
       314 D                            1              24 A       8192

    BS_KEY B INCREMENTAL_LEVEL     PIECES ELAPSED_SECONDS S BLOCK_SIZE
---------- - ----------------- ---------- --------------- - ----------
       315 D                            1              14 A       8192
       344 D                            1               2 A      16384

13 rows selected.

In rman backup without catalog, the same key can be derived using RECID of v$backupset view

RMAN> list backup summary;

using target database control file instead of recovery catalog

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1       B  F  A DISK        28-JUL-21       1       1       NO         TAG20210728T134713
2       B  F  A DISK        28-JUL-21       1       1       NO         TAG20210728T182247
3       B  F  A DISK        29-JUL-21       1       1       NO         TAG20210729T212303
4       B  F  A DISK        29-JUL-21       1       1       NO         TAG20210729T212311
5       B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
6       B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
7       B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
8       B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
9       B  F  A DISK        02-AUG-21       1       1       YES        TAG20210802T175818
10      B  F  A DISK        02-AUG-21       1       1       NO         TAG20210802T180128

Use the below query to correlate the key column from rman with recid column in sqlplus

SQL> select RECID,BACKUP_TYPE,INCREMENTAL_LEVEL,PIECES,ELAPSED_SECONDS,BLOCK_SIZE from sys.v$backup_set;

     RECID B INCREMENTAL_LEVEL     PIECES ELAPSED_SECONDS BLOCK_SIZE
---------- - ----------------- ---------- --------------- ----------
         1 D                            1               2      16384
         2 D                            1               1      16384
         3 D                            1               4      16384
         4 D                            1               2      16384
         5 D                            1              74       8192
         6 D                            1              24       8192
         7 D                            1              24       8192
         8 D                            1              24       8192
         9 D                            1              14       8192
        10 D                            1               2      16384

10 rows selected.

Leave a Reply

%d bloggers like this: