RMAN point in time pdb restore (using duplicate), gives error due issue with different pdb. Using Oracle 12.1.0.2.0
This is the restore command, I was using:
Error [1] faced, due to another pdb issue
Workaround, not using catalog
Error [2] now faced, due to missing arc
Workaround
Appendix:
Appendix: error
rman auxiliary / catalog rmanuser/password1@CATDB
run{
set UNTIL TIME "to_date('2018-07-15 00:00:01','YYYY-MM-DD HH24:MI:SS')" ;
DUPLICATE DATABASE 'proddb2' TO 'NI_REST' PLUGGABLE DATABASE CUSTX_PDB;
}
Error [1] faced, due to another pdb issue
Skipping pluggable database CUST_PDB5
Skipping pluggable database CUST_PDB6
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/06/2018 16:44:40
RMAN-05501: aborting duplication of target database
RMAN-06813: could not translate pluggable database STG_CUSTYPDB
Workaround, not using catalog
rman auxiliary / target sys/password2@proddb2
run{
set UNTIL TIME "to_date('2018-07-15 00:00:01','YYYY-MM-DD HH24:MI:SS')" ;
DUPLICATE DATABASE TO 'NI_REST' PLUGGABLE DATABASE CUSTX_PDB;
}
Error [2] now faced, due to missing arc
Executing: alter database datafile 832 offline drop
Executing: alter database datafile 833 offline drop
Executing: alter database datafile 834 offline drop
starting media recovery
unable to find archived log
archived log thread=1 sequence=13054
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 3 needs more recovery to be consistent
ORA-01110: data file 3: '+DATA/NI_REST/DATAFILE/sysaux.675.986210261'
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/07/2018 13:24:29
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 13054 and starting SCN of 7885151161
RMAN>
Workaround
- Restored around 15 archive log, starting from above sequence (13054, also for thread 2)
- Redone the RMAN clone command
- Opening db gave error with control file
- Create backup control file, used RESETLOGS block
- Removed all non NI_REST datafiles
- Kept only 3 LOGFILE, they do not exits on filesystem
- Run the backup control (notice has parent db name (PRODDB2) and resetlogs)
- Start db with open resetlog
- Opened the pdb successfully
- Recreated the temp file
Appendix:
catalog start with /u01/oracle/product/12102_01/dbs/' noprompt;
alter database backup controlfile to trace as '/home/oracle/mydb_new.ctl.txt';
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "PRODDB2" RESETLOGS ARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 584
LOGFILE
GROUP 1 '+DATA/NI_REST/ONLINELOG/group_1.262.903320613' SIZE 1024M BLOCKSIZE 512,
GROUP 2 '+DATA/NI_REST/ONLINELOG/group_2.263.903320623' SIZE 1024M BLOCKSIZE 512,
GROUP 3 '+DATA/NI_REST/ONLINELOG/group_3.269.903321099' SIZE 1024M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'+DATA/NI_REST/DATAFILE/system.693.986210261',
'+DATA/NI_REST/DATAFILE/sysaux.675.986210261',
'+DATA/NI_REST/DATAFILE/undotbs1.683.986210259',
'+DATA/NI_REST/2B4E02B966694E2CE0533F1C6F0A31F5/DATAFILE/system.461.986212971',
'+DATA/NI_REST/2B4E02B966694E2CE0533F1C6F0A31F5/DATAFILE/sysaux.467.986212969',
'+DATA/NI_REST/DATAFILE/undotbs2.474.986213075',
'+DATA/NI_REST/2DB32189A8D41995E0533F1C6F0A911E/DATAFILE/system.459.986212545',
'+DATA/NI_REST/2DB32189A8D41995E0533F1C6F0A911E/DATAFILE/sysaux.460.986212545',
'+DATA/NI_REST/2DB32189A8D41995E0533F1C6F0A911E/DATAFILE/default_pdb_ts.611.986212545',
'+DATA/NI_REST/2DB32189A8D41995E0533F1C6F0A911E/DATAFILE/users.561.986213451'
CHARACTER SET AL32UTF8
;
alter database OPEN RESETLOGS;
alter tablespace TEMP add tempfie '+DATA' size 150m;
Appendix: error
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-19838: Cannot use this control file to open database
No comments:
Post a Comment