Blog
Converting Dictionary Managed Tablespaces (DMT) to Local Managed Tablespaces (LMT)
Category: Database Author: Andre Luiz Dutra Ontalba (Board Member) Date: 5 years ago Comments: 0

Converting Dictionary Managed Tablespaces (DMT) to Local Managed Tablespaces (LMT)

 
Today we found some really old database using really old fashion tablespaces allocation. In another life, when I began with Oracle database and we use to call MOSC as Metalink (@ludodba) there was a way to manage the extents on database called DICTIONARY MANAGED TABLESPACES (DMT), most because of performance issues, Oracle has decided to change this management of the extents instead to resides on data dictionary (SYSTEM tbs), to be stored on bitmaps on local tablespace, that’s why they called it LOCAL MANAGED TABLESPACE (LMT). This feature was introduced on Oracle 9i in 2001, almost 20 years ago and we still see old stuff running around.
The steps that we will perform are very fast and simple, but as we are changing some core things on the database, please, make sure to have full and confiable backup before.
Here is an important note, a little bit confusing, please read it before to proceed. Resuming, after convert SYSTEM, you cannot put DMT in read write mode anymore.
********* IMPORTANT NOTE **********
Note:After the SYSTEM tablespace is migrated to locally managed, any dictionary-managed tablespaces in the database cannot be made read/write.
If you want to use the dictionary-managed tablespaces in read/write mode, then Oracle recommends
that you first migrate these tablespaces to locally managed before migrating the SYSTEM tablespace.
***********************************
1) Put DATABASE in restricted session
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;

System altered.

SELECT logins FROM v$instance;

LOGINS
---------
RESTRICTED
2) Define a default temporary tablespace on the database
SQL> col PROPERTY_NAME form a30
SQL> col PROPERTY_VALUE form a30
SQL> col DESCRIPTION form a50
SQL> select * from database_properties where PROPERTY_NAME = 'DEFAULT_TEMP_TABLESPACE';

PROPERTY_NAME PROPERTY_VALUE DESCRIPTION
------------------------------ ------------------------------ --------------------------------------------------
DEFAULT_TEMP_TABLESPACE SYSTEM ID of default temporary tablespace
 
Obs.: Really bad, using system tablespace to store temporary segments, some DBA here didn’t made his homework… In fact his work.
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMPTBS01;

Database altered.
Obs.: Check if temp is dictionary managed, if so, recreate it before to proceed with the others.
SQL> select * from database_properties where PROPERTY_NAME = 'DEFAULT_TEMP_TABLESPACE';

PROPERTY_NAME PROPERTY_VALUE DESCRIPTION
------------------------------ ------------------------------ --------------------------------------------------
DEFAULT_TEMP_TABLESPACE TEMPTBS01 ID of default temporary tablespace

 

3) Migrate all other DICTIONARY MANAGED TBS before MIGRATE system
select tablespace_name, status, extent_management 
from dba_tablespaces
where extent_management = 'DICTIONARY';
4) Execute the migration
select 'execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('''||tablespace_name||''');' cmd 
from dba_tablespaces where extent_management = 'DICTIONARY'
and tablespace_name <> 'SYSTEM';

CMD
----------------------------------------------------------------------------------------
execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('INDX');
execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('TOOLS');
execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('TESTTBS1');
execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('TESTTBS2');
execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('USERS');

SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('INDX');

PL/SQL procedure successfully completed.

SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('TOOLS');

PL/SQL procedure successfully completed.

SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('TESTTBS1');

PL/SQL procedure successfully completed.

SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('TESTTBS2');

PL/SQL procedure successfully completed.

SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('USERS');

PL/SQL procedure successfully completed.
5) Make sure that all tablespaces, other than SYSTEM were migrated to LMT, after execute the migration of SYSTEM to LMT, if you left any dictionary managed tablespaces (DMT), you cannot put them read write anymore.
select tablespace_name, status, extent_management 
from dba_tablespaces
where extent_management = 'DICTIONARY'
and tablespace_name <> 'SYSTEM';

no rows selected
6) Put all tablespaces other than UNDO, TEMP AND SYSAUX in readonly mode.
select 'ALTER TABLESPACE '||tablespace_name||' READ ONLY;' CMD
from dba_tablespaces
where tablespace_name NOT in ('SYSTEM','SYSAUX')
and contents not in ('UNDO','TEMPORARY');

CMD
----------------------------------------------------------
ALTER TABLESPACE INDX READ ONLY;
ALTER TABLESPACE TOOLS READ ONLY;
ALTER TABLESPACE TESTTBS1 READ ONLY;
ALTER TABLESPACE TESTTBS2 READ ONLY;
ALTER TABLESPACE USERS READ ONLY;
7) Check the status of the tablespaces
SQL> select tablespace_name, status from dba_tablespaces;

TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
INDX READ ONLY
TOOLS READ ONLY
TESTTBS1 READ ONLY
TESTTBS2 READ ONLY
USERS READ ONLY
UNDOTBS01 ONLINE
TEMPTBS01 ONLINE
SYSAUX ONLINE
8) Put SYSAUX tablespace offline
SQL> alter tablespace SYSAUX offline;

Tablespace altered.
9) Check the status of tablespaces again, just UNDO, TEMP and SYSTEM must be online.
SQL> select tablespace_name, status from dba_tablespaces;

TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
INDX READ ONLY
TOOLS READ ONLY
TESTTBS1 READ ONLY
TESTTBS2 READ ONLY
USERS READ ONLY
UNDOTBS01 ONLINE
TEMPTBS01 ONLINE
SYSAUX OFFLINE
10) Now we can migrate SYSTEM tablespaces
SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');

PL/SQL procedure successfully completed.
11) Put the tablespaces again read write and online
select 'ALTER TABLESPACE '||tablespace_name||' READ WRITE;' CMD
from dba_tablespaces
where tablespace_name NOT in ('SYSTEM','SYSAUX')
and contents not in ('UNDO','TEMPORARY');

CMD
-----------------------------------------------------------
ALTER TABLESPACE INDX READ WRITE;
ALTER TABLESPACE TOOLS READ WRITE;
ALTER TABLESPACE USR READ WRITE;
ALTER TABLESPACE TESTTBS2 READ WRITE;
ALTER TABLESPACE USERS READ WRITE;

SQL> ALTER TABLESPACE INDX READ WRITE;

Tablespace altered.

SQL> ALTER TABLESPACE TOOLS READ WRITE;

Tablespace altered.

SQL> ALTER TABLESPACE USR READ WRITE;

Tablespace altered.

SQL> ALTER TABLESPACE TESTTBS2 READ WRITE;

Tablespace altered.

SQL> ALTER TABLESPACE USERS READ WRITE;

Tablespace altered.

12) Put SYSAUX online again
SQL> ALTER TABLESPACE SYSAUX ONLINE;

Tablespace altered.
13) Check the status of the tablespaces one more time
SQL> select tablespace_name, status, extent_management from dba_tablespaces;

TABLESPACE_NAME STATUS EXTENT_MAN
------------------------------ --------- ----------
SYSTEM ONLINE LOCAL
INDX ONLINE LOCAL
TOOLS ONLINE LOCAL
TESTTBS1 ONLINE LOCAL
TESTTBS2 ONLINE LOCAL
USERS ONLINE LOCAL
UNDOTBS01 ONLINE LOCAL
TEMPTBS01 ONLINE LOCAL
SYSAUX ONLINE LOCAL
14) Disable restricted session on the database
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;

System altered.

SELECT logins FROM v$instance;

LOGINS
---------
ALLOWED
If you don’t follow all steps carefully you can reach some issues like these below
 
SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');

ERROR at line 1:
ORA-10644: SYSTEM tablespace cannot be default temporary tablespace
ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 227
ORA-06512: at line 1

SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');

ERROR at line 1:
ORA-10647: Tablespace other than SYSTEM, UNDO, TEMP not
found in read only mode
ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 227
ORA-06512: at line 1

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
TEMP
USERS
IDX
SYSAUX
UNDO

SQL> alter tablespace USERS read only;
SQL> alter tablespace IDX read only;

SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');

ERROR at line 1:
ORA-10648: Tablespace SYSAUX is not offline
ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 227
ORA-06512: at line 1
 
I hope this helps you!!!
Rodrigo Mufalani and Andre Luiz Dutra Ontalba

Disclaimer: “The postings on this site are my own and don’t necessarily represent may actual employer positions, strategies or opinions. The information here was edited  to be useful for general purpose, specific data and identifications was removed to allow reach generic audience and to be useful.”


ERROR CODE: 17002
Category: Middleware Author: Cassio Mariani Date: 5 years ago Comments: 0
Internal Exception: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
 
TIPS: Change Database Hostname After OAM security store configured

 

Change Database Hostname After OAM security stored configured
Issue:
 
Database Hostname need to be changed after OAM security store is configured.
 
Info: Data source is: opss-DBDS

[EL Severe]: 2017-03-14 20:39:37.575--ServerSession(1547285287)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.DatabaseException

Internal Exception: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection




Error Code: 17002




JAN 07, 2020 8:39:37 PM oracle.security.jps.internal.common.config.AbstractSecurityStore getSecurityStoreVersion

WARNING: Unable to get the Version from Store returning the default. Reason: java.net.ConnectException: Connection refused.




[EL Severe]: 2020-01-20 20:39:37.978--ServerSession(1619843188)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.DatabaseException

Internal Exception: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection




Error Code: 17002

JAN 07, 2020 8:39:37 PM oracle.security.jps.internal.credstore.ldap.LdapCredentialStore init

WARNING: Could not create credential store instance. Reason oracle.security.jps.service.policystore.PolicyStoreConnectivityException: JPS-00027: There was an internal error: java.net.ConnectException: Connection refused

JPS-01055: Could not create credential store instance. Reason oracle.security.jps.service.policystore.PolicyStoreConnectivityException: JPS-00027: There was an internal error: java.net.ConnectException: Connection refused

Error: Diagnostics data was not saved to the credential store.

Error: Validate operation has failed.

Need to do the security configuration first!


Changes:

 

Login to Weblogic console and modify below connection pools

 

Navigate to “Services > Datasources > oamDS > Connection Pool” and modify connection details

 

Navigate to “Services > Datasources > opss-DBDS > Connection Pool” and modify connection details.

 

If weblogic console is not accessible then modify two files “oam-db-jdbc.xml and opss-jdbc.xml” under /user_projects/domains/base_domain/config/jdbc.

 

Login to server and navigate to below location.
/user_projects/domains/base_domain/config/fmwconfig/

 

Modify jps-config-jse.xml, jps-config-migration.xml and jps-config.xml  file
Modify “jdbc.url” property and update with new hostname.

 

Restart Admin server and managed server.

 

Repeat step 2 in all your cluster nodes.
 
Expected Error if  jps-config-jse.xml, jps-config-migration.xml and jps-config.xml  files not modified.
 
CHEERS !

 

Cassio Mariani
 

Disclaimer: “The postings on this site are my own and don’t necessarily represent may actual employer positions, strategies or opinions. The information here was edited  to be useful for general purpose, specific data and identifications was removed to allow reach generic audience and to be useful.”


ZDLRA Internals, INDEX_BACKUP task in details
Category: Engineer System Author: Fernando Simon (Board Member) Date: 5 years ago Comments: 0

ZDLRA Internals, INDEX_BACKUP task in details

For ZDLRA, the task type INDEX_BACKUP it is important (if it is not the most) because it is responsible to create the virtual full backup. This task runs for every backup that you ingest at ZDLRA and here, I will show with more details what occurs at ZDLRA: internals steps, phases, and tables involved.
I recommend that you check my previous post about ZDLRA: ZDLRA Internals, Tables and Storage, ZDLRA, Virtual Full Backup and Incremental Forever, and Understanding ZDLRA. They provide a good base to understand some aspects of ZDLRA architecture and features.
As you saw in my previous post, ZDLRA opens every backup that you sent and read every block of it to generate one new virtual full backup. And this backup is validated block a block (physically and logically) against corruption. It differs from a snapshot because it is content-aware (in this case it is proprietary Oracle datafile blocks inside another proprietary Oracle rman block) and Oracle it is the only that can do this guaranteeing that result is valid.
Backup
This generation is done thought INDEX_BACKUP task and occurs for every backup (level 0 or 1) that enter in the system. For this post, I already have a full backup level 0 inside ZDLRA and I made one new incremental level 1:
RMAN> run{

2> backup device type sbt cumulative incremental level 1 filesperset 1 datafile 29;

3> }

Starting backup at 2019-08-16_15-01-11

allocated channel: ORA_SBT_TAPE_1

channel ORA_SBT_TAPE_1: SID=406 instance=SIMON1 device type=SBT_TAPE

channel ORA_SBT_TAPE_1: RA Library (ZDLRA) SID=903C95C93085DC14E0531E43B20AB30F

allocated channel: ORA_SBT_TAPE_2

channel ORA_SBT_TAPE_2: SID=451 instance=SIMON1 device type=SBT_TAPE

channel ORA_SBT_TAPE_2: RA Library (ZDLRA) SID=903C95D1C201DC19E0531E43B20A4C44

allocated channel: ORA_SBT_TAPE_3

channel ORA_SBT_TAPE_3: SID=502 instance=SIMON1 device type=SBT_TAPE

channel ORA_SBT_TAPE_3: RA Library (ZDLRA) SID=903C95E1BFD9DC38E0531E43B20A0038

allocated channel: ORA_SBT_TAPE_4

channel ORA_SBT_TAPE_4: SID=651 instance=SIMON1 device type=SBT_TAPE

channel ORA_SBT_TAPE_4: RA Library (ZDLRA) SID=903C95EAC1ACDC48E0531E43B20AC79D

channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00029 name=+DATAC1/simon_x6s/datafile/simontsthistoric1_tbs.399.938192975

channel ORA_SBT_TAPE_1: starting piece 1 at 2019-08-16_15-01-25

channel ORA_SBT_TAPE_1: finished piece 1 at 2019-08-16_15-03-10

piece handle=SIMON_s0u9c0a5_1_1 tag=TAG20190816T150116 comment=API Version 2.0,MMS Version 3.17.1.26

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:01:45

Finished backup at 2019-08-16_15-03-10

Starting Control File and SPFILE Autobackup at 2019-08-16_15-03-11

piece handle=c-4165931009-20190816-06 comment=API Version 2.0,MMS Version 3.17.1.26

Finished Control File and SPFILE Autobackup at 2019-08-16_15-03-18

RMAN>
As you can see, it is a normal backup. And the details for this backup:
RMAN> list backupset 52141830;

List of Backup Sets

===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

52141830 Incr 1  30.75M     SBT_TAPE    00:01:44     2019-08-16_15-03-09

        BP Key: 52141831   Status: AVAILABLE  Compressed: NO  Tag: TAG20190816T150116

        Handle: SIMON_s0u9c0a5_1_1   Media: Recovery Appliance (ZDLRA)

  List of Datafiles in backup set 52141830

  File LV Type Ckp SCN    Ckp Time            Name

  ---- -- ---- ---------- ------------------- ----

  29   1  Incr 4932560891039 2019-08-16_15-01-25 +DATAC1/simon_x6s/datafile/simontsthistoric1_tbs.399.938192975

RMAN>

RMAN> list backup tag = 'TAG20190816T150116';

List of Backup Sets

===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

52141830 Incr 1  30.75M     SBT_TAPE    00:01:44     2019-08-16_15-03-09

        BP Key: 52141831   Status: AVAILABLE  Compressed: NO  Tag: TAG20190816T150116

        Handle: SIMON_s0u9c0a5_1_1   Media: Recovery Appliance (ZDLRA)

  List of Datafiles in backup set 52141830

  File LV Type Ckp SCN    Ckp Time            Name

  ---- -- ---- ---------- ------------------- ----

  29   1  Incr 4932560891039 2019-08-16_15-01-25 +DATAC1/simon_x6s/datafile/simontsthistoric1_tbs.399.938192975

RMAN>
Here it is important to remember the TAG, backupset(BS)/backup piece (BP) numbers, and the SCN for the backup made.
INDEX_BACKUP
The INDEX_BACKUP appears as a single task inside ZDLRA, but have two major phases: fixup_unordered and q_restore_fast. And each one impacts differently inside the rman catalog and in the internal tables.
So, after the backup finish, inside of ZDLRA we can see the index task running:
SQL> l

  1  SELECT s.ba_session_id, s.instance_id, s.sid, s.serial#, s.job_name

  2         , rt.task_id, rt.DB_KEY, rt.db_unique_name, rt.task_type, rt.state, rt.waiting_on

  3         , rt.elapsed_seconds

  4         , gs.module, gs.sql_id, gs.action

  5         , rt.BP_KEY, rt.bs_key, rt.df_key, rt.vb_key

  6  FROM sessions s

  7  JOIN ra_task rt

  8  ON rt.task_id = s.current_task

  9  AND rt.task_type = 'INDEX_BACKUP'

 10  JOIN gv$session gs

 11  ON gs.inst_id = s.instance_id

 12  AND gs.sid = s.sid

 13  AND gs.serial# = s.serial#

 14* ORDER BY rt.LAST_EXECUTE_TIME DESC

SQL> /

BA_SESSION_ID INSTANCE_ID    SID    SERIAL# JOB_NAME              TASK_ID     DB_KEY DB_UNIQUE_NAME  TASK_TYPE       STATE    WAITING_ON ELAPSED_SECONDS MODULE           SQL_ID        ACTION            BP_KEY     BS_KEY     DF_KEY     VB_KEY

------------- ----------- ------ ---------- ------------------ ---------- ---------- --------------- --------------- -------- ---------- --------------- ---------------- ------------- ------------- ---------- ---------- ---------- ----------

     56215535           2   4228      30075 RA$_EXEC_56216288    56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING                  345.305895 fixup_unordered  1q0zr86n25pvu scan 6% done    52141831

SQL>
With this SQL you can check all the INDEX_BACKUP tasks running at ZDLRA. And the SQL use the tables and report:
  • RA_TASK: All tasks running inside ZDLRA.
  • SESSIONS: Sessions running inside ZDLRA, used to get the database session running the task
  • GV$SESSION: Databases sessions, used to get the sql_id and others info
  • BP_KEY: Identify the backup piece key that it is indexing. It is the start point to identify everything here.
Above you can see that task 56242962 is running, processing the BP_KEY (backup piece key) 52141831, running the module fixup_unordered, processed 6% of this step, and running SQL_ID 1q0zr86n25pvu.

 

INDEX_BACKUP, fixup_unordered
As showed, the index task is running the fixup_unordered module, and thus represents the first phase where ZDLRA it is checking all the blocks that are necessary to build the virtual full backup. Based on the report from the query above we can see that BP_KEY processed it is 52141831 and we can get more info from backup piece rman table:
SQL> select bp_key, bs_key, tag, handle, bytes/1024/1024/1024 from bp where bp_key = 52141831;

    BP_KEY     BS_KEY TAG                              HANDLE               BYTES/1024/1024/1024

---------- ---------- -------------------------------- -------------------- --------------------

  52141831   52141830 TAG20190816T150116               SIMON_s0u9c0a5_1_1             .030029297

SQL>

SQL> select bs_key, INCREMENTAL_LEVEL, HANDLE from rc_backup_piece where bp_key = 52141831;

    BS_KEY INCREMENTAL_LEVEL HANDLE

---------- ----------------- --------------------

  52141830                 1 SIMON_s0u9c0a5_1_1

SQL>
This tells us that the task it is processing the backup that we made before (look the result of column BP_KEY from SQL in the first topic). The BP, and rc_backup_piece are the tables from rman catalog that store info about the backup pieces, check the handle and tag to compare from rman list output.
Going further we can check the VBDF (virtual backup data file table – store the virtual full backups information) table and verify more details:
SQL> SELECT vb_key, ckp_id, df_key, db_key, blocks, vcbp_key, srcbp_key, file#, ckp_scn FROM VBDF WHERE srcbp_key = 52141831;

    VB_KEY         CKP_ID     DF_KEY     DB_KEY     BLOCKS   VCBP_KEY  SRCBP_KEY      FILE#        CKP_SCN

---------- -------------- ---------- ---------- ---------- ---------- ---------- ---------- --------------

  52141864  4932560891039     752220     752186 1655177216              52141831         29  4932560891039

SQL>
At VBDF table we can discover:
  • VB_KEY: Virtual backup key.
  • CKP_ID: Checkpoint and SCN for this virtual backup.
  • BLOCKS: Number of the blocks for this virtual backup.
  • VCBP_KEY: Is null at fixup_unordered because the virtual backup piece (VCBP) was not yet generated (it is doing by fixup_unordered). This will change in the future and I will show more details.
  • SRCBP_KEY: The source/original backup piece used to create this virtual full backup.
  •  
So, we can check that the backu is in the middle of the index the process since the VCBP_KEY is not yet available. But besides that, we can validate/check more details about the backups.
Check that does not exist a backup piece associated with this virtual backup key:
SQL> select bp_key, bs_key, tag, handle, bytes/1024/1024/1024, vb_key from bp where vb_key = 52141864;

no rows selected

SQL>
And that exists just one backup of datafile for this SCN and FILE#:
SQL> SELECT bdf_key, bs_key, file#, ckp_scn, incr_level from bdf where CKP_SCN = 4932560891039 and file# = 29;

   BDF_KEY     BS_KEY      FILE#        CKP_SCN INCR_LEVEL

---------- ---------- ---------- -------------- ----------

  52141832   52141830         29  4932560891039          1

SQL>

SQL> SELECT db_key, bdf_key, file#, CHECKPOINT_CHANGE#, incremental_level from rc_backup_datafile where bs_key IN(52141830);

    DB_KEY    BDF_KEY      FILE# CHECKPOINT_CHANGE# INCREMENTAL_LEVEL

---------- ---------- ---------- ------------------ -----------------

    752186   52141832         29      4932560891039                 1

SQL> SELECT db_key, bdf_key, file#, CHECKPOINT_CHANGE#, incremental_level from rc_backup_datafile where CHECKPOINT_CHANGE# = 4932560891039;

    DB_KEY    BDF_KEY      FILE# CHECKPOINT_CHANGE# INCREMENTAL_LEVEL

---------- ---------- ---------- ------------------ -----------------

    752186   52141832         29      4932560891039                 1

SQL>

Digging more, we can see that are zero plans for this virtual backup (will be zero until fixup_unordered finish – more detail further):
SQL> select count(*) from plans where VB_KEY = 52141864;

  COUNT(*)

----------

         0

SQL>
During this phase of INDEX_BACKUP, the major SQL_ID is 1q0zr86n25pvu:
SQL> select sql_fulltext from gv$sqlarea where inst_id = 2 and sql_id = '1q0zr86n25pvu';

SQL_FULLTEXT

----------------------------------------------------------------------------------------------------

SELECT * FROM (SELECT /*+

                     QB_NAME(c)

                     INDEX_RS_ASC(@c b@c)

                     NO_INDEX_FFS(@c b@c)

                     NO_INDEX_SS(@c b@c)

                     OPT_PARAM('optimizer_dynamic_sampling' 0)

                     OPT_PARAM('_optimizer_adaptive_cursor_sharing' 'false')

                     OPT_PARAM('_optimizer_extended_cursor_sharing_rel' 'none')

                     OPT_PARAM('_optimizer_use_feedback' 'false')

                    */ BLOCKNO, SCN, CKP_ID, ENDBLK, CHUNKNO, COFFSET FROM BLOCKS B WHERE DF_KEY = :

B4 AND BLOCKNO BETWEEN :B3 AND :B2 AND SCN < :B1 ORDER BY BLOCKNO, SCN, CKP_ID ) WHERE ROWNUM < :B5

SQL>


And the bind variables in this case are:
SQL> l

  1  SELECT s.ba_session_id, s.instance_id

  2  , rt.task_id, rt.DB_KEY, rt.db_unique_name, rt.task_type, rt.state

  3  , gs.module, gs.sql_id, gs.action

  4  , rt.BP_KEY, rt.bs_key, rt.df_key, rt.vb_key

  5  , sbc.name, sbc.value_string

  6  FROM sessions s

  7  JOIN ra_task rt

  8  ON rt.task_id = s.current_task

  9  AND RT.TASK_ID = 56242962

 10  JOIN gv$session gs

 11  ON gs.inst_id = s.instance_id

 12  AND gs.sid = s.sid

 13  AND gs.serial# = s.serial#

 14  join gv$sql_bind_capture sbc

 15  on sbc.inst_id = gs.inst_id

 16  and sbc.sql_id = gs.sql_id

 17* ORDER BY rt.LAST_EXECUTE_TIME DESC

SQL>

SQL> /

BA_SESSION_ID INSTANCE_ID    TASK_ID     DB_KEY DB_UNIQUE_NAME       TASK_TYPE       STATE           MODULE           SQL_ID        ACTION              BP_KEY     BS_KEY     DF_KEY     VB_KEY NAME  VALUE_STRING

------------- ----------- ---------- ---------- -------------------- --------------- --------------- ---------------- ------------- --------------- ---------- ---------- ---------- ---------- ----- ---------------

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 21% done     52141831                                  :B4   752220

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 21% done     52141831                                  :B3   302875642

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 21% done     52141831                                  :B2   1655177216

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 21% done     52141831                                  :B1   4932554641877

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 21% done     52141831                                  :B5   1048576

SQL>
Explaining a little. So, based on the SQL text and variables we can see that is retrieving from BLOCKS table all the blocks for the DF_KEY 752220 (you can get it in VBDF), that are between 302875642 (actual block of processing) and 1655177216 (max number of blocks for the ingested backup), and have SCN bellow 4932554641877 (from the ingested backup) and process this in package of 1048576 blocks. One information here it is that the number 302875642 will vary while it is running this phase.
So, the idea here for ZDLRA index task is processing get/check all the blocks that have SCN below of the SCN from ingested backup. And since the INDEX_BACKUP result creates one virtual full backup, all the blocks for this datafile need to be processed.
If you check this query time to time, you will see the increase of scan % increasing until the :B3 and :B4 are equal (compare with the previous execution):
SQL> /

BA_SESSION_ID INSTANCE_ID    TASK_ID     DB_KEY DB_UNIQUE_NAME       TASK_TYPE       STATE           MODULE           SQL_ID        ACTION             BP_KEY     BS_KEY     DF_KEY     VB_KEY NAME  VALUE_STRING

------------- ----------- ---------- ---------- -------------------- --------------- --------------- ---------------- ------------- -------------- ---------- ---------- ---------- ---------- ----- ---------------

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 99% done    52141831                                  :B4   752220

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 99% done    52141831                                  :B3   1641637658

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 99% done    52141831                                  :B2   1655177216

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 99% done    52141831                                  :B1   4932554641877

     56215535           2   56242962     752186 SIMON_X6S            INDEX_BACKUP    RUNNING         fixup_unordered  1q0zr86n25pvu scan 99% done    52141831                                  :B5   1048576

SQL> select rt.elapsed_seconds from ra_task rt where task_id = 56242962;

ELAPSED_SECONDS

---------------

     6618.53526

SQL>
After this hit 100% the next phase of the INDEX_BAKUP (q_restore_fast) will start. The phase fixup_unordered depends on the size of your datafile and not from the ingested backup. In this example, the backup has just 30MB, but the datafile has more than 16TB, so, the virtual full will have the same size and this takes a lot of time reading all the blocks. For you ZDLRA the DF_KEY, BS_KEY, and others will be different. Just remember that BP_KEY for the index task it is the start point for the analyses.
INDEX_BACKUP, q_restore_fast
After the fixup_unordered reach 100% of the scan, the phase q_restore_fast starts and this will create the virtual backup itself. But before let’s see what’s happened at rman catalog after the previous phase finished:
 
##########################################################

This is list took right after the backup finished:

RMAN> list backup tag = 'TAG20190816T150116';

List of Backup Sets

===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

52141830 Incr 1  30.75M     SBT_TAPE    00:01:44     2019-08-16_15-03-09

        BP Key: 52141831   Status: AVAILABLE  Compressed: NO  Tag: TAG20190816T150116

        Handle: SIMON_s0u9c0a5_1_1   Media: Recovery Appliance (ZDLRA)

  List of Datafiles in backup set 52141830

  File LV Type Ckp SCN    Ckp Time            Name

  ---- -- ---- ---------- ------------------- ----

  29   1  Incr 4932560891039 2019-08-16_15-01-25 +DATAC1/simon_x6s/datafile/simontsthistoric1_tbs.399.938192975

RMAN>

##########################################################

And now after the fixup_unordered finish:

RMAN> list backup tag = 'TAG20190816T150116';

List of Backup Sets

===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

52146235 Incr 1  28.00M     SBT_TAPE    00:01:44     2019-08-16_15-03-09

        BP Key: 52146236   Status: AVAILABLE  Compressed: YES  Tag: TAG20190816T150116

        Handle: VB$_90959062_52141864I   Media:

  List of Datafiles in backup set 52146235

  File LV Type Ckp SCN    Ckp Time            Name

  ---- -- ---- ---------- ------------------- ----

  29   1  Incr 4932560891039 2019-08-16_15-01-25 +DATAC1/simon_x6s/datafile/simontsthistoric1_tbs.399.938192975

RMAN>
 
As you can see, the backupset (52141830 before, and 52146235 now) and backup piece changed (the handle changed too). But look that TAG and SCN remains the same. This means that a new backup was created because ZDLRA scanned the original backup. But as you can see, the virtual full was not created yet (there is any level 0 available in the list). If you see this in your ZDLRA, that means that INDEX_BACKUP task is in process.
If we continue to check more details and use the same query than before, we can see that backup changed the BS_KEY and BP_KEY in the internal tables (look that old keys disappears):
SQL> select bs_key, INCREMENTAL_LEVEL, HANDLE from rc_backup_piece where bp_key = 52141831;

no rows selected

SQL> select bp_key, bs_key, tag, handle, bytes/1024/1024/1024, vb_key from bp where bp_key = 52141831;

no rows selected

SQL> select bp_key, bs_key, tag, handle, bytes/1024/1024/1024 from bp where tag = 'TAG20190816T150116';

    BP_KEY     BS_KEY TAG                 HANDLE                  BYTES/1024/1024/1024

---------- ---------- ------------------- ----------------------- --------------------

  52146236   52146235 TAG20190816T150116  VB$_90959062_52141864I             .02734375

SQL>
And now, checking in the VBDF table we can see that info at VCBP_KEY column appears
SQL> SELECT vb_key, ckp_id, df_key, db_key, blocks, vcbp_key, srcbp_key, file#, ckp_scn FROM VBDF WHERE srcbp_key = 52141831;

    VB_KEY         CKP_ID     DF_KEY     DB_KEY     BLOCKS   VCBP_KEY  SRCBP_KEY      FILE#        CKP_SCN

---------- -------------- ---------- ---------- ---------- ---------- ---------- ---------- --------------

  52141864  4932560891039     752220     752186 1655177216   52146236   52141831         29  4932560891039

SQL>
And if you search now at backup piece table you can see that exists one listed for this virtual backup key (check in the topic before that this info does not exist):
SQL> select bp_key, bs_key, tag, handle, bytes/1024/1024/1024, vb_key from bp where vb_key = 52141864;

    BP_KEY     BS_KEY TAG                 HANDLE                  BYTES/1024/1024/1024     VB_KEY

---------- ---------- ------------------- ----------------------- -------------------- ----------

  52146236   52146235 TAG20190816T150116  VB$_90959062_52141864I             .02734375   52141864

SQL>

And check that exists just one backup of this datafile at this SCN:

SQL> SELECT bdf_key, bs_key, file#, ckp_scn, incr_level from bdf where CKP_SCN = 4932560891039 and file# = 29;

   BDF_KEY     BS_KEY      FILE#        CKP_SCN INCR_LEVEL

---------- ---------- ---------- -------------- ----------

  52146237   52146235         29  4932560891039          1

SQL>
 
In this phase, you can see that the details for index and virtual full backup starts to appear internally. If you check, now you have plans for this virtual full backup:
SQL> select count(*) from plans where VB_KEY = 52141864;

  COUNT(*)

----------

         1

SQL>

SQL> select count(*), to_char(sysdate, 'HH24:MI') as time from plans_details where VB_KEY = 52141864;

  COUNT(*) TIME

---------- -----

   2294010 18:25

SQL> select count(*), to_char(sysdate, 'HH24:MI') as time from plans_details where VB_KEY = 52141864;

  COUNT(*) TIME

---------- -----

   5773720 18:43

SQL>
As you can see above, the plans_details for this virtual backup is increasing from time to time. This means that the q_restore_fast is running and it is reading blocks to create the virtual full backup/index (and inserting at plan_details).
We can figure out this, while the INDEX_BACKUP task is running, checking the sql_id for the session. While the task is running, we have three major sql’s (I used the same query than before – where we checked the bind for the session/task):
SQL> /

BA_SESSION_ID INSTANCE_ID    TASK_ID     DB_KEY DB_UNIQUE_NAME  TASK_TYPE       STATE    MODULE          SQL_ID        ACTION                   BP_KEY     BS_KEY     DF_KEY     VB_KEY NAME  VALUE_STRING

------------- ----------- ---------- ---------- --------------- --------------- -------- --------------- ------------- -------------------- ---------- ---------- ---------- ---------- ----- ---------------

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B1

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B12

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B2

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B1

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B2

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B3

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B4

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B1   752220

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B3   1

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B4   1051071

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B11  0

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B10  4931849117847

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B9   4931848304742

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B8   4932554641877

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B7   752187

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B6   4932554641877

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  9ma189ab8x9c7 plan 0% done           52141831                                  :B5   4932554641877

17 rows selected.                                                                                       

SQL>                                                                                                    

SQL> /                                                                                                 

BA_SESSION_ID INSTANCE_ID    TASK_ID     DB_KEY DB_UNIQUE_NAME  TASK_TYPE       STATE    MODULE          SQL_ID        ACTION                   BP_KEY     BS_KEY     DF_KEY     VB_KEY NAME  VALUE_STRING

------------- ----------- ---------- ---------- --------------- --------------- -------- --------------- ------------- -------------------- ---------- ---------- ---------- ---------- ----- ---------------

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B1   752220

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B3   403380104

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B4   404440007

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B11  0

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B10  4931849117847

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B9   4931848304742

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B8   4932554641877

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B7   752187

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B6   4932554641877

     56215535           2   56242962     752186 SIMON_X6S       INDEX_BACKUP    RUNNING  q_restore_fast  brt6uuhzacdnu plan 54% done          52141831                                  :B5   4932554641877

10 rows selected.

SQL>

SQL> /

BA_SESSION_ID INSTANCE_ID    TASK_ID     DB_KEY DB_UNIQUE_NAME       TASK_TYPE       STATE      MODULE                         SQL_ID        ACTION                   BP_KEY     BS_KEY     DF_KEY     VB_KEY NAME  VALUE_STRING

------------- ----------- ---------- ---------- -------------------- --------------- ---------- ------------------------------ ------------- -------------------- ---------- ---------- ---------- ---------- ----- --------------------

     56215535           2   56242962     477602 SIMON_X6S            INDEX_BACKUP    RUNNING    q_restore_fast                 8t81c0j1w9jqu plan 89% done          41032043                                  :B1

     56215535           2   56242962     477602 SIMON_X6S            INDEX_BACKUP    RUNNING    q_restore_fast                 8t81c0j1w9jqu plan 89% done          41032043                                  :B3   752220

     56215535           2   56242962     477602 SIMON_X6S            INDEX_BACKUP    RUNNING    q_restore_fast                 8t81c0j1w9jqu plan 89% done          41032043                                  :B2   4389973931270

     56215535           2   56242962     477602 SIMON_X6S            INDEX_BACKUP    RUNNING    q_restore_fast                 8t81c0j1w9jqu plan 89% done          41032043                                  :B1   4932554641877

     56215535           2   56242962     477602 SIMON_X6S            INDEX_BACKUP    RUNNING    q_restore_fast                 8t81c0j1w9jqu plan 89% done          41032043                                  :B4   1048576

SQL>

And the SQL text for them:

SQL> select sql_fulltext from gv$sqlarea where inst_id = 2 and sql_id = '9ma189ab8x9c7';

SQL_FULLTEXT

--------------------------------------------------------------------------------------------------------------------------------

INSERT /*+

             QB_NAME(q_restore_fast)

             OPT_PARAM('optimizer_dynamic_sampling' 0)

             OPT_PARAM('_optimizer_adaptive_cursor_sharing' 'false')

             OPT_PARAM('_optimizer_extended_cursor_sharing_rel' 'none')

             OPT_PARAM('_optimizer_use_feedback' 'false')

           */ INTO PLANS_DETAILS (DF_KEY, TYPE, VB_KEY, BLKRANK, BLOCKNO, CHUNKNO, NUMBLKS, COFFSET, NUMBYTES) SELECT :B1 , :B12

, :B2 , 1 BLKRANK, BLOCKNO, CHUNKNO, NUMBLKS, COFFSET, NUMBYTES FROM TABLE( DBMS_RA_POOL.COLLAPSE(:B1 , :B2 , :B3 , :B4 ,

 CURSOR( SELECT /*+

                     QB_NAME(q_rfast_c)

                     INDEX_RS_ASC(@q_rfast_c b@q_rfast_c)

                     NO_INDEX_FFS(@q_rfast_c b@q_rfast_c)

                     NO_INDEX_SS(@q_rfast_c b@q_rfast_c)

                     OPT_PARAM('optimizer_dynamic_sampling' 0)

                     OPT_PARAM('_optimizer_adaptive_cursor_sharing' 'false')

                     OPT_PARAM('_optimizer_extended_cursor_sharing_rel' 'none')

                     OPT_PARAM('_optimizer_use_feedback' 'false')

                   */ CKP_ID, BLOCKNO, SCN, CHUNKNO, USED, COFFSET, ENDBLK FROM BLOCKS B WHERE DF_KEY = :B1 AND BLOCKNO BETWEEN

:B3 AND :B4 AND SCN BETWEEN :B11 AND :B10 AND CKP_ID >= :B9 AND (CKP_ID <= :B8 OR DBINC_KEY <> :B7 ) AND (SCN < :B6 OR CKP_ID =

:B5 ) ORDER BY BLOCKNO, SCN, CKP_ID, CHUNKNO ) ) )

SQL>

SQL> select sql_fulltext from gv$sqlarea where inst_id = 2 and sql_id = 'brt6uuhzacdnu';

SQL_FULLTEXT

-------------------------------------------------------------------------------------------------------------------------------

SELECT /*+ QB_NAME ("Q_RFAST_C") NO_INDEX_SS ("B") NO_INDEX_FFS ("B") INDEX_RS_ASC ("B") */ "B"."CKP_ID" "CKP_ID","B"."BLOCKNO"

"BLOCKNO","B"."SCN" "SCN","B"."CHUNKNO" "CHUNKNO","B"."USED" "USED","B"."COFFSET" "COFFSET","B"."ENDBLK" "ENDBLK" FROM "BLOCKS"

"B" WHERE "B"."DF_KEY"=:B1 AND "B"."BLOCKNO">=:B3 AND "B"."BLOCKNO"<=:B4 AND "B"."SCN">=:B11 AND "B"."SCN"<=:B10 AND "B"."CKP_ID

">=:B9 AND ("B"."CKP_ID"<=:B8 OR "B"."DBINC_KEY"<>:B7) AND ("B"."SCN"<:B6 OR "B"."CKP_ID"=:B5) ORDER BY "B"."BLOCKNO","B"."SCN",

"B"."CKP_ID","B"."CHUNKNO"

SQL>

SQL> select sql_fulltext from gv$sqlarea where inst_id = 2 and sql_id = '8t81c0j1w9jqu';

SQL_FULLTEXT

--------------------------------------------------------------------------------------------------------------------------------

SELECT NVL(MAX(BLOCKNO), :B1 ), COUNT(*) FROM (SELECT /*+

                 QB_NAME(nbr)

                 INDEX_RS_ASC(@nbr b@nbr)

                 NO_INDEX_FFS(@nbr b@nbr)

                 NO_INDEX_SS(@nbr b@nbr)

                 OPT_PARAM('optimizer_dynamic_sampling' 0)

                 OPT_PARAM('_optimizer_adaptive_cursor_sharing' 'false')

                 OPT_PARAM('_optimizer_extended_cursor_sharing_rel' 'none')

                 OPT_PARAM('_optimizer_use_feedback' 'false')

               */ BLOCKNO FROM BLOCKS B WHERE DF_KEY = :B3 AND BLOCKNO BETWEEN :B2 AND :B1 ORDER BY BLOCKNO) WHERE ROWNUM <= :B4

SQL>
As you can see, the sql_id 9ma189ab8x9c7 is responsible to insert into PLANS_DETAILS the blocks that are needed to create this virtual full backup. This is based in SCN, and means that ZDLRA create the index for all blocks that are below the SCN from the backup that was ingested originally. The sql_id brt6uuhzacdnu returns all the blocks that are needed (based on the SCN), and it is the same for sql_id 8t81c0j1w9jqu that verify if we have a block to index. These sql’s are the base for the q_restore_fast and they alternate itself until we reach 100%.
The idea for ZDLRA in this phase is to create the index that will be the base for the virtual full backup. And “create the index” means all the blocks that are needed to create the plan for this virtual full backup key.
INDEX_BACKUP, 100%
So, after the INDEX_BACKUP finish at ZDLRA, we have this at rman catalog:
RMAN> list backup of datafile 29 tag = TAG20190816T150116;

List of Backup Sets

===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

52146235 Incr 1  28.00M     SBT_TAPE    00:01:44     2019-08-16_15-03-09

        BP Key: 52146236   Status: AVAILABLE  Compressed: YES  Tag: TAG20190816T150116

        Handle: VB$_90959062_52141864I   Media:

  List of Datafiles in backup set 52146235

  File LV Type Ckp SCN    Ckp Time            Name

  ---- -- ---- ---------- ------------------- ----

  29   1  Incr 4932560891039 2019-08-16_15-01-25 +DATAC1/simon_x6s/datafile/simontsthistoric1_tbs.399.938192975

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

52152458 Incr 0  12.67T     SBT_TAPE    00:01:44     2019-08-16_15-03-09

        BP Key: 52152459   Status: AVAILABLE  Compressed: YES  Tag: TAG20190816T150116

        Handle: VB$_90959062_52141864_29   Media:

  List of Datafiles in backup set 52152458

  File LV Type Ckp SCN    Ckp Time            Name

  ---- -- ---- ---------- ------------------- ----

  29   0  Incr 4932560891039 2019-08-16_15-01-25 +DATAC1/simon_x6s/datafile/simontsthistoric1_tbs.399.938192975

RMAN>
Look that for the same TAG we have now two backups, and one it is the virtual full backup. Check that SCN and TAG for both are the same. And if we check internally, at rman catalog view, about the backup pieces linked to the virtual backup key that was created by the index task we can see:
SQL> select bp_key, bs_key, tag, handle, bytes/1024/1024/1024, vb_key from bp where vb_key = 52141864;

    BP_KEY     BS_KEY TAG                 HANDLE                    BYTES/1024/1024/1024     VB_KEY

---------- ---------- ------------------- ------------------------- -------------------- ----------

  52152459   52152458 TAG20190816T150116  VB$_90959062_52141864_29            12975.3698   52141864

  52146236   52146235 TAG20190816T150116  VB$_90959062_52141864I               .02734375   52141864

SQL>
Look above that now we have two backups linked to the same virtual full backup (compare with the same SQL from the previous phases). The backup set key 52152458 is the virtual full backup and was generated during the phase q_restore_fast. The backup set key 52146235 was generated during the phase fixup_unordered.
And there is now, two backups for this datafile:
SQL> SELECT bdf_key, bs_key, file#, ckp_scn, incr_level from bdf where CKP_SCN = 4932560891039 and file# = 29;

   BDF_KEY     BS_KEY      FILE#         CKP_SCN INCR_LEVEL

---------- ---------- ---------- --------------- ----------

  52146237   52146235         29   4932560891039          1

  52152460   52152458         29   4932560891039          0

SQL>
Just to show that the task took a lot of time to finish:
SQL> select rt.elapsed_seconds from ra_task rt where task_id = 56242962;

ELAPSED_SECONDS

---------------

     14563.7986

SQL>

SQL> select count(*) from plans_details where VB_KEY = 52141864;

  COUNT(*)

----------

  74505579

SQL>
INDEX_BACKUP, The internals
As you can see above, the INDEX_BACKUP task it is responsible to generate the virtual full backup and “fix” the rman catalog views to represent the new backups. This is done in two major phases (fixup_unordered and q_restore_fast) to read the backup that was ingested at ZDLRA and index all the blocks. The other phases are process_allfiles and plan_blocks, but they are fast to execute.
About the blocks, it is important to hint that it is completely based in SCN/CKP number. The index creation will search for all blocks that are bellow of the SCN of ingested backup. If you check the details, the backup file does not exist, by the way, it is just a huge list of the blocks need to this SCN (information stored at plans_details table).
 
The procedures, SQL, steps, phases that I showed before will have different values in your case. The DF_KEY, BS_KEY, and others will be different. But I think that you can understand the logic of how ZDLRA index the backup and internally generate the virtual full backup. I know that it is not easy to read all the numbers and link between sql’s and tables, but the logic it is simple: verify all the blocks that belong to datafile and create one plan that points to every block needed by the virtual full backup for one scn.
 

Disclaimer: “The postings on this site are my own and don’t necessarily represent my actual employer positions, strategies or opinions. The information here was edited to be useful for general purpose, specific data and identifications were removed to allow reach the generic audience and to be useful for the community.”


ZDLRA, Virtual Full Backup and Incremental Forever
Category: Engineer System Author: Fernando Simon (Board Member) Date: 5 years ago Comments: 0

ZDLRA, Virtual Full Backup and Incremental Forever

One of the most knows features of ZDLRA is the virtual full backup, basically incremental forever strategy. But what this means in real life? In this post, I will show some details about that and how interesting they are, check what it is Virtual Full Backup and Incremental Forever strategy for ZDLRA.
This post is based on my previous one where I showed all the steps to configure the VPC and enroll database at ZDLRA. 

 

Virtual Full Backup

 

A virtual full backup appears as an incremental level 0 backup in the recovery catalog. From the user’s perspective, a virtual full backup is indistinguishable from a non-virtual full backup. Using virtual backups, Recovery Appliance provides the protection of frequent level 0 backups with only the cost of frequent level 1 backups.

 

 

 

This definition (and image) are in the Zero Data Loss Recovery Appliance Administrator’s Guide and I think that represents the essence of the virtual full backup. ZDLRA receive the incremental level 1 backup, index it, and generate a level 0 to you that it is indistinguishable from a normal backup level 0.
As you can see, virtual full are deeply linked with incremental forever strategy (that it is just executing incremental backups). And based in these incremental backups you receive a full backup available for usage.
To start, I open RMAN and connect in the rman catalog (ZDLRA database, using the VPC configured) and execute a level 0 backup:

 

RMAN> RUN {

2> BACKUP INCREMENTAL LEVEL 0 DEVICE TYPE SBT FILESPERSET 1 DATABASE TAG 'BKP-DB-INC0';

3> SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';

4> BACKUP DEVICE TYPE SBT FILESPERSET 100 FORMAT '%U' ARCHIVELOG ALL NOT BACKED UP TAG 'BKP-ARCH';

5> }




Starting backup at 15-08-2019_00:44:36

allocated channel: ORA_SBT_TAPE_1

channel ORA_SBT_TAPE_1: SID=100 device type=SBT_TAPE

channel ORA_SBT_TAPE_1: RA Library (ZDLRA) SID=901C8083732A1691E053010310AC46B7

channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL18/system01.dbf

channel ORA_SBT_TAPE_1: starting piece 1 at 15-08-2019_00:44:38

channel ORA_SBT_TAPE_1: finished piece 1 at 15-08-2019_00:47:23

piece handle=ORCL18_0tu97pnm_1_1 tag=BKP-DB-INC0 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:02:45

channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL18/sysaux01.dbf

channel ORA_SBT_TAPE_1: starting piece 1 at 15-08-2019_00:47:24

channel ORA_SBT_TAPE_1: finished piece 1 at 15-08-2019_00:48:59

piece handle=ORCL18_0uu97pss_1_1 tag=BKP-DB-INC0 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:01:35

channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL18/undotbs01.dbf

channel ORA_SBT_TAPE_1: starting piece 1 at 15-08-2019_00:48:59

channel ORA_SBT_TAPE_1: finished piece 1 at 15-08-2019_00:49:02

piece handle=ORCL18_0vu97pvr_1_1 tag=BKP-DB-INC0 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:03

channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00007 name=/u01/app/oracle/oradata/ORCL18/users01.dbf

channel ORA_SBT_TAPE_1: starting piece 1 at 15-08-2019_00:49:02

channel ORA_SBT_TAPE_1: finished piece 1 at 15-08-2019_00:49:05

piece handle=ORCL18_10u97pvu_1_1 tag=BKP-DB-INC0 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:03

Finished backup at 15-08-2019_00:49:05




Starting Control File and SPFILE Autobackup at 15-08-2019_00:49:05

piece handle=c-3914023082-20190815-02 comment=API Version 2.0,MMS Version 12.2.0.2

Finished Control File and SPFILE Autobackup at 15-08-2019_00:49:22




sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT




Starting backup at 15-08-2019_00:49:28

current log archived

using channel ORA_SBT_TAPE_1

skipping archived logs of thread 1 from sequence 4 to 9; already backed up

channel ORA_SBT_TAPE_1: starting archived log backup set

channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=10 RECID=7 STAMP=1016326166

input archived log thread=1 sequence=11 RECID=8 STAMP=1016326170

channel ORA_SBT_TAPE_1: starting piece 1 at 15-08-2019_00:49:32

channel ORA_SBT_TAPE_1: finished piece 1 at 15-08-2019_00:49:35

piece handle=12u97q0s_1_1 tag=BKP-ARCH comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:03

Finished backup at 15-08-2019_00:49:35




Starting Control File and SPFILE Autobackup at 15-08-2019_00:49:35

piece handle=c-3914023082-20190815-03 comment=API Version 2.0,MMS Version 12.2.0.2

Finished Control File and SPFILE Autobackup at 15-08-2019_00:49:51




RMAN>

RMAN> list backup of datafile 1;







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2222    Incr 0  748.50M    SBT_TAPE    00:02:32     15-08-2019_00:47:10

        BP Key: 2223   Status: AVAILABLE  Compressed: NO  Tag: BKP-DB-INC0

        Handle: ORCL18_0tu97pnm_1_1   Media: Recovery Appliance (ZDLRA)

  List of Datafiles in backup set 2222

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1614233    15-08-2019_00:44:39              NO    /u01/app/oracle/oradata/ORCL18/system01.dbf




RMAN>

 

As you can see a simple incremental level 0 backup, archive log generation, and backup. ZDLRA after receive this backup start to index it to generate the base level 0. If you go to ZDLRA database you can see:

 

SQL> select TASK_ID, TASK_TYPE, STATE, WAITING_ON, DB_KEY, DB_UNIQUE_NAME, CREATION_TIME, ERROR_COUNT, DF_KEY, BS_KEY, BP_KEY, VB_KEY from rasys.ra_task where archived = 'N';




   TASK_ID TASK_TYPE            STATE           WAITING_ON     DB_KEY DB_UNIQUE_NAME                 CREATION_TIME                       ERROR_COUNT     DF_KEY     BS_KEY     BP_KEY     VB_KEY

---------- -------------------- --------------- ---------- ---------- ------------------------------ ----------------------------------- ----------- ---------- ---------- ---------- ----------

      9626 INDEX_BACKUP         RUNNING                          1527 ORCL18                         15-AUG-19 12.47.12.479004 AM +02:00           0                             2223

      9627 INDEX_BACKUP         EXECUTABLE                       1527 ORCL18                         15-AUG-19 12.48.56.229219 AM +02:00           0                             2228

      9628 INDEX_BACKUP         EXECUTABLE                       1527 ORCL18                         15-AUG-19 12.49.02.200951 AM +02:00           0                             2232

      9629 INDEX_BACKUP         EXECUTABLE                       1527 ORCL18                         15-AUG-19 12.49.04.895727 AM +02:00           0                             2236




4 rows selected.




SQL>
Above look the task INDEX_BACKUP running BS_KEY 2223, and check that it is the same backupset for datafile 1 that I showed before (I executed the list backup for datafile 1 just after the backup finish). And while the INDEX_BACKUP task still running you can see check again the list backupset for datafile 1 at rman:

 

RMAN>  list backup of datafile 1;







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2222    Incr 0  748.50M    SBT_TAPE    00:02:32     15-08-2019_00:47:10

        BP Key: 2223   Status: AVAILABLE  Compressed: NO  Tag: BKP-DB-INC0

        Handle: ORCL18_0tu97pnm_1_1   Media: Recovery Appliance (ZDLRA)

  List of Datafiles in backup set 2222

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1614233    15-08-2019_00:44:39              NO    /u01/app/oracle/oradata/ORCL18/system01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2336    Incr 0  329.21M    SBT_TAPE    00:02:34     15-08-2019_00:47:12

        BP Key: 2337   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC0

        Handle: VB$_4142545763_2226I   Media:

  List of Datafiles in backup set 2336

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1614233    15-08-2019_00:44:39              NO    /u01/app/oracle/oradata/ORCL18/system01.dbf




RMAN>

 

Look how interesting it is. Now you have a new backupset (BS key 2336) that it is a clone for the original. Have same SCN, same TAG, same completion time, and size. The only difference is the handle that has the ZDLRA pattern VB$_*. And after some tasks inside ZDLRA finish (like RM_INC_FILES and RUN_PURGE_DF) you have just one backup of datafile 1:

 

RMAN> list backup of datafile 1;







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2336    Incr 0  329.21M    SBT_TAPE    00:02:34     15-08-2019_00:47:12

        BP Key: 2337   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC0

        Handle: VB$_4142545763_2226I   Media:

  List of Datafiles in backup set 2336

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1614233    15-08-2019_00:44:39              NO    /u01/app/oracle/oradata/ORCL18/system01.dbf




RMAN>
As I told in my previous post, ZDLRA has the ability to open your backupset and index every block for your datafile, and more important: validated every block for each datafile.

 

Incremental Forever

 

Above was just for the initial level 0 backup, and it is not “incremental forever”. But if you do an incremental level 1 backup (I cropped the output to reduce the post size but it was just: BACKUP INCREMENTAL LEVEL 1 DEVICE TYPE SBT FILESPERSET 1 DATABASE TAG ‘BKP-DB-INC1’;. Check the list backup after that:
 
RMAN> list backup of datafile 1;







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2336    Incr 0  329.21M    SBT_TAPE    00:02:34     15-08-2019_00:47:12

        BP Key: 2337   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC0

        Handle: VB$_4142545763_2226I   Media:

  List of Datafiles in backup set 2336

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1614233    15-08-2019_00:44:39              NO    /u01/app/oracle/oradata/ORCL18/system01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2589    Incr 1  48.00K     SBT_TAPE    00:00:02     15-08-2019_00:58:00

        BP Key: 2590   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC1

        Handle: VB$_4142545763_2588I   Media:

  List of Datafiles in backup set 2589

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    1  Incr 1614888    15-08-2019_00:57:59              NO    /u01/app/oracle/oradata/ORCL18/system01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2644    Incr 0  328.08M    SBT_TAPE    00:00:02     15-08-2019_00:58:00

        BP Key: 2645   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC1

        Handle: VB$_4142545763_2588_1   Media:

  List of Datafiles in backup set 2644

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1614888    15-08-2019_00:57:59              NO    /u01/app/oracle/oradata/ORCL18/system01.dbf




RMAN>

 

Look the details above. Inside of rman catalog at ZDLRA was made available to you a new level 0 backup that it is the virtual full backup. This level 0 have the same SCN than the incremental level 1.
So, basically, ZDLRA opened the backup incremental level 1 that you sent, read all the blocks, index it and based in the previous backup level 0 that was available (virtual or not – this is important) merged the block and present to you a new level 0. And if you do this every day, after an incremental level 1 you receive a complete virtual full backup.
In real life, it is simple like that. Again, check how interesting it is, you have now one backup level 0 available after the incremental that have a new backupset (BS key 2644) that it is a merge from the incremental level 1 (backupset 2589) with the previous level 0 (backupset 2636). And have the same SCN, same TAG, same completion time that the incremental level 1.
Some details that you need to take care of this. If you use rman encryption virtual full backups will not work. For TDE, you can use it, not a problem. But you can’t use TDE with rman compression enabled. Check  here. The recommendation too is using FILESPERSET 1 while doing the backup. This is good because reduce some overhead inside of ZDLRA (to open every backup and split it), and reduce pollution inside rman catalog list backup (if you sent a backup without fileperset, ZDLRA does not remove it from the list).
If I do a backup without filersperset the ZDLRA will open the bakupset and generate a virtual full for each datafile that it is inside of the original backupset. Check below that SCN is the same than incremental level 1:

 

RMAN> list backup of database completed after "sysdate - 5/1440";







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2905    Incr 1  1.26M      SBT_TAPE    00:00:08     15-08-2019_01:04:28

        BP Key: 2906   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC1

        Handle: VB$_4142545763_2827I   Media:

  List of Datafiles in backup set 2905

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    1  Incr 1615589    15-08-2019_01:04:20              NO    /u01/app/oracle/oradata/ORCL18/system01.dbf

  3    1  Incr 1615589    15-08-2019_01:04:20              NO    /u01/app/oracle/oradata/ORCL18/sysaux01.dbf

  4    1  Incr 1615589    15-08-2019_01:04:20              NO    /u01/app/oracle/oradata/ORCL18/undotbs01.dbf

  7    1  Incr 1615589    15-08-2019_01:04:20              NO    /u01/app/oracle/oradata/ORCL18/users01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2992    Incr 0  328.09M    SBT_TAPE    00:00:08     15-08-2019_01:04:28

        BP Key: 2993   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC1

        Handle: VB$_4142545763_2827_1   Media:

  List of Datafiles in backup set 2992

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1615589    15-08-2019_01:04:20              NO    /u01/app/oracle/oradata/ORCL18/system01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

2996    Incr 0  40.00K     SBT_TAPE    00:00:08     15-08-2019_01:04:28

        BP Key: 2997   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC1

        Handle: VB$_4142545763_2827_7   Media:

  List of Datafiles in backup set 2996

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  7    0  Incr 1615589    15-08-2019_01:04:20              NO    /u01/app/oracle/oradata/ORCL18/users01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

3000    Incr 0  480.00K    SBT_TAPE    00:00:08     15-08-2019_01:04:28

        BP Key: 3001   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC1

        Handle: VB$_4142545763_2827_4   Media:

  List of Datafiles in backup set 3000

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  4    0  Incr 1615589    15-08-2019_01:04:20              NO    /u01/app/oracle/oradata/ORCL18/undotbs01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

3004    Incr 0  135.47M    SBT_TAPE    00:00:08     15-08-2019_01:04:28

        BP Key: 3005   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC1

        Handle: VB$_4142545763_2827_3   Media:

  List of Datafiles in backup set 3004

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  3    0  Incr 1615589    15-08-2019_01:04:20              NO    /u01/app/oracle/oradata/ORCL18/sysaux01.dbf




RMAN>
The virtual backup continue to work if you use the SECTION SIZE (it is recommended by the way, especially for huge databases). Look the example:

 

[oracle@orcloel7 ~]$ sqlplus / as sysdba




SQL*Plus: Release 18.0.0.0.0 - Production on Thu Aug 15 01:11:58 2019

Version 18.6.0.0.0




Copyright (c) 1982, 2018, Oracle.  All rights reserved.







Connected to:

Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

Version 18.6.0.0.0




SQL> create tablespace simon datafile '/u01/app/oracle/oradata/ORCL18/simon.dbf' size 1G;




Tablespace created.




SQL> exit

Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

Version 18.6.0.0.0

[oracle@orcloel7 ~]$ rman target=/ catalog=cat_zdlra/s3nhazdlra@zdlra




Recovery Manager: Release 18.0.0.0.0 - Production on Thu Aug 15 01:15:24 2019

Version 18.6.0.0.0




Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved.




connected to target database: ORCL18 (DBID=3914023082)

connected to recovery catalog database

PL/SQL package CAT_ZDLRA.DBMS_RCVCAT version 18.03.00.00. in RCVCAT database is not current

PL/SQL package CAT_ZDLRA.DBMS_RCVMAN version 18.03.00.00 in RCVCAT database is not current




RMAN> report schema;




starting full resync of recovery catalog

full resync complete

Report of database schema for database with db_unique_name ORCL18




List of Permanent Datafiles

===========================

File Size(MB) Tablespace           RB segs Datafile Name

---- -------- -------------------- ------- ------------------------

1    870      SYSTEM               YES     /u01/app/oracle/oradata/ORCL18/system01.dbf

3    510      SYSAUX               NO      /u01/app/oracle/oradata/ORCL18/sysaux01.dbf

4    320      UNDOTBS1             YES     /u01/app/oracle/oradata/ORCL18/undotbs01.dbf

5    1024     SIMON                NO      /u01/app/oracle/oradata/ORCL18/simon.dbf

7    5        USERS                NO      /u01/app/oracle/oradata/ORCL18/users01.dbf




List of Temporary Files

=======================

File Size(MB) Tablespace           Maxsize(MB) Tempfile Name

---- -------- -------------------- ----------- --------------------

1    49       TEMP                 32767       /u01/app/oracle/oradata/ORCL18/temp01.dbf




RMAN> BACKUP INCREMENTAL LEVEL 0 SECTION SIZE 250M DEVICE TYPE SBT DATAFILE 5 TAG 'BKP-DBF5-INC0';




Starting backup at 15-08-2019_01:16:35

allocated channel: ORA_SBT_TAPE_1

channel ORA_SBT_TAPE_1: SID=68 device type=SBT_TAPE

channel ORA_SBT_TAPE_1: RA Library (ZDLRA) SID=901CF26E504F1E35E053010310AC27EC

channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 1 through 32000

channel ORA_SBT_TAPE_1: starting piece 1 at 15-08-2019_01:16:37

channel ORA_SBT_TAPE_1: finished piece 1 at 15-08-2019_01:16:38

piece handle=ORCL18_1fu97rjl_1_1 tag=BKP-DBF5-INC0 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01

channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 32001 through 64000

channel ORA_SBT_TAPE_1: starting piece 2 at 15-08-2019_01:16:38

channel ORA_SBT_TAPE_1: finished piece 2 at 15-08-2019_01:16:39

piece handle=ORCL18_1fu97rjl_2_1 tag=BKP-DBF5-INC0 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01

channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 64001 through 96000

channel ORA_SBT_TAPE_1: starting piece 3 at 15-08-2019_01:16:39

channel ORA_SBT_TAPE_1: finished piece 3 at 15-08-2019_01:16:42

piece handle=ORCL18_1fu97rjl_3_1 tag=BKP-DBF5-INC0 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:03

channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 96001 through 128000

channel ORA_SBT_TAPE_1: starting piece 4 at 15-08-2019_01:16:42

channel ORA_SBT_TAPE_1: finished piece 4 at 15-08-2019_01:16:43

piece handle=ORCL18_1fu97rjl_4_1 tag=BKP-DBF5-INC0 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01

channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 128001 through 131072

channel ORA_SBT_TAPE_1: starting piece 5 at 15-08-2019_01:16:43

channel ORA_SBT_TAPE_1: finished piece 5 at 15-08-2019_01:16:44

piece handle=ORCL18_1fu97rjl_5_1 tag=BKP-DBF5-INC0 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01

Finished backup at 15-08-2019_01:16:44




Starting Control File and SPFILE Autobackup at 15-08-2019_01:16:44

piece handle=c-3914023082-20190815-08 comment=API Version 2.0,MMS Version 12.2.0.2

Finished Control File and SPFILE Autobackup at 15-08-2019_01:16:52




RMAN> list backup of datafile 5;







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

3244    Incr 0  208.00K    SBT_TAPE    00:00:08     15-08-2019_01:16:45

  List of Datafiles in backup set 3244

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  5    0  Incr 1616756    15-08-2019_01:16:37              NO    /u01/app/oracle/oradata/ORCL18/simon.dbf




  Backup Set Copy #1 of backup set 3244

  Device Type Elapsed Time Completion Time     Compressed Tag

  ----------- ------------ ------------------- ---------- ---

  SBT_TAPE    00:00:08     15-08-2019_01:16:45 YES        BKP-DBF5-INC0




    List of Backup Pieces for backup set 3244 Copy #1

    BP Key  Pc# Status      Media                   Piece Name

    ------- --- ----------- ----------------------- ----------

    3245    1   AVAILABLE                           VB$_4142545763_3227I

    3250    2   AVAILABLE                           VB$_4142545763_3248I

    3255    3   AVAILABLE                           VB$_4142545763_3253I

    3260    4   AVAILABLE                           VB$_4142545763_3258I

    3272    5   AVAILABLE                           VB$_4142545763_3270I




RMAN> BACKUP INCREMENTAL LEVEL 1 SECTION SIZE 250M DEVICE TYPE SBT DATAFILE 5 TAG 'BKP-DBF5-INC1';




Starting backup at 15-08-2019_01:20:01

using channel ORA_SBT_TAPE_1

channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 1 through 32000

channel ORA_SBT_TAPE_1: starting piece 1 at 15-08-2019_01:20:02

channel ORA_SBT_TAPE_1: finished piece 1 at 15-08-2019_01:20:03

piece handle=ORCL18_1lu97rq2_1_1 tag=BKP-DBF5-INC1 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01

channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 32001 through 64000

channel ORA_SBT_TAPE_1: starting piece 2 at 15-08-2019_01:20:03

channel ORA_SBT_TAPE_1: finished piece 2 at 15-08-2019_01:20:10

piece handle=ORCL18_1lu97rq2_2_1 tag=BKP-DBF5-INC1 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:07

channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 64001 through 96000

channel ORA_SBT_TAPE_1: starting piece 3 at 15-08-2019_01:20:10

channel ORA_SBT_TAPE_1: finished piece 3 at 15-08-2019_01:20:11

piece handle=ORCL18_1lu97rq2_3_1 tag=BKP-DBF5-INC1 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01

channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 96001 through 128000

channel ORA_SBT_TAPE_1: starting piece 4 at 15-08-2019_01:20:11

channel ORA_SBT_TAPE_1: finished piece 4 at 15-08-2019_01:20:12

piece handle=ORCL18_1lu97rq2_4_1 tag=BKP-DBF5-INC1 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01

channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

backing up blocks 128001 through 131072

channel ORA_SBT_TAPE_1: starting piece 5 at 15-08-2019_01:20:12

channel ORA_SBT_TAPE_1: finished piece 5 at 15-08-2019_01:20:13

piece handle=ORCL18_1lu97rq2_5_1 tag=BKP-DBF5-INC1 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01

Finished backup at 15-08-2019_01:20:13




Starting Control File and SPFILE Autobackup at 15-08-2019_01:20:13

piece handle=c-3914023082-20190815-09 comment=API Version 2.0,MMS Version 12.2.0.2

Finished Control File and SPFILE Autobackup at 15-08-2019_01:20:21




RMAN> list backup of datafile 5;







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

3244    Incr 0  208.00K    SBT_TAPE    00:00:08     15-08-2019_01:16:45

  List of Datafiles in backup set 3244

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  5    0  Incr 1616756    15-08-2019_01:16:37              NO    /u01/app/oracle/oradata/ORCL18/simon.dbf




  Backup Set Copy #1 of backup set 3244

  Device Type Elapsed Time Completion Time     Compressed Tag

  ----------- ------------ ------------------- ---------- ---

  SBT_TAPE    00:00:08     15-08-2019_01:16:45 YES        BKP-DBF5-INC0




    List of Backup Pieces for backup set 3244 Copy #1

    BP Key  Pc# Status      Media                   Piece Name

    ------- --- ----------- ----------------------- ----------

    3245    1   AVAILABLE                           VB$_4142545763_3227I

    3250    2   AVAILABLE                           VB$_4142545763_3248I

    3255    3   AVAILABLE                           VB$_4142545763_3253I

    3260    4   AVAILABLE                           VB$_4142545763_3258I

    3272    5   AVAILABLE                           VB$_4142545763_3270I




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

3355    Incr 1  200.00K    SBT_TAPE    00:00:12     15-08-2019_01:20:14

  List of Datafiles in backup set 3355

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  5    1  Incr 1616986    15-08-2019_01:20:02              NO    /u01/app/oracle/oradata/ORCL18/simon.dbf




  Backup Set Copy #1 of backup set 3355

  Device Type Elapsed Time Completion Time     Compressed Tag

  ----------- ------------ ------------------- ---------- ---

  SBT_TAPE    00:00:12     15-08-2019_01:20:14 YES        BKP-DBF5-INC1




    List of Backup Pieces for backup set 3355 Copy #1

    BP Key  Pc# Status      Media                   Piece Name

    ------- --- ----------- ----------------------- ----------

    3356    1   AVAILABLE                           VB$_4142545763_3354I

    3406    2   AVAILABLE                           VB$_4142545763_3404I

    3415    3   AVAILABLE                           VB$_4142545763_3413I

    3424    4   AVAILABLE                           VB$_4142545763_3422I

    3433    5   AVAILABLE                           VB$_4142545763_3431I




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

3359    Incr 0  132.50K    SBT_TAPE    00:00:12     15-08-2019_01:20:14

  List of Datafiles in backup set 3359

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  5    0  Incr 1616986    15-08-2019_01:20:02              NO    /u01/app/oracle/oradata/ORCL18/simon.dbf




  Backup Set Copy #1 of backup set 3359

  Device Type Elapsed Time Completion Time     Compressed Tag

  ----------- ------------ ------------------- ---------- ---

  SBT_TAPE    00:00:12     15-08-2019_01:20:14 YES        BKP-DBF5-INC1




    List of Backup Pieces for backup set 3359 Copy #1

    BP Key  Pc# Status      Media                   Piece Name

    ------- --- ----------- ----------------------- ----------

    3360    1   AVAILABLE                           VB$_4142545763_3354_5

    3410    2   AVAILABLE                           VB$_4142545763_3404_5

    3419    3   AVAILABLE                           VB$_4142545763_3413_5

    3428    4   AVAILABLE                           VB$_4142545763_3422_5

    3437    5   AVAILABLE                           VB$_4142545763_3431_5




RMAN>

 

As you can see, I created a tablespace and made backup level 0 (and 1) with section size. And after the index was created a virtual full backup, based on the incremental, for each size. This speed up the restore phase because you can parallelize it (instead if you use a single backupset). ZDLRA will “fix” if you made an incremental level 1 without section size:

 

RMAN> BACKUP INCREMENTAL LEVEL 1 DEVICE TYPE SBT DATAFILE 5 TAG 'BKP-DBF5-INC1';




Starting backup at 15-08-2019_01:23:17

using channel ORA_SBT_TAPE_1

channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL18/simon.dbf

channel ORA_SBT_TAPE_1: starting piece 1 at 15-08-2019_01:23:17

channel ORA_SBT_TAPE_1: finished piece 1 at 15-08-2019_01:23:18

piece handle=ORCL18_1ru97s05_1_1 tag=BKP-DBF5-INC1 comment=API Version 2.0,MMS Version 12.2.0.2

channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01

Finished backup at 15-08-2019_01:23:18




Starting Control File and SPFILE Autobackup at 15-08-2019_01:23:19

piece handle=c-3914023082-20190815-0a comment=API Version 2.0,MMS Version 12.2.0.2

Finished Control File and SPFILE Autobackup at 15-08-2019_01:23:26




RMAN> list backup of datafile 5 completed after "sysdate - 3/1440";







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

3572    Incr 1  40.00K     SBT_TAPE    00:00:02     15-08-2019_01:23:19

        BP Key: 3573   Status: AVAILABLE  Compressed: YES  Tag: BKP-DBF5-INC1

        Handle: VB$_4142545763_3571I   Media:

  List of Datafiles in backup set 3572

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  5    1  Incr 1617208    15-08-2019_01:23:18              NO    /u01/app/oracle/oradata/ORCL18/simon.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

3581    Incr 0  132.50K    SBT_TAPE    00:00:02     15-08-2019_01:23:19

  List of Datafiles in backup set 3581

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  5    0  Incr 1617208    15-08-2019_01:23:18              NO    /u01/app/oracle/oradata/ORCL18/simon.dbf




  Backup Set Copy #1 of backup set 3581

  Device Type Elapsed Time Completion Time     Compressed Tag

  ----------- ------------ ------------------- ---------- ---

  SBT_TAPE    00:00:02     15-08-2019_01:23:19 YES        BKP-DBF5-INC1




    List of Backup Pieces for backup set 3581 Copy #1

    BP Key  Pc# Status      Media                   Piece Name

    ------- --- ----------- ----------------------- ----------

    3582    1   AVAILABLE                           VB$_4142545763_3576_5

    3586    2   AVAILABLE                           VB$_4142545763_3577_5

    3590    3   AVAILABLE                           VB$_4142545763_3578_5

    3594    4   AVAILABLE                           VB$_4142545763_3579_5

    3598    5   AVAILABLE                           VB$_4142545763_3580_5




RMAN>

 

Look that ZDLRA opened the incremental level that was sent (without section size) index it and after that generated a level 0 (that originally was done with section size) and created a virtual full backup correctly
You can see here (Output-Full-Execution-Backup-Level-0-and-Backup-Level-1) a full execution for backup level 0, subsequent levels 1, to verify the generation of virtual full backups and the incremental forever strategy. Check the SCN, creation times for backups 0 that appear in the list after I create a backup level 1.

 

Virtual Full backup, Incremental forever, and Backup Strategy 

 

Virtual full backups change completely the backup strategy for your database. The incremental forever strategy starts it the key point so save you for a lot of problems.
If you start to check your backup strategy, there are a lot of details to verify. So, what it is your backup strategy? Full every weekend plus incremental every day? What it is the load for your backup appliance? And how many times do you pass doing the backup? If you have a huge database, maybe a full every weekend it is impossible, and you need to sparse in the month (1 time per month is feasible).
But the most important, the time to recover and validate the backup? You need to restore the full (form last week as an example), and all the incremental + plus archives since that. This can be really time-consuming.
But if you can do everything with a single incremental level 1 every day? You receive a full backup, that was validated by ZDLRA, and per datafile data you have. If ZDLRA detects corrupted blocks it advises you about that. The incremental forever strategy help in other places too. The overhead over the network decrease a lot (just pass incremental). The time consumption for CPU inside of database too.
Now think the restore of the database. If you need to do one restore in the middle of the week you need to use the nearest level 0 that cover your request (probably done during the weekend) and apply some days incremental and archivelogs. For ZDLRA, you have one level 0 one day before available and just need to recover just a few archives.
The base idea here is that ZDLRA it is the only appliance that delivers to you a backup full (virtual full backup, as they call) after every incremental backup that you do. This approach is called incremental forever. And even besides that, ZDLRA it is the only one that open correctly what rman sent to you (filesperset or no, section size, compressed or no) and verifies every block of datafile inside, index it, and deliver to you a validated backupset. And as you saw, in the examples before, everything related with catalog it is done automatically by ZDLRA (backup deletion and others).
In the next post, I will show you more details about what’s happens inside of ZDLRA when it receives the incremental backup. The internal tasks and where it’s store the information about the virtual backups.
 
 

Disclaimer: “The postings on this site are my own and don’t necessarily represent my actual employer positions, strategies or opinions. The information here was edited to be useful for general purpose, specific data and identifications were removed to allow reach the generic audience and to be useful for the community.”

 


1 14 15 16 17 18 32