Table Recovery in 12c Enterprise Edition
RMAN> RECOVER TABLE 'TEST1'.'TEST1'
UNTIL SCN 3785709
AUXILIARY DESTINATION '/u06/aux';
Starting recover at 30-DEC-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=130 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='flAE'
initialization parameters used for automatic instance:
db_name=TEST
db_unique_name=flAE_pitr_TEST
compatible=12.1.0.2.0
db_block_size=8192
db_files=200
diagnostic_dest=/u01/app/oracle
_system_trig_enabled=FALSE
sga_target=2560M
processes=200
db_create_file_dest=/u06/aux
log_archive_dest_1='location=/u06/aux'
#No auxiliary parameter file used
starting up automatic instance TEST
Oracle instance started
Total System Global Area 2684354560 bytes
Fixed Size 2928008 bytes
Variable Size 603980408 bytes
Database Buffers 2063597568 bytes
Redo Buffers 13848576 bytes
Automatic instance created
contents of Memory Script:
{
# set requested point in time
set until scn 3785709;
# 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 30-DEC-16
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=6 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 /u06/odb/ORAFRA_1/TEST/autobackup/2016_12_30/o1_mf_n_931961367_d6d79zqy_.bkp
channel ORA_AUX_DISK_1: piece handle=/u06/odb/ORAFRA_1/TEST/autobackup/2016_12_30/o1_mf_n_931961367_d6d79zqy_.bkp tag=TAG20161230T140927
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u06/aux/TEST/controlfile/o1_mf_d6d88q6r_.ctl
Finished restore at 30-DEC-16
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 3785709;
# 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;
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 4, 3;
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
renamed tempfile 1 to /u06/aux/TEST/datafile/o1_mf_temp_%u_.tmp in control file
Starting restore at 30-DEC-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 /u06/aux/TEST/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u06/aux/TEST/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u06/aux/TEST/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u06/odb/backup/TEST_D_20161230_08rop6ev_s8_p1
channel ORA_AUX_DISK_1: piece handle=/u06/odb/backup/TEST_D_20161230_08rop6ev_s8_p1 tag=TAG20161230T140830
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:55
Finished restore at 30-DEC-16
datafile 1 switched to datafile copy
input datafile copy RECID=5 STAMP=931962412 file name=/u06/aux/TEST/datafile/o1_mf_system_d6d88xdh_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=6 STAMP=931962412 file name=/u06/aux/TEST/datafile/o1_mf_undotbs1_d6d88xdl_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=7 STAMP=931962412 file name=/u06/aux/TEST/datafile/o1_mf_sysaux_d6d88xdb_.dbf
contents of Memory Script:
{
# set requested point in time
set until scn 3785709;
# 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";
# recover and open database read only
recover clone database tablespace "SYSTEM", "UNDOTBS1", "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 4 online
sql statement: alter database datafile 3 online
Starting recover at 30-DEC-16
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 190 is already on disk as file /u06/odb/ORAFRA_1/TEST/archivelog/2016_12_30/o1_mf_1_190_d6d79y83_.arc
archived log for thread 1 with sequence 191 is already on disk as file /u06/odb/ORAFRA_1/TEST/archivelog/2016_12_30/o1_mf_1_191_d6d7vl6l_.arc
archived log file name=/u06/odb/ORAFRA_1/TEST/archivelog/2016_12_30/o1_mf_1_190_d6d79y83_.arc thread=1 sequence=190
archived log file name=/u06/odb/ORAFRA_1/TEST/archivelog/2016_12_30/o1_mf_1_191_d6d7vl6l_.arc thread=1 sequence=191
media recovery complete, elapsed time: 00:00:00
Finished recover at 30-DEC-16
sql statement: alter database 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 =
''/u06/aux/TEST/controlfile/o1_mf_d6d88q6r_.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 2684354560 bytes
Fixed Size 2928008 bytes
Variable Size 603980408 bytes
Database Buffers 2063597568 bytes
Redo Buffers 13848576 bytes
sql statement: alter system set control_files = ''/u06/aux/TEST/controlfile/o1_mf_d6d88q6r_.ctl'' comment= ''RMAN set'' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 2684354560 bytes
Fixed Size 2928008 bytes
Variable Size 603980408 bytes
Database Buffers 2063597568 bytes
Redo Buffers 13848576 bytes
sql statement: alter database mount clone database
contents of Memory Script:
{
# set requested point in time
set until scn 3785709;
# set destinations for recovery set and auxiliary set datafiles
set newname for datafile 2 to new;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 2;
switch clone datafile all;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
Starting restore at 30-DEC-16
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=6 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 00002 to /u06/aux/FLAE_PITR_TEST/datafile/o1_mf_test1_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u06/odb/backup/TEST_D_20161230_08rop6ev_s8_p1
channel ORA_AUX_DISK_1: piece handle=/u06/odb/backup/TEST_D_20161230_08rop6ev_s8_p1 tag=TAG20161230T140830
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 30-DEC-16
datafile 2 switched to datafile copy
input datafile copy RECID=9 STAMP=931962463 file name=/u06/aux/FLAE_PITR_TEST/datafile/o1_mf_test1_d6d8d4rf_.dbf
contents of Memory Script:
{
# set requested point in time
set until scn 3785709;
# online the datafiles restored or switched
sql clone "alter database datafile 2 online";
# recover and open resetlogs
recover clone database tablespace "TEST1", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script
executing command: SET until clause
sql statement: alter database datafile 2 online
Starting recover at 30-DEC-16
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 190 is already on disk as file /u06/odb/ORAFRA_1/TEST/archivelog/2016_12_30/o1_mf_1_190_d6d79y83_.arc
archived log for thread 1 with sequence 191 is already on disk as file /u06/odb/ORAFRA_1/TEST/archivelog/2016_12_30/o1_mf_1_191_d6d7vl6l_.arc
archived log file name=/u06/odb/ORAFRA_1/TEST/archivelog/2016_12_30/o1_mf_1_190_d6d79y83_.arc thread=1 sequence=190
archived log file name=/u06/odb/ORAFRA_1/TEST/archivelog/2016_12_30/o1_mf_1_191_d6d7vl6l_.arc thread=1 sequence=191
media recovery complete, elapsed time: 00:00:00
Finished recover at 30-DEC-16
database opened
contents of Memory Script:
{
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u06/aux''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u06/aux''";
}
executing Memory Script
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u06/aux''
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u06/aux''
Performing export of tables...
EXPDP> Starting "SYS"."TSPITR_EXP_flAE_dlnn":
EXPDP> Estimate in progress using BLOCKS method...
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
EXPDP> Total estimation using BLOCKS method: 64 KB
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
EXPDP> . . exported "TEST1"."TEST1" 5.117 KB 10 rows
EXPDP> Master table "SYS"."TSPITR_EXP_flAE_dlnn" successfully loaded/unloaded
EXPDP> ******************************************************************************
EXPDP> Dump file set for SYS.TSPITR_EXP_flAE_dlnn is:
EXPDP> /u06/aux/tspitr_flAE_12763.dmp
EXPDP> Job "SYS"."TSPITR_EXP_flAE_dlnn" successfully completed at Fri Dec 30 14:28:13 2016 elapsed 0 00:00:19
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_flAE_Crxq" successfully loaded/unloaded
IMPDP> Starting "SYS"."TSPITR_IMP_flAE_Crxq":
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
IMPDP> . . imported "TEST1"."TEST1" 5.117 KB 10 rows
IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
IMPDP> Job "SYS"."TSPITR_IMP_flAE_Crxq" successfully completed at Fri Dec 30 14:28:21 2016 elapsed 0 00:00:03
Import completed
Removing automatic instance
Automatic instance removed
auxiliary instance file /u06/aux/TEST/datafile/o1_mf_temp_d6d8bpb8_.tmp deleted
auxiliary instance file /u06/aux/FLAE_PITR_TEST/onlinelog/o1_mf_3_d6d8db79_.log deleted
auxiliary instance file /u06/aux/FLAE_PITR_TEST/onlinelog/o1_mf_2_d6d8d9c7_.log deleted
auxiliary instance file /u06/aux/FLAE_PITR_TEST/onlinelog/o1_mf_1_d6d8d8m6_.log deleted
auxiliary instance file /u06/aux/FLAE_PITR_TEST/datafile/o1_mf_test1_d6d8d4rf_.dbf deleted
auxiliary instance file /u06/aux/TEST/datafile/o1_mf_sysaux_d6d88xdb_.dbf deleted
auxiliary instance file /u06/aux/TEST/datafile/o1_mf_undotbs1_d6d88xdl_.dbf deleted
auxiliary instance file /u06/aux/TEST/datafile/o1_mf_system_d6d88xdh_.dbf deleted
auxiliary instance file /u06/aux/TEST/controlfile/o1_mf_d6d88q6r_.ctl deleted
auxiliary instance file tspitr_flAE_12763.dmp deleted
Finished recover at 30-DEC-16
Comments
Post a Comment