[Solved] Issue: ORA-12919: Can not drop the default permanent tablespace during TSPITR

Durante a execução de um Tablespace Point-in-time Recovery, me deparei com o seguinte erro:

[oracle@oel8 TSPITR]$ rman target /
 
Recovery Manager: Release 18.0.0.0.0 - Production on Mon Aug 9 20:24:25 2021
Version 18.13.0.0.0
 
Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved.
 
connected to target database: RMANDB (DBID=3825250984)
 
RMAN> RECOVER TABLESPACE USERS UNTIL TIME "to_date('2021-08-09:20:11:06','YYYY-MM-DD:HH24:MI:SS')" AUXILIARY DESTINATION '/oracle/TSPITR';
 
Starting recover at 2021-08-09:20:24:45
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=119 device type=DISK
RMAN-05026: warning: presuming following set of tablespaces applies to specified point-in-time
 
List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1
 
Creating automatic instance, with SID='lFEs'
 
initialization parameters used for automatic instance:
db_name=RMANDB
db_unique_name=lFEs_pitr_RMANDB
compatible=18.0.0
db_block_size=8192
db_files=200
diagnostic_dest=/oracle/18.0.0/base
_system_trig_enabled=FALSE
sga_target=1536M
processes=200
db_create_file_dest=/oracle/TSPITR
log_archive_dest_1='location=/oracle/TSPITR'
#No auxiliary parameter file used
 
 
starting up automatic instance RMANDB
 
Oracle instance started
 
Total System Global Area    1610612016 bytes
 
Fixed Size                     8658224 bytes
Variable Size                402653184 bytes
Database Buffers            1191182336 bytes
Redo Buffers                   8118272 bytes
Automatic instance created
Running TRANSPORT_SET_CHECK on recovery set tablespaces
TRANSPORT_SET_CHECK completed successfully
 
contents of Memory Script:
{
# set requested point in time
set until  time "to_date('2021-08-09:20:11:06','YYYY-MM-DD:HH24:MI:SS')";
# restore the controlfile
restore clone controlfile;
 
# mount the controlfile
sql clone 'alter database mount clone database';
 
# archive current online log
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
}
executing Memory Script
 
executing command: SET until clause
 
Starting restore at 2021-08-09:20:25:06
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=38 device type=DISK
 
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /oracle/fra/RMANDB/autobackup/2021_08_09/o1_mf_s_1080158883_jk3fbn9x_.bkp
channel ORA_AUX_DISK_1: piece handle=/oracle/fra/RMANDB/autobackup/2021_08_09/o1_mf_s_1080158883_jk3fbn9x_.bkp tag=TAG20210809T200803
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/oracle/TSPITR/RMANDB/controlfile/o1_mf_jk3gbm5o_.ctl
Finished restore at 2021-08-09:20:25:08
 
sql statement: alter database mount clone database
 
sql statement: alter system archive log current
 
sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
 
contents of Memory Script:
{
# set requested point in time
set until  time "to_date('2021-08-09:20:11:06','YYYY-MM-DD:HH24:MI:SS')";
plsql <<<--
declare
  sqlstatement       varchar2(512);
  pdbname            varchar2(128);
  offline_not_needed exception;
  pragma exception_init(offline_not_needed, -01539);
begin
   pdbname := null; -- pdbname
  sqlstatement := 'alter tablespace '||  'USERS' ||' offline immediate';
  krmicd.writeMsg(6162, sqlstatement);
  krmicd.execSql(sqlstatement, 0, pdbname);
exception
  when offline_not_needed then
    null;
end; >>>;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile  1 to new;
set newname for clone datafile  4 to new;
set newname for clone datafile  3 to new;
set newname for clone tempfile  1 to new;
set newname for datafile  7 to
 "/oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile  1, 4, 3, 7;
 
switch clone datafile all;
}
executing Memory Script
 
executing command: SET until clause
 
sql statement: alter tablespace USERS offline immediate
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
renamed tempfile 1 to /oracle/TSPITR/RMANDB/datafile/o1_mf_temp_%u_.tmp in control file
 
Starting restore at 2021-08-09:20:25:16
using channel ORA_AUX_DISK_1
 
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /oracle/TSPITR/RMANDB/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /oracle/TSPITR/RMANDB/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /oracle/TSPITR/RMANDB/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00007 to /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /oracle/fra/RMANDB/backupset/2021_08_09/o1_mf_nnndf_TAG20210809T200618_jk3f7fbd_.bkp
channel ORA_AUX_DISK_1: piece handle=/oracle/fra/RMANDB/backupset/2021_08_09/o1_mf_nnndf_TAG20210809T200618_jk3f7fbd_.bkp tag=TAG20210809T200618
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:45
Finished restore at 2021-08-09:20:27:02
 
datafile 1 switched to datafile copy
input datafile copy RECID=49 STAMP=1080160022 file name=/oracle/TSPITR/RMANDB/datafile/o1_mf_system_jk3gbx9l_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=50 STAMP=1080160022 file name=/oracle/TSPITR/RMANDB/datafile/o1_mf_undotbs1_jk3gbxdz_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=51 STAMP=1080160022 file name=/oracle/TSPITR/RMANDB/datafile/o1_mf_sysaux_jk3gbxds_.dbf
 
contents of Memory Script:
{
# set requested point in time
set until  time "to_date('2021-08-09:20:11:06','YYYY-MM-DD:HH24:MI:SS')";
# online the datafiles restored or switched
sql clone "alter database datafile  1 online";
sql clone "alter database datafile  4 online";
sql clone "alter database datafile  3 online";
sql clone "alter database datafile  7 online";
# recover and open resetlogs
recover clone database tablespace  "USERS", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script
 
executing command: SET until clause
 
sql statement: alter database datafile  1 online
 
sql statement: alter database datafile  4 online
 
sql statement: alter database datafile  3 online
 
sql statement: alter database datafile  7 online
 
Starting recover at 2021-08-09:20:27:03
using channel ORA_AUX_DISK_1
 
starting media recovery
 
archived log for thread 1 with sequence 1 is already on disk as file /oracle/archives/1_1_1079643731.dbf
archived log for thread 1 with sequence 2 is already on disk as file /oracle/archives/1_2_1079643731.dbf
archived log file name=/oracle/archives/1_1_1079643731.dbf thread=1 sequence=1
archived log file name=/oracle/archives/1_2_1079643731.dbf thread=1 sequence=2
media recovery complete, elapsed time: 00:00:01
Finished recover at 2021-08-09:20:27:06
 
database opened
 
contents of Memory Script:
{
# make read only the tablespace that will be exported
sql clone 'alter tablespace  USERS read only';
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/oracle/TSPITR''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/oracle/TSPITR''";
}
executing Memory Script
 
sql statement: alter tablespace  USERS read only
 
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/oracle/TSPITR''
 
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/oracle/TSPITR''
 
Performing export of metadata...
   EXPDP> Starting "SYS"."TSPITR_EXP_lFEs_nkcE":
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/INDEX_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/TABLE_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/COMMENT
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TRIGGER
   EXPDP> Master table "SYS"."TSPITR_EXP_lFEs_nkcE" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TSPITR_EXP_lFEs_nkcE is:
   EXPDP>   /oracle/TSPITR/tspitr_lFEs_68564.dmp
   EXPDP> ******************************************************************************
   EXPDP> Datafiles required for transportable tablespace USERS:
   EXPDP>   /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
   EXPDP> Job "SYS"."TSPITR_EXP_lFEs_nkcE" successfully completed at Mon Aug 9 20:28:25 2021 elapsed 0 00:00:47
Export completed
 
 
contents of Memory Script:
{
# shutdown clone before import
shutdown clone abort
# drop target tablespaces before importing them back
sql 'drop tablespace  USERS including contents keep datafiles cascade constraints';
}
executing Memory Script
 
Oracle instance shut down
 
sql statement: drop tablespace  USERS including contents keep datafiles cascade constraints
 
Removing automatic instance
Automatic instance removed
auxiliary instance file /oracle/TSPITR/RMANDB/datafile/o1_mf_temp_jk3ggwbs_.tmp deleted
auxiliary instance file /oracle/TSPITR/RMANDB/onlinelog/o1_mf_3_jk3ggn2n_.log deleted
auxiliary instance file /oracle/TSPITR/RMANDB/onlinelog/o1_mf_2_jk3ggd1o_.log deleted
auxiliary instance file /oracle/TSPITR/RMANDB/onlinelog/o1_mf_1_jk3ggd0w_.log deleted
auxiliary instance file /oracle/TSPITR/RMANDB/datafile/o1_mf_sysaux_jk3gbxds_.dbf deleted
auxiliary instance file /oracle/TSPITR/RMANDB/datafile/o1_mf_undotbs1_jk3gbxdz_.dbf deleted
auxiliary instance file /oracle/TSPITR/RMANDB/datafile/o1_mf_system_jk3gbx9l_.dbf deleted
auxiliary instance file /oracle/TSPITR/RMANDB/controlfile/o1_mf_jk3gbm5o_.ctl deleted
auxiliary instance file tspitr_lFEs_68564.dmp deleted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/09/2021 20:28:28
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on default channel at 08/09/2021 20:28:28
RMAN-11003: failure during parse/execution of SQL statement: drop tablespace  USERS including contents keep datafiles cascade constraints
ORA-12919: Can not drop the default permanent tablespace

A mensagem de erro já fala por si só: na etapa de DROP da tablespace que é realizada pelo RMAN, é identificado que a tablespace em questão é a “Default” do banco de dados. Podemos nos certificar disso com a consulta abaixo:

RMAN> SELECT PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME = 'DEFAULT_PERMANENT_TABLESPACE';
 
 
 
PROPERTY_VALUE
--------------------------------------------------------------------------------
 
USERS

Para resolver, basta alterarmos essa configuração para outra tablespace e disparar o processo novamente:

RMAN> ALTER DATABASE DEFAULT TABLESPACE TS_CORTEX_CATALOG;
 
Statement processed

Processo finalizado com sucesso:

[oracle@oel8 TSPITR]$ rman target /
 
Recovery Manager: Release 18.0.0.0.0 - Production on Mon Aug 9 20:40:06 2021
Version 18.13.0.0.0
 
Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved.
 
connected to target database: RMANDB (DBID=3825250984)
 
RMAN> RECOVER TABLESPACE USERS UNTIL TIME "to_date('2021-08-09:20:11:06','YYYY-MM-DD:HH24:MI:SS')" AUXILIARY DESTINATION '/oracle/TSPITR';
 
Starting recover at 2021-08-09:20:40:18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=106 device type=DISK
RMAN-05026: warning: presuming following set of tablespaces applies to specified point-in-time
 
List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1
 
Creating automatic instance, with SID='veas'
 
initialization parameters used for automatic instance:
db_name=RMANDB
db_unique_name=veas_pitr_RMANDB
compatible=18.0.0
db_block_size=8192
db_files=200
diagnostic_dest=/oracle/18.0.0/base
_system_trig_enabled=FALSE
sga_target=1536M
processes=200
db_create_file_dest=/oracle/TSPITR
log_archive_dest_1='location=/oracle/TSPITR'
#No auxiliary parameter file used
 
 
starting up automatic instance RMANDB
 
Oracle instance started
 
Total System Global Area    1610612016 bytes
 
Fixed Size                     8658224 bytes
Variable Size                402653184 bytes
Database Buffers            1191182336 bytes
Redo Buffers                   8118272 bytes
Automatic instance created
Running TRANSPORT_SET_CHECK on recovery set tablespaces
TRANSPORT_SET_CHECK completed successfully
 
contents of Memory Script:
{
# set requested point in time
set until  time "to_date('2021-08-09:20:11:06','YYYY-MM-DD:HH24:MI:SS')";
# restore the controlfile
restore clone controlfile;
 
# mount the controlfile
sql clone 'alter database mount clone database';
 
# archive current online log
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
}
executing Memory Script
 
executing command: SET until clause
 
Starting restore at 2021-08-09:20:40:36
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=34 device type=DISK
 
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /oracle/fra/RMANDB/autobackup/2021_08_09/o1_mf_s_1080158883_jk3fbn9x_.bkp
channel ORA_AUX_DISK_1: piece handle=/oracle/fra/RMANDB/autobackup/2021_08_09/o1_mf_s_1080158883_jk3fbn9x_.bkp tag=TAG20210809T200803
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/oracle/TSPITR/RMANDB/controlfile/o1_mf_jk3h7o4v_.ctl
Finished restore at 2021-08-09:20:40:38
 
sql statement: alter database mount clone database
 
sql statement: alter system archive log current
 
sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
 
contents of Memory Script:
{
# set requested point in time
set until  time "to_date('2021-08-09:20:11:06','YYYY-MM-DD:HH24:MI:SS')";
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile  1 to new;
set newname for clone datafile  4 to new;
set newname for clone datafile  3 to new;
set newname for clone tempfile  1 to new;
set newname for datafile  7 to
 "/oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile  1, 4, 3, 7;
 
switch clone datafile all;
}
executing Memory Script
 
executing command: SET until clause
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
renamed tempfile 1 to /oracle/TSPITR/RMANDB/datafile/o1_mf_temp_%u_.tmp in control file
 
Starting restore at 2021-08-09:20:40:43
using channel ORA_AUX_DISK_1
 
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /oracle/TSPITR/RMANDB/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /oracle/TSPITR/RMANDB/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /oracle/TSPITR/RMANDB/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00007 to /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /oracle/fra/RMANDB/backupset/2021_08_09/o1_mf_nnndf_TAG20210809T200618_jk3f7fbd_.bkp
channel ORA_AUX_DISK_1: piece handle=/oracle/fra/RMANDB/backupset/2021_08_09/o1_mf_nnndf_TAG20210809T200618_jk3f7fbd_.bkp tag=TAG20210809T200618
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:45
Finished restore at 2021-08-09:20:43:28
 
datafile 1 switched to datafile copy
input datafile copy RECID=49 STAMP=1080161008 file name=/oracle/TSPITR/RMANDB/datafile/o1_mf_system_jk3h7vm3_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=50 STAMP=1080161008 file name=/oracle/TSPITR/RMANDB/datafile/o1_mf_undotbs1_jk3h7vos_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=51 STAMP=1080161008 file name=/oracle/TSPITR/RMANDB/datafile/o1_mf_sysaux_jk3h7vop_.dbf
 
contents of Memory Script:
{
# set requested point in time
set until  time "to_date('2021-08-09:20:11:06','YYYY-MM-DD:HH24:MI:SS')";
# online the datafiles restored or switched
sql clone "alter database datafile  1 online";
sql clone "alter database datafile  4 online";
sql clone "alter database datafile  3 online";
sql clone "alter database datafile  7 online";
# recover and open resetlogs
recover clone database tablespace  "USERS", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script
 
executing command: SET until clause
 
sql statement: alter database datafile  1 online
 
sql statement: alter database datafile  4 online
 
sql statement: alter database datafile  3 online
 
sql statement: alter database datafile  7 online
 
Starting recover at 2021-08-09:20:43:29
using channel ORA_AUX_DISK_1
 
starting media recovery
 
archived log for thread 1 with sequence 1 is already on disk as file /oracle/archives/1_1_1079643731.dbf
archived log for thread 1 with sequence 2 is already on disk as file /oracle/archives/1_2_1079643731.dbf
archived log file name=/oracle/archives/1_1_1079643731.dbf thread=1 sequence=1
archived log file name=/oracle/archives/1_2_1079643731.dbf thread=1 sequence=2
media recovery complete, elapsed time: 00:00:00
Finished recover at 2021-08-09:20:43:31
 
database opened
 
contents of Memory Script:
{
# make read only the tablespace that will be exported
sql clone 'alter tablespace  USERS read only';
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/oracle/TSPITR''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/oracle/TSPITR''";
}
executing Memory Script
 
sql statement: alter tablespace  USERS read only
 
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/oracle/TSPITR''
 
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/oracle/TSPITR''
 
Performing export of metadata...
   EXPDP> Starting "SYS"."TSPITR_EXP_veas_Fofq":
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/INDEX_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/TABLE_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/COMMENT
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TRIGGER
   EXPDP> Master table "SYS"."TSPITR_EXP_veas_Fofq" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TSPITR_EXP_veas_Fofq is:
   EXPDP>   /oracle/TSPITR/tspitr_veas_10076.dmp
   EXPDP> ******************************************************************************
   EXPDP> Datafiles required for transportable tablespace USERS:
   EXPDP>   /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
   EXPDP> Job "SYS"."TSPITR_EXP_veas_Fofq" successfully completed at Mon Aug 9 20:44:40 2021 elapsed 0 00:00:46
Export completed
 
 
contents of Memory Script:
{
# shutdown clone before import
shutdown clone abort
# drop target tablespaces before importing them back
sql 'drop tablespace  USERS including contents keep datafiles cascade constraints';
}
executing Memory Script
 
Oracle instance shut down
 
sql statement: drop tablespace  USERS including contents keep datafiles cascade constraints
 
Performing import of metadata...
   IMPDP> Master table "SYS"."TSPITR_IMP_veas_qlri" successfully loaded/unloaded
   IMPDP> Starting "SYS"."TSPITR_IMP_veas_qlri":
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/INDEX_STATISTICS
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/COMMENT
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/TRIGGER
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/TABLE_STATISTICS
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   IMPDP> Job "SYS"."TSPITR_IMP_veas_qlri" successfully completed at Mon Aug 9 20:45:20 2021 elapsed 0 00:00:23
Import completed
 
 
contents of Memory Script:
{
# make read write and offline the imported tablespaces
sql 'alter tablespace  USERS read write';
sql 'alter tablespace  USERS offline';
# enable autobackups after TSPITR is finished
sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
}
executing Memory Script
 
sql statement: alter tablespace  USERS read write
 
sql statement: alter tablespace  USERS offline
 
sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;
 
Removing automatic instance
Automatic instance removed
auxiliary instance file /oracle/TSPITR/RMANDB/datafile/o1_mf_temp_jk3hfms7_.tmp deleted
auxiliary instance file /oracle/TSPITR/RMANDB/onlinelog/o1_mf_3_jk3hfcxs_.log deleted
auxiliary instance file /oracle/TSPITR/RMANDB/onlinelog/o1_mf_2_jk3hf3qn_.log deleted
auxiliary instance file /oracle/TSPITR/RMANDB/onlinelog/o1_mf_1_jk3hf3q1_.log deleted
auxiliary instance file /oracle/TSPITR/RMANDB/datafile/o1_mf_sysaux_jk3h7vop_.dbf deleted
auxiliary instance file /oracle/TSPITR/RMANDB/datafile/o1_mf_undotbs1_jk3h7vos_.dbf deleted
auxiliary instance file /oracle/TSPITR/RMANDB/datafile/o1_mf_system_jk3h7vm3_.dbf deleted
auxiliary instance file /oracle/TSPITR/RMANDB/controlfile/o1_mf_jk3h7o4v_.ctl deleted
auxiliary instance file tspitr_veas_10076.dmp deleted
Finished recover at 2021-08-09:20:45:23
 
RMAN>

Leave a Comment

Your email address will not be published.