{"id":6128,"date":"2021-08-09T23:46:53","date_gmt":"2021-08-09T23:46:53","guid":{"rendered":"https:\/\/swiv.com.br\/solved-issue-ora-12919-can-not-drop-the-default-permanent-tablespace-during-tspitr\/"},"modified":"2026-05-27T20:02:30","modified_gmt":"2026-05-27T19:02:30","slug":"solved-issue-ora-12919-can-not-drop-the-default-permanent-tablespace-during-tspitr","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/08\/09\/solved-issue-ora-12919-can-not-drop-the-default-permanent-tablespace-during-tspitr\/","title":{"rendered":"[Solved] Issue: ORA-12919: Can not drop the default permanent tablespace during TSPITR"},"content":{"rendered":"\n<p>Durante a execu\u00e7\u00e3o de um Tablespace Point-in-time Recovery, me deparei com o seguinte erro:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel8 TSPITR]$ rman target \/\n \nRecovery Manager: Release 18.0.0.0.0 - Production on Mon Aug 9 20:24:25 2021\nVersion 18.13.0.0.0\n \nCopyright (c) 1982, 2018, Oracle and\/or its affiliates.  All rights reserved.\n \nconnected to target database: RMANDB (DBID=3825250984)\n \nRMAN&gt; RECOVER TABLESPACE USERS UNTIL TIME &quot;to_date(&#039;2021-08-09:20:11:06&#039;,&#039;YYYY-MM-DD:HH24:MI:SS&#039;)&quot; AUXILIARY DESTINATION &#039;\/oracle\/TSPITR&#039;;\n \nStarting recover at 2021-08-09:20:24:45\nusing target database control file instead of recovery catalog\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=119 device type=DISK\nRMAN-05026: warning: presuming following set of tablespaces applies to specified point-in-time\n \nList of tablespaces expected to have UNDO segments\nTablespace SYSTEM\nTablespace UNDOTBS1\n \nCreating automatic instance, with SID=&#039;lFEs&#039;\n \ninitialization parameters used for automatic instance:\ndb_name=RMANDB\ndb_unique_name=lFEs_pitr_RMANDB\ncompatible=18.0.0\ndb_block_size=8192\ndb_files=200\ndiagnostic_dest=\/oracle\/18.0.0\/base\n_system_trig_enabled=FALSE\nsga_target=1536M\nprocesses=200\ndb_create_file_dest=\/oracle\/TSPITR\nlog_archive_dest_1=&#039;location=\/oracle\/TSPITR&#039;\n#No auxiliary parameter file used\n \n \nstarting up automatic instance RMANDB\n \nOracle instance started\n \nTotal System Global Area    1610612016 bytes\n \nFixed Size                     8658224 bytes\nVariable Size                402653184 bytes\nDatabase Buffers            1191182336 bytes\nRedo Buffers                   8118272 bytes\nAutomatic instance created\nRunning TRANSPORT_SET_CHECK on recovery set tablespaces\nTRANSPORT_SET_CHECK completed successfully\n \ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2021-08-09:20:11:06&#039;,&#039;YYYY-MM-DD:HH24:MI:SS&#039;)&quot;;\n# restore the controlfile\nrestore clone controlfile;\n \n# mount the controlfile\nsql clone &#039;alter database mount clone database&#039;;\n \n# archive current online log\nsql &#039;alter system archive log current&#039;;\n# avoid unnecessary autobackups for structural changes during TSPITR\nsql &#039;begin dbms_backup_restore.AutoBackupFlag(FALSE); end;&#039;;\n}\nexecuting Memory Script\n \nexecuting command: SET until clause\n \nStarting restore at 2021-08-09:20:25:06\nallocated channel: ORA_AUX_DISK_1\nchannel ORA_AUX_DISK_1: SID=38 device type=DISK\n \nchannel ORA_AUX_DISK_1: starting datafile backup set restore\nchannel ORA_AUX_DISK_1: restoring control file\nchannel ORA_AUX_DISK_1: reading from backup piece \/oracle\/fra\/RMANDB\/autobackup\/2021_08_09\/o1_mf_s_1080158883_jk3fbn9x_.bkp\nchannel ORA_AUX_DISK_1: piece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_08_09\/o1_mf_s_1080158883_jk3fbn9x_.bkp tag=TAG20210809T200803\nchannel ORA_AUX_DISK_1: restored backup piece 1\nchannel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01\noutput file name=\/oracle\/TSPITR\/RMANDB\/controlfile\/o1_mf_jk3gbm5o_.ctl\nFinished restore at 2021-08-09:20:25:08\n \nsql statement: alter database mount clone database\n \nsql statement: alter system archive log current\n \nsql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;\n \ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2021-08-09:20:11:06&#039;,&#039;YYYY-MM-DD:HH24:MI:SS&#039;)&quot;;\nplsql &amp;lt;&amp;lt;&amp;lt;--\ndeclare\n  sqlstatement       varchar2(512);\n  pdbname            varchar2(128);\n  offline_not_needed exception;\n  pragma exception_init(offline_not_needed, -01539);\nbegin\n   pdbname := null; -- pdbname\n  sqlstatement := &#039;alter tablespace &#039;||  &#039;USERS&#039; ||&#039; offline immediate&#039;;\n  krmicd.writeMsg(6162, sqlstatement);\n  krmicd.execSql(sqlstatement, 0, pdbname);\nexception\n  when offline_not_needed then\n    null;\nend; &gt;&gt;&gt;;\n# set destinations for recovery set and auxiliary set datafiles\nset newname for clone datafile  1 to new;\nset newname for clone datafile  4 to new;\nset newname for clone datafile  3 to new;\nset newname for clone tempfile  1 to new;\nset newname for datafile  7 to\n &quot;\/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf&quot;;\n# switch all tempfiles\nswitch clone tempfile all;\n# restore the tablespaces in the recovery set and the auxiliary set\nrestore clone datafile  1, 4, 3, 7;\n \nswitch clone datafile all;\n}\nexecuting Memory Script\n \nexecuting command: SET until clause\n \nsql statement: alter tablespace USERS offline immediate\n \nexecuting command: SET NEWNAME\n \nexecuting command: SET NEWNAME\n \nexecuting command: SET NEWNAME\n \nexecuting command: SET NEWNAME\n \nexecuting command: SET NEWNAME\n \nrenamed tempfile 1 to \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_temp_%u_.tmp in control file\n \nStarting restore at 2021-08-09:20:25:16\nusing channel ORA_AUX_DISK_1\n \nchannel ORA_AUX_DISK_1: starting datafile backup set restore\nchannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set\nchannel ORA_AUX_DISK_1: restoring datafile 00001 to \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_system_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00004 to \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_undotbs1_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00003 to \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_sysaux_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00007 to \/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\nchannel ORA_AUX_DISK_1: reading from backup piece \/oracle\/fra\/RMANDB\/backupset\/2021_08_09\/o1_mf_nnndf_TAG20210809T200618_jk3f7fbd_.bkp\nchannel ORA_AUX_DISK_1: piece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_08_09\/o1_mf_nnndf_TAG20210809T200618_jk3f7fbd_.bkp tag=TAG20210809T200618\nchannel ORA_AUX_DISK_1: restored backup piece 1\nchannel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:45\nFinished restore at 2021-08-09:20:27:02\n \ndatafile 1 switched to datafile copy\ninput datafile copy RECID=49 STAMP=1080160022 file name=\/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_system_jk3gbx9l_.dbf\ndatafile 4 switched to datafile copy\ninput datafile copy RECID=50 STAMP=1080160022 file name=\/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_undotbs1_jk3gbxdz_.dbf\ndatafile 3 switched to datafile copy\ninput datafile copy RECID=51 STAMP=1080160022 file name=\/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_sysaux_jk3gbxds_.dbf\n \ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2021-08-09:20:11:06&#039;,&#039;YYYY-MM-DD:HH24:MI:SS&#039;)&quot;;\n# online the datafiles restored or switched\nsql clone &quot;alter database datafile  1 online&quot;;\nsql clone &quot;alter database datafile  4 online&quot;;\nsql clone &quot;alter database datafile  3 online&quot;;\nsql clone &quot;alter database datafile  7 online&quot;;\n# recover and open resetlogs\nrecover clone database tablespace  &quot;USERS&quot;, &quot;SYSTEM&quot;, &quot;UNDOTBS1&quot;, &quot;SYSAUX&quot; delete archivelog;\nalter clone database open resetlogs;\n}\nexecuting Memory Script\n \nexecuting command: SET until clause\n \nsql statement: alter database datafile  1 online\n \nsql statement: alter database datafile  4 online\n \nsql statement: alter database datafile  3 online\n \nsql statement: alter database datafile  7 online\n \nStarting recover at 2021-08-09:20:27:03\nusing channel ORA_AUX_DISK_1\n \nstarting media recovery\n \narchived log for thread 1 with sequence 1 is already on disk as file \/oracle\/archives\/1_1_1079643731.dbf\narchived log for thread 1 with sequence 2 is already on disk as file \/oracle\/archives\/1_2_1079643731.dbf\narchived log file name=\/oracle\/archives\/1_1_1079643731.dbf thread=1 sequence=1\narchived log file name=\/oracle\/archives\/1_2_1079643731.dbf thread=1 sequence=2\nmedia recovery complete, elapsed time: 00:00:01\nFinished recover at 2021-08-09:20:27:06\n \ndatabase opened\n \ncontents of Memory Script:\n{\n# make read only the tablespace that will be exported\nsql clone &#039;alter tablespace  USERS read only&#039;;\n# create directory for datapump import\nsql &quot;create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\n\/oracle\/TSPITR&#039;&#039;&quot;;\n# create directory for datapump export\nsql clone &quot;create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\n\/oracle\/TSPITR&#039;&#039;&quot;;\n}\nexecuting Memory Script\n \nsql statement: alter tablespace  USERS read only\n \nsql statement: create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\/oracle\/TSPITR&#039;&#039;\n \nsql statement: create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\/oracle\/TSPITR&#039;&#039;\n \nPerforming export of metadata...\n   EXPDP&gt; Starting &quot;SYS&quot;.&quot;TSPITR_EXP_lFEs_nkcE&quot;:\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/INDEX\/STATISTICS\/INDEX_STATISTICS\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/STATISTICS\/TABLE_STATISTICS\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/STATISTICS\/MARKER\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/PLUGTS_BLK\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/POST_INSTANCE\/PLUGTS_BLK\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/TABLE\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/INDEX\/INDEX\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/CONSTRAINT\/CONSTRAINT\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/COMMENT\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/CONSTRAINT\/REF_CONSTRAINT\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/TRIGGER\n   EXPDP&gt; Master table &quot;SYS&quot;.&quot;TSPITR_EXP_lFEs_nkcE&quot; successfully loaded\/unloaded\n   EXPDP&gt; ******************************************************************************\n   EXPDP&gt; Dump file set for SYS.TSPITR_EXP_lFEs_nkcE is:\n   EXPDP&gt;   \/oracle\/TSPITR\/tspitr_lFEs_68564.dmp\n   EXPDP&gt; ******************************************************************************\n   EXPDP&gt; Datafiles required for transportable tablespace USERS:\n   EXPDP&gt;   \/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\n   EXPDP&gt; Job &quot;SYS&quot;.&quot;TSPITR_EXP_lFEs_nkcE&quot; successfully completed at Mon Aug 9 20:28:25 2021 elapsed 0 00:00:47\nExport completed\n \n \ncontents of Memory Script:\n{\n# shutdown clone before import\nshutdown clone abort\n# drop target tablespaces before importing them back\nsql &#039;drop tablespace  USERS including contents keep datafiles cascade constraints&#039;;\n}\nexecuting Memory Script\n \nOracle instance shut down\n \nsql statement: drop tablespace  USERS including contents keep datafiles cascade constraints\n \nRemoving automatic instance\nAutomatic instance removed\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_temp_jk3ggwbs_.tmp deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/onlinelog\/o1_mf_3_jk3ggn2n_.log deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/onlinelog\/o1_mf_2_jk3ggd1o_.log deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/onlinelog\/o1_mf_1_jk3ggd0w_.log deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_sysaux_jk3gbxds_.dbf deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_undotbs1_jk3gbxdz_.dbf deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_system_jk3gbx9l_.dbf deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/controlfile\/o1_mf_jk3gbm5o_.ctl deleted\nauxiliary instance file tspitr_lFEs_68564.dmp deleted\nRMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-03002: failure of recover command at 08\/09\/2021 20:28:28\nRMAN-03015: error occurred in stored script Memory Script\nRMAN-03009: failure of sql command on default channel at 08\/09\/2021 20:28:28\nRMAN-11003: failure during parse\/execution of SQL statement: drop tablespace  USERS including contents keep datafiles cascade constraints\nORA-12919: Can not drop the default permanent tablespace\n<\/pre><\/div>\n\n\n<p>A mensagem de erro j\u00e1 fala por si s\u00f3: na etapa de DROP da tablespace que \u00e9 realizada pelo RMAN, \u00e9 identificado que a tablespace em quest\u00e3o \u00e9 a &#8220;Default&#8221; do banco de dados. Podemos nos certificar disso com a consulta abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; SELECT PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME = &#039;DEFAULT_PERMANENT_TABLESPACE&#039;;\n \n \n \nPROPERTY_VALUE\n--------------------------------------------------------------------------------\n \nUSERS\n<\/pre><\/div>\n\n\n<p>Para resolver, basta alterarmos essa configura\u00e7\u00e3o para outra tablespace e disparar o processo novamente:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; ALTER DATABASE DEFAULT TABLESPACE TS_CORTEX_CATALOG;\n \nStatement processed\n<\/pre><\/div>\n\n\n<p>Processo finalizado com sucesso:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel8 TSPITR]$ rman target \/\n \nRecovery Manager: Release 18.0.0.0.0 - Production on Mon Aug 9 20:40:06 2021\nVersion 18.13.0.0.0\n \nCopyright (c) 1982, 2018, Oracle and\/or its affiliates.  All rights reserved.\n \nconnected to target database: RMANDB (DBID=3825250984)\n \nRMAN&gt; RECOVER TABLESPACE USERS UNTIL TIME &quot;to_date(&#039;2021-08-09:20:11:06&#039;,&#039;YYYY-MM-DD:HH24:MI:SS&#039;)&quot; AUXILIARY DESTINATION &#039;\/oracle\/TSPITR&#039;;\n \nStarting recover at 2021-08-09:20:40:18\nusing target database control file instead of recovery catalog\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=106 device type=DISK\nRMAN-05026: warning: presuming following set of tablespaces applies to specified point-in-time\n \nList of tablespaces expected to have UNDO segments\nTablespace SYSTEM\nTablespace UNDOTBS1\n \nCreating automatic instance, with SID=&#039;veas&#039;\n \ninitialization parameters used for automatic instance:\ndb_name=RMANDB\ndb_unique_name=veas_pitr_RMANDB\ncompatible=18.0.0\ndb_block_size=8192\ndb_files=200\ndiagnostic_dest=\/oracle\/18.0.0\/base\n_system_trig_enabled=FALSE\nsga_target=1536M\nprocesses=200\ndb_create_file_dest=\/oracle\/TSPITR\nlog_archive_dest_1=&#039;location=\/oracle\/TSPITR&#039;\n#No auxiliary parameter file used\n \n \nstarting up automatic instance RMANDB\n \nOracle instance started\n \nTotal System Global Area    1610612016 bytes\n \nFixed Size                     8658224 bytes\nVariable Size                402653184 bytes\nDatabase Buffers            1191182336 bytes\nRedo Buffers                   8118272 bytes\nAutomatic instance created\nRunning TRANSPORT_SET_CHECK on recovery set tablespaces\nTRANSPORT_SET_CHECK completed successfully\n \ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2021-08-09:20:11:06&#039;,&#039;YYYY-MM-DD:HH24:MI:SS&#039;)&quot;;\n# restore the controlfile\nrestore clone controlfile;\n \n# mount the controlfile\nsql clone &#039;alter database mount clone database&#039;;\n \n# archive current online log\nsql &#039;alter system archive log current&#039;;\n# avoid unnecessary autobackups for structural changes during TSPITR\nsql &#039;begin dbms_backup_restore.AutoBackupFlag(FALSE); end;&#039;;\n}\nexecuting Memory Script\n \nexecuting command: SET until clause\n \nStarting restore at 2021-08-09:20:40:36\nallocated channel: ORA_AUX_DISK_1\nchannel ORA_AUX_DISK_1: SID=34 device type=DISK\n \nchannel ORA_AUX_DISK_1: starting datafile backup set restore\nchannel ORA_AUX_DISK_1: restoring control file\nchannel ORA_AUX_DISK_1: reading from backup piece \/oracle\/fra\/RMANDB\/autobackup\/2021_08_09\/o1_mf_s_1080158883_jk3fbn9x_.bkp\nchannel ORA_AUX_DISK_1: piece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_08_09\/o1_mf_s_1080158883_jk3fbn9x_.bkp tag=TAG20210809T200803\nchannel ORA_AUX_DISK_1: restored backup piece 1\nchannel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01\noutput file name=\/oracle\/TSPITR\/RMANDB\/controlfile\/o1_mf_jk3h7o4v_.ctl\nFinished restore at 2021-08-09:20:40:38\n \nsql statement: alter database mount clone database\n \nsql statement: alter system archive log current\n \nsql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;\n \ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2021-08-09:20:11:06&#039;,&#039;YYYY-MM-DD:HH24:MI:SS&#039;)&quot;;\n# set destinations for recovery set and auxiliary set datafiles\nset newname for clone datafile  1 to new;\nset newname for clone datafile  4 to new;\nset newname for clone datafile  3 to new;\nset newname for clone tempfile  1 to new;\nset newname for datafile  7 to\n &quot;\/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf&quot;;\n# switch all tempfiles\nswitch clone tempfile all;\n# restore the tablespaces in the recovery set and the auxiliary set\nrestore clone datafile  1, 4, 3, 7;\n \nswitch clone datafile all;\n}\nexecuting Memory Script\n \nexecuting command: SET until clause\n \nexecuting command: SET NEWNAME\n \nexecuting command: SET NEWNAME\n \nexecuting command: SET NEWNAME\n \nexecuting command: SET NEWNAME\n \nexecuting command: SET NEWNAME\n \nrenamed tempfile 1 to \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_temp_%u_.tmp in control file\n \nStarting restore at 2021-08-09:20:40:43\nusing channel ORA_AUX_DISK_1\n \nchannel ORA_AUX_DISK_1: starting datafile backup set restore\nchannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set\nchannel ORA_AUX_DISK_1: restoring datafile 00001 to \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_system_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00004 to \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_undotbs1_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00003 to \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_sysaux_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00007 to \/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\nchannel ORA_AUX_DISK_1: reading from backup piece \/oracle\/fra\/RMANDB\/backupset\/2021_08_09\/o1_mf_nnndf_TAG20210809T200618_jk3f7fbd_.bkp\nchannel ORA_AUX_DISK_1: piece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_08_09\/o1_mf_nnndf_TAG20210809T200618_jk3f7fbd_.bkp tag=TAG20210809T200618\nchannel ORA_AUX_DISK_1: restored backup piece 1\nchannel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:45\nFinished restore at 2021-08-09:20:43:28\n \ndatafile 1 switched to datafile copy\ninput datafile copy RECID=49 STAMP=1080161008 file name=\/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_system_jk3h7vm3_.dbf\ndatafile 4 switched to datafile copy\ninput datafile copy RECID=50 STAMP=1080161008 file name=\/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_undotbs1_jk3h7vos_.dbf\ndatafile 3 switched to datafile copy\ninput datafile copy RECID=51 STAMP=1080161008 file name=\/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_sysaux_jk3h7vop_.dbf\n \ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2021-08-09:20:11:06&#039;,&#039;YYYY-MM-DD:HH24:MI:SS&#039;)&quot;;\n# online the datafiles restored or switched\nsql clone &quot;alter database datafile  1 online&quot;;\nsql clone &quot;alter database datafile  4 online&quot;;\nsql clone &quot;alter database datafile  3 online&quot;;\nsql clone &quot;alter database datafile  7 online&quot;;\n# recover and open resetlogs\nrecover clone database tablespace  &quot;USERS&quot;, &quot;SYSTEM&quot;, &quot;UNDOTBS1&quot;, &quot;SYSAUX&quot; delete archivelog;\nalter clone database open resetlogs;\n}\nexecuting Memory Script\n \nexecuting command: SET until clause\n \nsql statement: alter database datafile  1 online\n \nsql statement: alter database datafile  4 online\n \nsql statement: alter database datafile  3 online\n \nsql statement: alter database datafile  7 online\n \nStarting recover at 2021-08-09:20:43:29\nusing channel ORA_AUX_DISK_1\n \nstarting media recovery\n \narchived log for thread 1 with sequence 1 is already on disk as file \/oracle\/archives\/1_1_1079643731.dbf\narchived log for thread 1 with sequence 2 is already on disk as file \/oracle\/archives\/1_2_1079643731.dbf\narchived log file name=\/oracle\/archives\/1_1_1079643731.dbf thread=1 sequence=1\narchived log file name=\/oracle\/archives\/1_2_1079643731.dbf thread=1 sequence=2\nmedia recovery complete, elapsed time: 00:00:00\nFinished recover at 2021-08-09:20:43:31\n \ndatabase opened\n \ncontents of Memory Script:\n{\n# make read only the tablespace that will be exported\nsql clone &#039;alter tablespace  USERS read only&#039;;\n# create directory for datapump import\nsql &quot;create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\n\/oracle\/TSPITR&#039;&#039;&quot;;\n# create directory for datapump export\nsql clone &quot;create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\n\/oracle\/TSPITR&#039;&#039;&quot;;\n}\nexecuting Memory Script\n \nsql statement: alter tablespace  USERS read only\n \nsql statement: create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\/oracle\/TSPITR&#039;&#039;\n \nsql statement: create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\/oracle\/TSPITR&#039;&#039;\n \nPerforming export of metadata...\n   EXPDP&gt; Starting &quot;SYS&quot;.&quot;TSPITR_EXP_veas_Fofq&quot;:\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/INDEX\/STATISTICS\/INDEX_STATISTICS\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/STATISTICS\/TABLE_STATISTICS\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/STATISTICS\/MARKER\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/PLUGTS_BLK\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/POST_INSTANCE\/PLUGTS_BLK\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/TABLE\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/INDEX\/INDEX\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/CONSTRAINT\/CONSTRAINT\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/COMMENT\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/CONSTRAINT\/REF_CONSTRAINT\n   EXPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/TRIGGER\n   EXPDP&gt; Master table &quot;SYS&quot;.&quot;TSPITR_EXP_veas_Fofq&quot; successfully loaded\/unloaded\n   EXPDP&gt; ******************************************************************************\n   EXPDP&gt; Dump file set for SYS.TSPITR_EXP_veas_Fofq is:\n   EXPDP&gt;   \/oracle\/TSPITR\/tspitr_veas_10076.dmp\n   EXPDP&gt; ******************************************************************************\n   EXPDP&gt; Datafiles required for transportable tablespace USERS:\n   EXPDP&gt;   \/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\n   EXPDP&gt; Job &quot;SYS&quot;.&quot;TSPITR_EXP_veas_Fofq&quot; successfully completed at Mon Aug 9 20:44:40 2021 elapsed 0 00:00:46\nExport completed\n \n \ncontents of Memory Script:\n{\n# shutdown clone before import\nshutdown clone abort\n# drop target tablespaces before importing them back\nsql &#039;drop tablespace  USERS including contents keep datafiles cascade constraints&#039;;\n}\nexecuting Memory Script\n \nOracle instance shut down\n \nsql statement: drop tablespace  USERS including contents keep datafiles cascade constraints\n \nPerforming import of metadata...\n   IMPDP&gt; Master table &quot;SYS&quot;.&quot;TSPITR_IMP_veas_qlri&quot; successfully loaded\/unloaded\n   IMPDP&gt; Starting &quot;SYS&quot;.&quot;TSPITR_IMP_veas_qlri&quot;:\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/PLUGTS_BLK\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/TABLE\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/INDEX\/INDEX\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/CONSTRAINT\/CONSTRAINT\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/INDEX\/STATISTICS\/INDEX_STATISTICS\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/COMMENT\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/CONSTRAINT\/REF_CONSTRAINT\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/TRIGGER\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/STATISTICS\/TABLE_STATISTICS\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/STATISTICS\/MARKER\n   IMPDP&gt; Processing object type TRANSPORTABLE_EXPORT\/POST_INSTANCE\/PLUGTS_BLK\n   IMPDP&gt; Job &quot;SYS&quot;.&quot;TSPITR_IMP_veas_qlri&quot; successfully completed at Mon Aug 9 20:45:20 2021 elapsed 0 00:00:23\nImport completed\n \n \ncontents of Memory Script:\n{\n# make read write and offline the imported tablespaces\nsql &#039;alter tablespace  USERS read write&#039;;\nsql &#039;alter tablespace  USERS offline&#039;;\n# enable autobackups after TSPITR is finished\nsql &#039;begin dbms_backup_restore.AutoBackupFlag(TRUE); end;&#039;;\n}\nexecuting Memory Script\n \nsql statement: alter tablespace  USERS read write\n \nsql statement: alter tablespace  USERS offline\n \nsql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;\n \nRemoving automatic instance\nAutomatic instance removed\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_temp_jk3hfms7_.tmp deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/onlinelog\/o1_mf_3_jk3hfcxs_.log deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/onlinelog\/o1_mf_2_jk3hf3qn_.log deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/onlinelog\/o1_mf_1_jk3hf3q1_.log deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_sysaux_jk3h7vop_.dbf deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_undotbs1_jk3h7vos_.dbf deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/datafile\/o1_mf_system_jk3h7vm3_.dbf deleted\nauxiliary instance file \/oracle\/TSPITR\/RMANDB\/controlfile\/o1_mf_jk3h7o4v_.ctl deleted\nauxiliary instance file tspitr_veas_10076.dmp deleted\nFinished recover at 2021-08-09:20:45:23\n \nRMAN&gt;\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Durante a execu\u00e7\u00e3o de um Tablespace Point-in-time Recovery, me deparei com o seguinte erro: A mensagem de erro j\u00e1 fala por si s\u00f3: na etapa de DROP da tablespace que \u00e9 realizada pelo RMAN, \u00e9 identificado que a tablespace em quest\u00e3o \u00e9 a &#8220;Default&#8221; do banco de dados. Podemos nos certificar disso com a consulta [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-6128","post","type-post","status-publish","format-standard","hentry","category-backup-recovery"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/6128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=6128"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/6128\/revisions"}],"predecessor-version":[{"id":9066,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/6128\/revisions\/9066"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=6128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=6128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=6128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}