rman 12c new features

Upload: doyenblog

Post on 11-Oct-2015

278 views

Category:

Documents


0 download

DESCRIPTION

Rman 12c table restoration features.

TRANSCRIPT

12c rman table restore

12c rman table restore

Pre-requisites:

The target database must be in read-write mode.

The target database must be in ARCHIVELOG mode.

You must have RMAN backups of the tables or table partitions as they existed at the point in time to which you want recover these objects.

To recover single table partitions, the COMPATIBLE initialization parameter for target database must be set to 11.1.0 or higher.

Prior to recovering a table or table partition, Must perform a full backup of undo, SYSTEM, SYSAUX, SYSEXT (if the SYSEXT tablespace exists in your database) and the tablespace that contains the table or table partition.

If the indexes or partitions for a table in tablespace tbs1 are contained in tablespace tbs2, then recover the table only if tablepsace tbs2 is also included in the recovery set. To recover a table, all partitions that contain the dependent objects of the table must be included in they set.

#1. Creating EMP table and SCN details.

#2. Rman backup the database.

#3. Deleting system and scott record in EMP tables.

#4. Restoring the table to scn 2021413.

SYNTAX:

recover SCHEMA.OBJECT NAME until SCN|TIME auxiliary destination 'LOCATION FOR TEMP INSTANCE';

#5. Table Point In Time Recovery (PITR) with NOTABLEIMPORT.

Rather than completing the whole recovery, you can just stop at the point where the recovered table is in a data pump dump file, which you can import manually at a later time. The following example uses the DATAPUMP DESTINATION, DUMP FILE and NOTABLEIMPORT clauses to achieve this.

#6. After confirmation with EMP1 table with developer team, Then restore the EMP table.

Drop the table.

Restoring the table with scn.

Crosscheck the table count.

Face issue no backup found.

Action Taken:

DELETE EXPIRED BACKUP;

_1234567890/rman_table_output.txt[oracle@racinst11 database]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Tue Sep 2 19:12:31 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

connected to target database: TEST (DBID=2154975638)

RMAN>RECOVER TABLE 'TEST'.'EMP'UNTIL SCN 2021413AUXILIARY DESTINATION '/u01/app/RMAN/aux'REMAP TABLE 'TEST'.'EMP':'EMP1';RMAN> 2> 3> 4>

Starting recover at 02-SEP-14using target database control file instead of recovery catalogcurrent log archivedallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=82 instance=TEST1 device type=DISKallocated channel: ORA_DISK_2channel ORA_DISK_2: SID=40 instance=TEST1 device type=DISKallocated channel: ORA_DISK_3channel ORA_DISK_3: SID=84 instance=TEST1 device type=DISKallocated channel: ORA_DISK_4channel ORA_DISK_4: SID=64 instance=TEST1 device type=DISKallocated channel: ORA_DISK_5channel ORA_DISK_5: SID=81 instance=TEST1 device type=DISKRMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time

List of tablespaces expected to have UNDO segmentsTablespace SYSTEMTablespace UNDOTBS1Tablespace UNDOTBS2

Creating automatic instance, with SID='cumk'

initialization parameters used for automatic instance:db_name=TESTdb_unique_name=cumk_pitr_TESTcompatible=12.1.0.0.0db_block_size=8192db_files=200sga_target=1Gprocesses=80diagnostic_dest=/u01/app/databasedb_create_file_dest=/u01/app/RMAN/auxlog_archive_dest_1='location=/u01/app/RMAN/aux'#No auxiliary parameter file used

starting up automatic instance TEST

Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2296576 bytesVariable Size 281019648 bytesDatabase Buffers 780140544 bytesRedo Buffers 5480448 bytesAutomatic instance created

contents of Memory Script:{# set requested point in timeset until scn 2021413;# restore the controlfilerestore clone controlfile;# mount the controlfilesql clone 'alter database mount clone database';# archive current online logsql 'alter system archive log current';}executing Memory Script

executing command: SET until clause

Starting restore at 02-SEP-14allocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: SID=29 device type=DISKallocated channel: ORA_AUX_DISK_2channel ORA_AUX_DISK_2: SID=30 device type=DISKallocated channel: ORA_AUX_DISK_3channel ORA_AUX_DISK_3: SID=27 device type=DISKallocated channel: ORA_AUX_DISK_4channel ORA_AUX_DISK_4: SID=28 device type=DISKallocated channel: ORA_AUX_DISK_5channel ORA_AUX_DISK_5: SID=31 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: restoring control filechannel ORA_AUX_DISK_1: reading from backup piece /u01/app/database/product/rac/12c/db_1/dbs/c-2154975638-20140902-00channel ORA_AUX_DISK_1: piece handle=/u01/app/database/product/rac/12c/db_1/dbs/c-2154975638-20140902-00 tag=TAG20140902T191138channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01output file name=/u01/app/RMAN/aux/TEST/controlfile/o1_mf_b0cld6ww_.ctlFinished restore at 02-SEP-14

sql statement: alter database mount clone database

sql statement: alter system archive log current

contents of Memory Script:{# set requested point in timeset until scn 2021413;# set destinations for recovery set and auxiliary set datafilesset newname for clone datafile 1 to new;set newname for clone datafile 4 to new;set newname for clone datafile 2 to new;set newname for clone datafile 3 to new;set newname for clone tempfile 1 to new;# switch all tempfilesswitch clone tempfile all;# restore the tablespaces in the recovery set and the auxiliary setrestore clone datafile 1, 4, 2, 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

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/RMAN/aux/TEST/datafile/o1_mf_temp_%u_.tmp in cont

Starting restore at 02-SEP-14using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3using channel ORA_AUX_DISK_4using channel ORA_AUX_DISK_5

channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/RMAN/aux/TEST/datafchannel ORA_AUX_DISK_1: reading from backup piece /u01/app/RMAN/database/test_bkchannel ORA_AUX_DISK_2: starting datafile backup set restorechannel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_2: restoring datafile 00004 to /u01/app/RMAN/aux/TEST/datafchannel ORA_AUX_DISK_2: restoring datafile 00002 to /u01/app/RMAN/aux/TEST/datafchannel ORA_AUX_DISK_2: reading from backup piece /u01/app/RMAN/database/test_bkchannel ORA_AUX_DISK_3: starting datafile backup set restorechannel ORA_AUX_DISK_3: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_3: restoring datafile 00003 to /u01/app/RMAN/aux/TEST/datafchannel ORA_AUX_DISK_3: reading from backup piece /u01/app/RMAN/database/test_bkchannel ORA_AUX_DISK_2: piece handle=/u01/app/RMAN/database/test_bk1ephgvpf_1_1 tag=TAG20140902T191039channel ORA_AUX_DISK_2: restored backup piece 1channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:00:17channel ORA_AUX_DISK_1: piece handle=/u01/app/RMAN/database/test_bk1cphgvpf_1_1 tag=TAG20140902T191039channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:19channel ORA_AUX_DISK_3: piece handle=/u01/app/RMAN/database/test_bk1dphgvpf_1_1 tag=TAG20140902T191039channel ORA_AUX_DISK_3: restored backup piece 1channel ORA_AUX_DISK_3: restore complete, elapsed time: 00:01:19Finished restore at 02-SEP-14

datafile 1 switched to datafile copyinput datafile copy RECID=5 STAMP=857243709 file name=/u01/app/RMAN/aux/TEST/datafile/o1_mf_system_b0cldotn_.dbfdatafile 4 switched to datafile copyinput datafile copy RECID=6 STAMP=857243709 file name=/u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs1_b0cldoqq_.dbfdatafile 2 switched to datafile copyinput datafile copy RECID=7 STAMP=857243709 file name=/u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs2_b0cldorv_.dbfdatafile 3 switched to datafile copyinput datafile copy RECID=8 STAMP=857243709 file name=/u01/app/RMAN/aux/TEST/datafile/o1_mf_sysaux_b0cldotb_.dbf

contents of Memory Script:{# set requested point in timeset until scn 2021413;# online the datafiles restored or switchedsql clone "alter database datafile 1 online";sql clone "alter database datafile 4 online";sql clone "alter database datafile 2 online";sql clone "alter database datafile 3 online";# recover and open database read onlyrecover clone database tablespace "SYSTEM", "UNDOTBS1", "UNDOTBS2", "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 2 online

sql statement: alter database datafile 3 online

Starting recover at 02-SEP-14using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3using channel ORA_AUX_DISK_4using channel ORA_AUX_DISK_5

starting media recovery

archived log for thread 1 with sequence 29 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_29.305.857243495archived log for thread 1 with sequence 30 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_30.299.857243597archived log for thread 2 with sequence 28 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_28.303.857243497archived log for thread 2 with sequence 29 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_29.300.857243595archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_29.305.857243495 thread=1 sequence=29archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_28.303.857243497 thread=2 sequence=28archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_30.299.857243597 thread=1 sequence=30archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_29.300.857243595 thread=2 sequence=29media recovery complete, elapsed time: 00:00:00Finished recover at 02-SEP-14

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 = ''/u01/app/RMAN/aux/TEST/controlfile/o1_mf_b0cld6ww_.ctl'' comment= ''RMAN set'' scope=spfile"; shutdown clone immediate; startup clone nomount;# mount databasesql clone 'alter database mount clone database';}executing Memory Script

sql statement: create spfile from memory

database closeddatabase dismountedOracle instance shut down

connected to auxiliary database (not started)Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2296576 bytesVariable Size 285213952 bytesDatabase Buffers 775946240 bytesRedo Buffers 5480448 bytes

sql statement: alter system set control_files = ''/u01/app/RMAN/aux/TEST/controlfile/o1_mf_b0cld6ww_.ctl'' comment= ''RMAN set'' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2296576 bytesVariable Size 285213952 bytesDatabase Buffers 775946240 bytesRedo Buffers 5480448 bytes

sql statement: alter database mount clone database

contents of Memory Script:{# set requested point in timeset until scn 2021413;# set destinations for recovery set and auxiliary set datafilesset newname for datafile 6 to new;# restore the tablespaces in the recovery set and the auxiliary setrestore clone datafile 6;switch clone datafile all;}executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 02-SEP-14allocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: SID=34 device type=DISKallocated channel: ORA_AUX_DISK_2channel ORA_AUX_DISK_2: SID=35 device type=DISKallocated channel: ORA_AUX_DISK_3channel ORA_AUX_DISK_3: SID=36 device type=DISKallocated channel: ORA_AUX_DISK_4channel ORA_AUX_DISK_4: SID=37 device type=DISKallocated channel: ORA_AUX_DISK_5channel ORA_AUX_DISK_5: SID=38 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_1: restoring datafile 00006 to /u01/app/RMAN/aux/CUMK_PITR_TEST/datafile/o1_mf_users_%u_.dbfchannel ORA_AUX_DISK_1: reading from backup piece /u01/app/RMAN/database/test_bk1dphgvpf_1_1channel ORA_AUX_DISK_1: piece handle=/u01/app/RMAN/database/test_bk1dphgvpf_1_1 tag=TAG20140902T191039channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01Finished restore at 02-SEP-14

datafile 6 switched to datafile copyinput datafile copy RECID=10 STAMP=857243762 file name=/u01/app/RMAN/aux/CUMK_PITR_TEST/datafile/o1_mf_users_b0cljs4y_.dbf

contents of Memory Script:{# set requested point in timeset until scn 2021413;# online the datafiles restored or switchedsql clone "alter database datafile 6 online";# recover and open resetlogsrecover clone database tablespace "USERS", "SYSTEM", "UNDOTBS1", "UNDOTBS2", "SYSAUX" delete archivelog;alter clone database open resetlogs;}executing Memory Script

executing command: SET until clause

sql statement: alter database datafile 6 online

Starting recover at 02-SEP-14using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3using channel ORA_AUX_DISK_4using channel ORA_AUX_DISK_5

starting media recovery

archived log for thread 1 with sequence 29 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_29.305.857243495archived log for thread 1 with sequence 30 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_30.299.857243597archived log for thread 2 with sequence 28 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_28.303.857243497archived log for thread 2 with sequence 29 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_29.300.857243595archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_29.305.857243495 thread=1 sequence=29archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_28.303.857243497 thread=2 sequence=28archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_30.299.857243597 thread=1 sequence=30archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_29.300.857243595 thread=2 sequence=29media recovery complete, elapsed time: 00:00:01Finished recover at 02-SEP-14

database opened

contents of Memory Script:{# create directory for datapump importsql "create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/RMAN/aux''";# create directory for datapump exportsql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/RMAN/aux''";}executing Memory Script

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/RMAN/aux''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/RMAN/aux''

Performing export of tables... EXPDP> Starting "SYS"."TSPITR_EXP_cumk_yubr": EXPDP> Estimate in progress using BLOCKS method... EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA EXPDP> Total estimation using BLOCKS method: 13 MB 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 "TEST"."EMP" 10.35 MB 90761 rows EXPDP> Master table "SYS"."TSPITR_EXP_cumk_yubr" successfully loaded/unloaded EXPDP> ****************************************************************************** EXPDP> Dump file set for SYS.TSPITR_EXP_cumk_yubr is: EXPDP> /u01/app/RMAN/aux/tspitr_cumk_57374.dmp EXPDP> Job "SYS"."TSPITR_EXP_cumk_yubr" successfully completed at Tue Sep 2 19:18:01 2014 elapsed 0 00:00:50Export completed

contents of Memory Script:{# shutdown clone before importshutdown clone abort}executing Memory Script

Oracle instance shut down

Performing import of tables... IMPDP> Master table "SYS"."TSPITR_IMP_cumk_nuto" successfully loaded/unloaded IMPDP> Starting "SYS"."TSPITR_IMP_cumk_nuto": IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA IMPDP> . . imported "TEST"."EMP1" 10.35 MB 90761 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_cumk_nuto" successfully completed at Tue Sep 2 19:20:22 2014 elapsed 0 00:01:23Import completed

Removing automatic instanceAutomatic instance removedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_temp_b0clh9ox_.tmp deletedauxiliary instance file /u01/app/RMAN/aux/CUMK_PITR_TEST/onlinelog/o1_mf_4_b0cljzbm_.log deletedauxiliary instance file /u01/app/RMAN/aux/CUMK_PITR_TEST/onlinelog/o1_mf_3_b0cljxn5_.log deletedauxiliary instance file /u01/app/RMAN/aux/CUMK_PITR_TEST/onlinelog/o1_mf_2_b0cljwft_.log deletedauxiliary instance file /u01/app/RMAN/aux/CUMK_PITR_TEST/onlinelog/o1_mf_1_b0cljvby_.log deletedauxiliary instance file /u01/app/RMAN/aux/CUMK_PITR_TEST/datafile/o1_mf_users_b0cljs4y_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_sysaux_b0cldotb_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs2_b0cldorv_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs1_b0cldoqq_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_system_b0cldotn_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/controlfile/o1_mf_b0cld6ww_.ctl deletedauxiliary instance file tspitr_cumk_57374.dmp deletedFinished recover at 02-SEP-14

_1234567891/rman_table_pitr.txtTable Point In Time Recovery (PITR) to Dump File

[oracle@racinst11 export]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Tue Sep 2 19:56:53 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

connected to target database: TEST (DBID=2154975638)

RMAN> RECOVER TABLE 'TEST'.'EMP'UNTIL SCN 2021413AUXILIARY DESTINATION '/u01/app/RMAN/aux'DATAPUMP DESTINATION '/u01/app/RMAN/export'DUMP FILE 'test_backup.dmp'NOTABLEIMPORT;2> 3> 4> 5> 6>

Starting recover at 02-SEP-14using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=72 instance=TEST1 device type=DISKallocated channel: ORA_DISK_2channel ORA_DISK_2: SID=82 instance=TEST1 device type=DISKallocated channel: ORA_DISK_3channel ORA_DISK_3: SID=40 instance=TEST1 device type=DISKallocated channel: ORA_DISK_4channel ORA_DISK_4: SID=77 instance=TEST1 device type=DISKallocated channel: ORA_DISK_5channel ORA_DISK_5: SID=74 instance=TEST1 device type=DISKRMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time

List of tablespaces expected to have UNDO segmentsTablespace SYSTEMTablespace UNDOTBS1Tablespace UNDOTBS2

Creating automatic instance, with SID='bxgo'

initialization parameters used for automatic instance:db_name=TESTdb_unique_name=bxgo_pitr_TESTcompatible=12.1.0.0.0db_block_size=8192db_files=200sga_target=1Gprocesses=80diagnostic_dest=/u01/app/databasedb_create_file_dest=/u01/app/RMAN/auxlog_archive_dest_1='location=/u01/app/RMAN/aux'#No auxiliary parameter file used

starting up automatic instance TEST

Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2296576 bytesVariable Size 281019648 bytesDatabase Buffers 780140544 bytesRedo Buffers 5480448 bytesAutomatic instance created

contents of Memory Script:{# set requested point in timeset until scn 2021413;# restore the controlfilerestore clone controlfile;# mount the controlfilesql clone 'alter database mount clone database';# archive current online logsql 'alter system archive log current';}executing Memory Script

executing command: SET until clause

Starting restore at 02-SEP-14allocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: SID=28 device type=DISKallocated channel: ORA_AUX_DISK_2channel ORA_AUX_DISK_2: SID=29 device type=DISKallocated channel: ORA_AUX_DISK_3channel ORA_AUX_DISK_3: SID=30 device type=DISKallocated channel: ORA_AUX_DISK_4channel ORA_AUX_DISK_4: SID=31 device type=DISKallocated channel: ORA_AUX_DISK_5channel ORA_AUX_DISK_5: SID=32 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: restoring control filechannel ORA_AUX_DISK_1: reading from backup piece /u01/app/database/product/rac/12c/db_1/dbs/c-2154975638-20140902-00channel ORA_AUX_DISK_1: piece handle=/u01/app/database/product/rac/12c/db_1/dbs/c-2154975638-20140902-00 tag=TAG20140902T191138channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03output file name=/u01/app/RMAN/aux/TEST/controlfile/o1_mf_b0cny8hs_.ctlFinished restore at 02-SEP-14

sql statement: alter database mount clone database

sql statement: alter system archive log current

contents of Memory Script:{# set requested point in timeset until scn 2021413;# set destinations for recovery set and auxiliary set datafilesset newname for clone datafile 1 to new;set newname for clone datafile 4 to new;set newname for clone datafile 2 to new;set newname for clone datafile 3 to new;set newname for clone tempfile 1 to new;# switch all tempfilesswitch clone tempfile all;# restore the tablespaces in the recovery set and the auxiliary setrestore clone datafile 1, 4, 2, 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

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/RMAN/aux/TEST/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 02-SEP-14using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3using channel ORA_AUX_DISK_4using channel ORA_AUX_DISK_5

channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/RMAN/aux/TEST/datafile/o1_mf_system_%u_.dbfchannel ORA_AUX_DISK_1: reading from backup piece /u01/app/RMAN/database/test_bk1cphgvpf_1_1channel ORA_AUX_DISK_2: starting datafile backup set restorechannel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_2: restoring datafile 00004 to /u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs1_%u_.dbfchannel ORA_AUX_DISK_2: restoring datafile 00002 to /u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs2_%u_.dbfchannel ORA_AUX_DISK_2: reading from backup piece /u01/app/RMAN/database/test_bk1ephgvpf_1_1channel ORA_AUX_DISK_3: starting datafile backup set restorechannel ORA_AUX_DISK_3: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_3: restoring datafile 00003 to /u01/app/RMAN/aux/TEST/datafile/o1_mf_sysaux_%u_.dbfchannel ORA_AUX_DISK_3: reading from backup piece /u01/app/RMAN/database/test_bk1dphgvpf_1_1channel ORA_AUX_DISK_2: piece handle=/u01/app/RMAN/database/test_bk1ephgvpf_1_1 tag=TAG20140902T191039channel ORA_AUX_DISK_2: restored backup piece 1channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:00:10channel ORA_AUX_DISK_1: piece handle=/u01/app/RMAN/database/test_bk1cphgvpf_1_1 tag=TAG20140902T191039channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:10channel ORA_AUX_DISK_3: piece handle=/u01/app/RMAN/database/test_bk1dphgvpf_1_1 tag=TAG20140902T191039channel ORA_AUX_DISK_3: restored backup piece 1channel ORA_AUX_DISK_3: restore complete, elapsed time: 00:01:19Finished restore at 02-SEP-14

datafile 1 switched to datafile copyinput datafile copy RECID=5 STAMP=857246339 file name=/u01/app/RMAN/aux/TEST/datafile/o1_mf_system_b0cnyvyv_.dbfdatafile 4 switched to datafile copyinput datafile copy RECID=6 STAMP=857246339 file name=/u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs1_b0cnyw22_.dbfdatafile 2 switched to datafile copyinput datafile copy RECID=7 STAMP=857246339 file name=/u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs2_b0cnyw68_.dbfdatafile 3 switched to datafile copyinput datafile copy RECID=8 STAMP=857246339 file name=/u01/app/RMAN/aux/TEST/datafile/o1_mf_sysaux_b0cnywff_.dbf

contents of Memory Script:{# set requested point in timeset until scn 2021413;# online the datafiles restored or switchedsql clone "alter database datafile 1 online";sql clone "alter database datafile 4 online";sql clone "alter database datafile 2 online";sql clone "alter database datafile 3 online";# recover and open database read onlyrecover clone database tablespace "SYSTEM", "UNDOTBS1", "UNDOTBS2", "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 2 online

sql statement: alter database datafile 3 online

Starting recover at 02-SEP-14using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3using channel ORA_AUX_DISK_4using channel ORA_AUX_DISK_5

starting media recovery

archived log for thread 1 with sequence 29 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_29.305.857243495archived log for thread 1 with sequence 30 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_30.299.857243597archived log for thread 2 with sequence 28 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_28.303.857243497archived log for thread 2 with sequence 29 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_29.300.857243595archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_29.305.857243495 thread=1 sequence=29archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_28.303.857243497 thread=2 sequence=28archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_30.299.857243597 thread=1 sequence=30archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_29.300.857243595 thread=2 sequence=29media recovery complete, elapsed time: 00:00:01Finished recover at 02-SEP-14

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 = ''/u01/app/RMAN/aux/TEST/controlfile/o1_mf_b0cny8hs_.ctl'' comment= ''RMAN set'' scope=spfile"; shutdown clone immediate; startup clone nomount;# mount databasesql clone 'alter database mount clone database';}executing Memory Script

sql statement: create spfile from memory

database closeddatabase dismountedOracle instance shut down

connected to auxiliary database (not started)Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2296576 bytesVariable Size 285213952 bytesDatabase Buffers 775946240 bytesRedo Buffers 5480448 bytes

sql statement: alter system set control_files = ''/u01/app/RMAN/aux/TEST/controlfile/o1_mf_b0cny8hs_.ctl'' comment= ''RMAN set'' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2296576 bytesVariable Size 285213952 bytesDatabase Buffers 775946240 bytesRedo Buffers 5480448 bytes

sql statement: alter database mount clone database

contents of Memory Script:{# set requested point in timeset until scn 2021413;# set destinations for recovery set and auxiliary set datafilesset newname for datafile 6 to new;# restore the tablespaces in the recovery set and the auxiliary setrestore clone datafile 6;switch clone datafile all;}executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 02-SEP-14allocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: SID=34 device type=DISKallocated channel: ORA_AUX_DISK_2channel ORA_AUX_DISK_2: SID=35 device type=DISKallocated channel: ORA_AUX_DISK_3channel ORA_AUX_DISK_3: SID=36 device type=DISKallocated channel: ORA_AUX_DISK_4channel ORA_AUX_DISK_4: SID=37 device type=DISKallocated channel: ORA_AUX_DISK_5channel ORA_AUX_DISK_5: SID=38 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_1: restoring datafile 00006 to /u01/app/RMAN/aux/BXGO_PITR_TEST/datafile/o1_mf_users_%u_.dbfchannel ORA_AUX_DISK_1: reading from backup piece /u01/app/RMAN/database/test_bk1dphgvpf_1_1channel ORA_AUX_DISK_1: piece handle=/u01/app/RMAN/database/test_bk1dphgvpf_1_1 tag=TAG20140902T191039channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01Finished restore at 02-SEP-14

datafile 6 switched to datafile copyinput datafile copy RECID=10 STAMP=857246395 file name=/u01/app/RMAN/aux/BXGO_PITR_TEST/datafile/o1_mf_users_b0co32vf_.dbf

contents of Memory Script:{# set requested point in timeset until scn 2021413;# online the datafiles restored or switchedsql clone "alter database datafile 6 online";# recover and open resetlogsrecover clone database tablespace "USERS", "SYSTEM", "UNDOTBS1", "UNDOTBS2", "SYSAUX" delete archivelog;alter clone database open resetlogs;}executing Memory Script

executing command: SET until clause

sql statement: alter database datafile 6 online

Starting recover at 02-SEP-14using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3using channel ORA_AUX_DISK_4using channel ORA_AUX_DISK_5

starting media recovery

archived log for thread 1 with sequence 29 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_29.305.857243495archived log for thread 1 with sequence 30 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_30.299.857243597archived log for thread 2 with sequence 28 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_28.303.857243497archived log for thread 2 with sequence 29 is already on disk as file +DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_29.300.857243595archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_29.305.857243495 thread=1 sequence=29archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_28.303.857243497 thread=2 sequence=28archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_1_seq_30.299.857243597 thread=1 sequence=30archived log file name=+DATA/TEST/ARCHIVELOG/2014_09_02/thread_2_seq_29.300.857243595 thread=2 sequence=29media recovery complete, elapsed time: 00:00:00Finished recover at 02-SEP-14

database opened

contents of Memory Script:{# create directory for datapump importsql "create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/RMAN/export''";# create directory for datapump exportsql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/RMAN/export''";}executing Memory Script

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/RMAN/export''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/RMAN/export''

Performing export of tables... EXPDP> Starting "SYS"."TSPITR_EXP_bxgo_lkxf": EXPDP> Estimate in progress using BLOCKS method... EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA EXPDP> Total estimation using BLOCKS method: 13 MB 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 "TEST"."EMP" 10.35 MB 90761 rows EXPDP> Master table "SYS"."TSPITR_EXP_bxgo_lkxf" successfully loaded/unloaded EXPDP> ****************************************************************************** EXPDP> Dump file set for SYS.TSPITR_EXP_bxgo_lkxf is: EXPDP> /u01/app/RMAN/export/test_backup.dmp EXPDP> Job "SYS"."TSPITR_EXP_bxgo_lkxf" successfully completed at Tue Sep 2 20:01:26 2014 elapsed 0 00:00:29Export completed

Not performing table import after point-in-time recovery

Removing automatic instanceshutting down automatic instanceOracle instance shut downAutomatic instance removedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_temp_b0co1kp1_.tmp deletedauxiliary instance file /u01/app/RMAN/aux/BXGO_PITR_TEST/onlinelog/o1_mf_4_b0co3b9l_.log deletedauxiliary instance file /u01/app/RMAN/aux/BXGO_PITR_TEST/onlinelog/o1_mf_3_b0co390y_.log deletedauxiliary instance file /u01/app/RMAN/aux/BXGO_PITR_TEST/onlinelog/o1_mf_2_b0co36m2_.log deletedauxiliary instance file /u01/app/RMAN/aux/BXGO_PITR_TEST/onlinelog/o1_mf_1_b0co35fz_.log deletedauxiliary instance file /u01/app/RMAN/aux/BXGO_PITR_TEST/datafile/o1_mf_users_b0co32vf_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_sysaux_b0cnywff_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs2_b0cnyw68_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_undotbs1_b0cnyw22_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/datafile/o1_mf_system_b0cnyvyv_.dbf deletedauxiliary instance file /u01/app/RMAN/aux/TEST/controlfile/o1_mf_b0cny8hs_.ctl deletedFinished recover at 02-SEP-14