Search This Blog

Total Pageviews

Tuesday 20 August 2024

Rman duplicate pluggable database


  

Rman duplicate pluggable database ...

on same server !!!!

ORCL:/u01/app/oracle/product/19.0.0/dbhome_1:N  

orclcd:/u01/app/oracle/product/19.0.0/dbhome_1:N





ORCL:/u01/app/oracle/product/19.0.0/dbhome_1:N


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO     >>>  aim to duplicate  pluggable database -------------------------------------->

SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0



orclcd:/u01/app/oracle/product/19.0.0/dbhome_1:N

[oracle@ ~]$ . oraenv
ORACLE_SID = [ORCL] ? orclcd
The Oracle base remains unchanged with value /u01/app/oracle


[oracle@ ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Aug 19 12:38:57 2024
Version 19.12.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

SQL>  show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPBB                        READ WRITE NO <<<<< and plug here  <<<------------------------------------------------------------ be="" end="" like="" result="" sql="" this="" would=""> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPBB                        READ WRITE NO
         4 ORCLPDBD                       READ WRITE NO
SQL>




rman

Recovery Manager: Release 19.0.0.0.0 - Production on Tue Aug 20 03:55:26 2024
Version 19.12.0.0.0

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

RMAN> connect target sys/vihaan123@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))

connected to target database: ORCL (DBID=1618442726)

RMAN> connect auxiliary sys/vihaan123@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=orclcd)))

connected to auxiliary database: ORCLCD (DBID=2923364259)

RMAN> DUPLICATE PLUGGABLE DATABASE ORCLPDB as ORCLPDBD TO orclcd FROM ACTIVE DATABASE ;

Starting Duplicate PDB at 20-AUG-24
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=855 device type=DISK
current log archived
duplicating Online logs to Oracle Managed File (OMF) location
duplicating Datafiles to Oracle Managed File (OMF) location
current log archived





contents of Memory Script:
{
   set newname for clone datafile  9 to new;
   set newname for clone datafile  10 to new;
   set newname for clone datafile  11 to new;
   set newname for clone datafile  12 to new;
   restore
   from  nonsparse   clone foreign pluggable database
    "ORCLPDB"
   from service  '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))'   ;
}
executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 20-AUG-24
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring foreign file 9 to +DATA/ORCLCD/D2909A01684E4D42E053F214A8C08735/DATAFILE/system.335.1177474125
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring foreign file 10 to +DATA/ORCLCD/D2909A01684E4D42E053F214A8C08735/DATAFILE/sysaux.334.1177474129
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring foreign file 11 to +DATA/ORCLCD/D2909A01684E4D42E053F214A8C08735/DATAFILE/undotbs1.333.1177474133
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring foreign file 12 to +DATA/ORCLCD/D2909A01684E4D42E053F214A8C08735/DATAFILE/users.332.1177474133
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 20-AUG-24

contents of Memory Script:
{
   set archivelog destination to  '+DATA';
   restore clone force from service  '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))'
           foreign archivelog from scn  78208744;
}
executing Memory Script

executing command: SET ARCHIVELOG DESTINATION

Starting restore at 20-AUG-24
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting archived log restore to user-specified destination
archived log destination=+DATA
channel ORA_AUX_DISK_1: using network backup set from service (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=1925
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02
Finished restore at 20-AUG-24

Performing import of metadata...
Finished Duplicate PDB at 20-AUG-24



===


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPBB                        READ WRITE NO
         4 ORCLPDBD                       READ WRITE NO
SQL>




=======

Error !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


RMAN>  DUPLICATE PLUGGABLE DATABASE ORCLPDB as ORCLPDBD TO orclcd FROM ACTIVE DATABASE SECTION SIZE 400M;   <<<< SECTION SIZE 400M; remove this check output above 

Starting Duplicate PDB at 20-AUG-24
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=607 device type=DISK
current log archived
duplicating Online logs to Oracle Managed File (OMF) location
duplicating Datafiles to Oracle Managed File (OMF) location
current log archived

contents of Memory Script:
{
   set newname for clone datafile  9 to new;
   set newname for clone datafile  10 to new;
   set newname for clone datafile  11 to new;
   set newname for clone datafile  12 to new;
   restore
   from  nonsparse   section size
 400 m   clone foreign pluggable database
    "ORCLPDB"
   from service  '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=  anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))'   ;
}
executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 20-AUG-24
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))
RMAN-03009: failure of IRESTORE command on ORA_AUX_DISK_1 channel at 08/20/2024 03:50:13
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473013' contains an invalid file number
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 9 could not be verified
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473013' contains an invalid file number
continuing other job steps, job failed will not be re-run
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))
RMAN-03009: failure of IRESTORE command on ORA_AUX_DISK_1 channel at 08/20/2024 03:50:13
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473015' contains an invalid file number
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 10 could not be verified
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473015' contains an invalid file number
continuing other job steps, job failed will not be re-run
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))
RMAN-03009: failure of IRESTORE command on ORA_AUX_DISK_1 channel at 08/20/2024 03:50:14
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473017' contains an invalid file number
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 11 could not be verified
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473017' contains an invalid file number
continuing other job steps, job failed will not be re-run
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=anujlab.com)(Port=1521))(CONNECT_DATA=(SID=ORCL)))
RMAN-03009: failure of IRESTORE command on ORA_AUX_DISK_1 channel at 08/20/2024 03:50:14
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473019' contains an invalid file number
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 12 could not be verified
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473019' contains an invalid file number
continuing other job steps, job failed will not be re-run
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate PDB command at 08/20/2024 03:50:14
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script

RMAN-03009: failure of IRESTORE command on ORA_AUX_DISK_1 channel at 08/20/2024 03:50:14
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473019' contains an invalid file number
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 12 could not be verified
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/
RMAN-03009: failure of IRESTORE command on ORA_AUX_DISK_1 channel at 08/20/2024 03:50:14
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473017' contains an invalid file number
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 11 could not be verified
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/
RMAN-03009: failure of IRESTORE command on ORA_AUX_DISK_1 channel at 08/20/2024 03:50:13
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473015' contains an invalid file number
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 10 could not be verified
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/
RMAN-03009: failure of IRESTORE command on ORA_AUX_DISK_1 channel at 08/20/2024 03:50:13
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/DATAFILE/.335.1177473013' contains an invalid file number
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 9 could not be verified
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15122: ASM file name '+DATA/ORCLCD/D





Oracle DBA

anuj blog Archive