output : 12c recover table
- Détails
- Catégorie : Uncategorised
- Publié le dimanche 20 septembre 2015 19:31
- Écrit par Administrator
- Affichages : 55947
RMAN> RECOVER TABLE 'USERTEST1'.'TEST' OF PLUGGABLE DATABASE SHAKA
UNTIL SCN 1768101
AUXILIARY DESTINATION '/oracle/oradata/RESTOTEMP'
REMAP TABLE 'USERTEST1'.'TEST':'TEST_RESTO';2> 3> 4>
Starting recover at 17-SEP-15
using target database control file instead of recovery catalog
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1 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='khwb'
initialization parameters used for automatic instance:
db_name=BIGDB
db_unique_name=khwb_pitr_SHAKA_BIGDB
compatible=12.1.0.2.0
db_block_size=8192
db_files=200
diagnostic_dest=/oracle/oraBase
_system_trig_enabled=FALSE
sga_target=1056M
processes=200
db_create_file_dest=/oracle/oradata/RESTOTEMP
log_archive_dest_1='location=/oracle/oradata/RESTOTEMP'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used
starting up automatic instance BIGDB
Oracle instance started
Total System Global Area 1107296256 bytes
Fixed Size 2923488 bytes
Variable Size 318768160 bytes
Database Buffers 771751936 bytes
Redo Buffers 13852672 bytes
Automatic instance created
contents of Memory Script:
{
# set requested point in time
set until scn 1768101;
# 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';
}
executing Memory Script
executing command: SET until clause
Starting restore at 17-SEP-15
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=21 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/orafra/BIGDB/autobackup/2015_09_17/o1_mf_s_890689625_bzp65stt_.bkp
channel ORA_AUX_DISK_1: piece handle=/oracle/orafra/BIGDB/autobackup/2015_09_17/o1_mf_s_890689625_bzp65stt_.bkp tag=TAG20150917T214705
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/oradata/RESTOTEMP/BIGDB/controlfile/o1_mf_bzp6l7w3_.ctl
Finished restore at 17-SEP-15
sql statement: alter database mount clone database
sql statement: alter system archive log current
contents of Memory Script:
{
# set requested point in time
set until scn 1768101;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 5 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 7 to new;
set newname for clone datafile 8 to new;
set newname for clone tempfile 1 to new;
set newname for clone tempfile 3 to new;
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 5, 3, 7, 8;
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
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_temp_%u_.tmp in control file
renamed tempfile 3 to /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_temp_%u_.tmp in control file
Starting restore at 17-SEP-15
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/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /oracle/orafra/BIGDB/backupset/2015_09_17/o1_mf_nnndf_TAG20150917T214445_bzp61fqg_.bkp
channel ORA_AUX_DISK_1: piece handle=/oracle/orafra/BIGDB/backupset/2015_09_17/o1_mf_nnndf_TAG20150917T214445_bzp61fqg_.bkp tag=TAG20150917T214445
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:15
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 00007 to /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00008 to /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /oracle/orafra/BIGDB/1FE4958522E127B3E05346000A0A3C14/backupset/2015_09_17/o1_mf_nnndf_TAG20150917T214630_bzp64pfz_.bkp
channel ORA_AUX_DISK_1: piece handle=/oracle/orafra/BIGDB/1FE4958522E127B3E05346000A0A3C14/backupset/2015_09_17/o1_mf_nnndf_TAG20150917T214630_bzp64pfz_.bkp tag=TAG20150917T214630
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 17-SEP-15
datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=890690141 file name=/oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_system_bzp6lgss_.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=7 STAMP=890690141 file name=/oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_undotbs1_bzp6lgr3_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=8 STAMP=890690141 file name=/oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_sysaux_bzp6lgsy_.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=9 STAMP=890690141 file name=/oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_system_bzp6nsxh_.dbf
datafile 8 switched to datafile copy
input datafile copy RECID=10 STAMP=890690141 file name=/oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_sysaux_bzp6nsw8_.dbf
contents of Memory Script:
{
# set requested point in time
set until scn 1768101;
# online the datafiles restored or switched
sql clone "alter database datafile 1 online";
sql clone "alter database datafile 5 online";
sql clone "alter database datafile 3 online";
sql clone 'SHAKA' "alter database datafile
7 online";
sql clone 'SHAKA' "alter database datafile
8 online";
# recover and open database read only
recover clone database tablespace "SYSTEM", "UNDOTBS1", "SYSAUX", "SHAKA":"SYSTEM", "SHAKA":"SYSAUX";
sql clone 'alter database open read only';
}
executing Memory Script
executing command: SET until clause
sql statement: alter database datafile 1 online
sql statement: alter database datafile 5 online
sql statement: alter database datafile 3 online
sql statement: alter database datafile 7 online
sql statement: alter database datafile 8 online
Starting recover at 17-SEP-15
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 178 is already on disk as file /oracle/orafra/BIGDB/archivelog/2015_09_17/o1_mf_1_178_bzp6kppd_.arc
archived log file name=/oracle/orafra/BIGDB/archivelog/2015_09_17/o1_mf_1_178_bzp6kppd_.arc thread=1 sequence=178
media recovery complete, elapsed time: 00:00:01
Finished recover at 17-SEP-15
sql statement: alter database open read only
contents of Memory Script:
{
sql clone 'alter pluggable database SHAKA open read only';
}
executing Memory Script
sql statement: alter pluggable database SHAKA open read only
contents of Memory Script:
{
sql clone "create spfile from memory";
shutdown clone immediate;
startup clone nomount;
sql clone "alter system set control_files =
''/oracle/oradata/RESTOTEMP/BIGDB/controlfile/o1_mf_bzp6l7w3_.ctl'' comment=
''RMAN set'' scope=spfile";
shutdown clone immediate;
startup clone nomount;
# mount database
sql clone 'alter database mount clone database';
}
executing Memory Script
sql statement: create spfile from memory
database closed
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 1107296256 bytes
Fixed Size 2923488 bytes
Variable Size 318768160 bytes
Database Buffers 771751936 bytes
Redo Buffers 13852672 bytes
sql statement: alter system set control_files = ''/oracle/oradata/RESTOTEMP/BIGDB/controlfile/o1_mf_bzp6l7w3_.ctl'' comment= ''RMAN set'' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 1107296256 bytes
Fixed Size 2923488 bytes
Variable Size 318768160 bytes
Database Buffers 771751936 bytes
Redo Buffers 13852672 bytes
sql statement: alter database mount clone database
contents of Memory Script:
{
# set requested point in time
set until scn 1768101;
# set destinations for recovery set and auxiliary set datafiles
set newname for datafile 9 to new;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 9;
switch clone datafile all;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
Starting restore at 17-SEP-15
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=21 device type=DISK
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 00009 to /oracle/oradata/RESTOTEMP/KHWB_PITR_SHAKA_BIGDB/datafile/o1_mf_users_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /oracle/orafra/BIGDB/1FE4958522E127B3E05346000A0A3C14/backupset/2015_09_17/o1_mf_nnndf_TAG20150917T214630_bzp64pfz_.bkp
channel ORA_AUX_DISK_1: piece handle=/oracle/orafra/BIGDB/1FE4958522E127B3E05346000A0A3C14/backupset/2015_09_17/o1_mf_nnndf_TAG20150917T214630_bzp64pfz_.bkp tag=TAG20150917T214630
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 17-SEP-15
datafile 9 switched to datafile copy
input datafile copy RECID=12 STAMP=890690227 file name=/oracle/oradata/RESTOTEMP/KHWB_PITR_SHAKA_BIGDB/datafile/o1_mf_users_bzp6qtvd_.dbf
contents of Memory Script:
{
# set requested point in time
set until scn 1768101;
# online the datafiles restored or switched
sql clone 'SHAKA' "alter database datafile
9 online";
# recover and open resetlogs
recover clone database tablespace "SHAKA":"USERS", "SYSTEM", "UNDOTBS1", "SYSAUX", "SHAKA":"SYSTEM", "SHAKA":"SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script
executing command: SET until clause
sql statement: alter database datafile 9 online
Starting recover at 17-SEP-15
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 178 is already on disk as file /oracle/orafra/BIGDB/archivelog/2015_09_17/o1_mf_1_178_bzp6kppd_.arc
archived log file name=/oracle/orafra/BIGDB/archivelog/2015_09_17/o1_mf_1_178_bzp6kppd_.arc thread=1 sequence=178
media recovery complete, elapsed time: 00:00:01
Finished recover at 17-SEP-15
database opened
contents of Memory Script:
{
sql clone 'alter pluggable database SHAKA open';
}
executing Memory Script
sql statement: alter pluggable database SHAKA open
contents of Memory Script:
{
# create directory for datapump import
sql 'SHAKA' "create or replace directory
TSPITR_DIROBJ_DPDIR as ''
/oracle/oradata/RESTOTEMP''";
# create directory for datapump export
sql clone 'SHAKA' "create or replace directory
TSPITR_DIROBJ_DPDIR as ''
/oracle/oradata/RESTOTEMP''";
}
executing Memory Script
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/oracle/oradata/RESTOTEMP''
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/oracle/oradata/RESTOTEMP''
Performing export of tables...
EXPDP> Starting "SYS"."TSPITR_EXP_khwb_tmtv":
EXPDP> Estimate in progress using BLOCKS method...
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
EXPDP> Total estimation using BLOCKS method: 128 MB
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
EXPDP> Processing object type TABLE_EXPORT/TABLE/IDENTITY_COLUMN
EXPDP> Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
EXPDP> . . exported "USERTEST1"."TEST" 104.0 MB 1572864 rows
EXPDP> Master table "SYS"."TSPITR_EXP_khwb_tmtv" successfully loaded/unloaded
EXPDP> ******************************************************************************
EXPDP> Dump file set for SYS.TSPITR_EXP_khwb_tmtv is:
EXPDP> /oracle/oradata/RESTOTEMP/tspitr_khwb_83761.dmp
EXPDP> Job "SYS"."TSPITR_EXP_khwb_tmtv" successfully completed at Thu Sep 17 21:58:55 2015 elapsed 0 00:00:44
Export completed
contents of Memory Script:
{
# shutdown clone before import
shutdown clone abort
}
executing Memory Script
Oracle instance shut down
Performing import of tables...
IMPDP> Master table "SYS"."TSPITR_IMP_khwb_bhos" successfully loaded/unloaded
IMPDP> Starting "SYS"."TSPITR_IMP_khwb_bhos":
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
IMPDP> . . imported "USERTEST1"."TEST_RESTO" 104.0 MB 1572864 rows
IMPDP> Processing object type TABLE_EXPORT/TABLE/IDENTITY_COLUMN
IMPDP> ORA-39083: Object type IDENTITY_COLUMN:"USERTEST1" failed to create with error:
ORA-38301: can not perform DDL/DML over objects in Recycle Bin
Failing sql is:
ALTER TABLE "USERTEST1"."BIN$H/c86Y0pC77gU0YACgreOg==$0" MODIFY ("ID" GENERATED ALWAYS AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH LIMIT VALUE CACHE 20 NOORDER NOCYCLE )
IMPDP> Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
IMPDP> ORA-31684: Object type CONSTRAINT:"USERTEST1"."SYS_C009993" already exists
IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
IMPDP> Job "SYS"."TSPITR_IMP_khwb_bhos" completed with 2 error(s) at Thu Sep 17 21:59:56 2015 elapsed 0 00:00:47
import completed with errors; Oracle Data Pump dump file tspitr_khwb_83761.dmp is retained
Removing automatic instance
Automatic instance removed
auxiliary instance file /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_temp_bzp6p9xf_.tmp deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_temp_bzp6p1kk_.tmp deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/KHWB_PITR_SHAKA_BIGDB/onlinelog/o1_mf_3_bzp6rsgm_.log deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/KHWB_PITR_SHAKA_BIGDB/onlinelog/o1_mf_2_bzp6rrfg_.log deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/KHWB_PITR_SHAKA_BIGDB/onlinelog/o1_mf_1_bzp6rq2c_.log deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/KHWB_PITR_SHAKA_BIGDB/datafile/o1_mf_users_bzp6qtvd_.dbf deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_sysaux_bzp6nsw8_.dbf deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_system_bzp6nsxh_.dbf deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_sysaux_bzp6lgsy_.dbf deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_undotbs1_bzp6lgr3_.dbf deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/BIGDB/datafile/o1_mf_system_bzp6lgss_.dbf deleted
auxiliary instance file /oracle/oradata/RESTOTEMP/BIGDB/controlfile/o1_mf_bzp6l7w3_.ctl deleted
Finished recover at 17-SEP-15