lunes, 4 de mayo de 2020

RECUPERACION TABLA CON RMAN

[oracle@localhost ~]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Thu Feb 28 19:39:01 2019

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

connected to target database: ACME (DBID=2033062067)

RMAN> RECOVER TABLE HR.LOLITO UNTIL SCN 2450628
2> AUXILIARY DESTINATION '/u01/backup/';

Starting recover at 28-FEB-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=592 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='yfFn'

initialization parameters used for automatic instance:
db_name=ACME
db_unique_name=yfFn_pitr_ACME
compatible=12.1.0.0.0
db_block_size=8192
db_files=250
sga_target=1G
processes=80
diagnostic_dest=/u01/app/oracle
db_create_file_dest=/u01/backup/
log_archive_dest_1='location=/u01/backup/'
#No auxiliary parameter file used


starting up automatic instance ACME

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                293602560 bytes
Database Buffers             767557632 bytes
Redo Buffers                   5480448 bytes
Automatic instance created

contents of Memory Script:
{
# set requested point in time
set until  scn 2450628;
# 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 28-FEB-19
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=111 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 +FRA/ACME/AUTOBACKUP/2019_02_28/s_1001443991.305.1001443991
channel ORA_AUX_DISK_1: piece handle=+FRA/ACME/AUTOBACKUP/2019_02_28/s_1001443991.305.1001443991 tag=TAG20190228T185311
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04
output file name=/u01/backup/ACME/controlfile/o1_mf_g7jzzxy4_.ctl
Finished restore at 28-FEB-19

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 2450628;
# 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 /u01/backup/ACME/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 28-FEB-19
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 /u01/backup/ACME/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/backup/ACME/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/backup/ACME/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2019_02_28/nnndf0_tag20190228t185243_0.336.1001443965
channel ORA_AUX_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2019_02_28/nnndf0_tag20190228t185243_0.336.1001443965 tag=TAG20190228T185243
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 28-FEB-19

datafile 1 switched to datafile copy
input datafile copy RECID=4 STAMP=1001446989 file name=/u01/backup/ACME/datafile/o1_mf_system_g7k004cn_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=5 STAMP=1001446989 file name=/u01/backup/ACME/datafile/o1_mf_undotbs1_g7k004ct_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=6 STAMP=1001446989 file name=/u01/backup/ACME/datafile/o1_mf_sysaux_g7k004cj_.dbf

contents of Memory Script:
{
# set requested point in time
set until  scn 2450628;
# 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 28-FEB-19
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 10 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_10.281.1001446089
archived log for thread 1 with sequence 11 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_11.283.1001446089
archived log for thread 1 with sequence 12 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_12.267.1001446307
archived log for thread 1 with sequence 13 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_13.266.1001446309
archived log for thread 1 with sequence 14 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_14.280.1001446315
archived log for thread 1 with sequence 15 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_15.301.1001446317
archived log for thread 1 with sequence 16 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_16.299.1001446373
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=9
channel ORA_AUX_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2019_02_28/annnf0_tag20190228t193254_0.292.1001446403
channel ORA_AUX_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2019_02_28/annnf0_tag20190228t193254_0.292.1001446403 tag=TAG20190228T193254
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=/u01/backup/1_7_1001281158.dbf thread=1 sequence=7
archived log file name=/u01/backup/1_8_1001281158.dbf thread=1 sequence=8
archived log file name=/u01/backup/1_9_1001281158.dbf thread=1 sequence=9
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_10.281.1001446089 thread=1 sequence=10
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_11.283.1001446089 thread=1 sequence=11
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_12.267.1001446307 thread=1 sequence=12
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_13.266.1001446309 thread=1 sequence=13
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_14.280.1001446315 thread=1 sequence=14
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_15.301.1001446317 thread=1 sequence=15
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_16.299.1001446373 thread=1 sequence=16
media recovery complete, elapsed time: 00:00:05
Finished recover at 28-FEB-19

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/backup/ACME/controlfile/o1_mf_g7jzzxy4_.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    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                297796864 bytes
Database Buffers             763363328 bytes
Redo Buffers                   5480448 bytes

sql statement: alter system set  control_files =   ''/u01/backup/ACME/controlfile/o1_mf_g7jzzxy4_.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 bytes
Variable Size                297796864 bytes
Database Buffers             763363328 bytes
Redo Buffers                   5480448 bytes

sql statement: alter database mount clone database

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

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 28-FEB-19
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=8 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 00006 to /u01/backup/YFFN_PITR_ACME/datafile/o1_mf_users_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2019_02_28/nnndf0_tag20190228t185243_0.336.1001443965
channel ORA_AUX_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2019_02_28/nnndf0_tag20190228t185243_0.336.1001443965 tag=TAG20190228T185243
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 28-FEB-19

datafile 6 switched to datafile copy
input datafile copy RECID=8 STAMP=1001447199 file name=/u01/backup/YFFN_PITR_ACME/datafile/o1_mf_users_g7k07gmn_.dbf

contents of Memory Script:
{
# set requested point in time
set until  scn 2450628;
# online the datafiles restored or switched
sql clone "alter database datafile  6 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  6 online

Starting recover at 28-FEB-19
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 10 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_10.281.1001446089
archived log for thread 1 with sequence 11 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_11.283.1001446089
archived log for thread 1 with sequence 12 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_12.267.1001446307
archived log for thread 1 with sequence 13 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_13.266.1001446309
archived log for thread 1 with sequence 14 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_14.280.1001446315
archived log for thread 1 with sequence 15 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_15.301.1001446317
archived log for thread 1 with sequence 16 is already on disk as file +FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_16.299.1001446373
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=9
channel ORA_AUX_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2019_02_28/annnf0_tag20190228t193254_0.292.1001446403
channel ORA_AUX_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2019_02_28/annnf0_tag20190228t193254_0.292.1001446403 tag=TAG20190228T193254
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=/u01/backup/1_7_1001281158.dbf thread=1 sequence=7
channel clone_default: deleting archived log(s)
archived log file name=/u01/backup/1_7_1001281158.dbf RECID=80 STAMP=1001447201
archived log file name=/u01/backup/1_8_1001281158.dbf thread=1 sequence=8
channel clone_default: deleting archived log(s)
archived log file name=/u01/backup/1_8_1001281158.dbf RECID=82 STAMP=1001447202
archived log file name=/u01/backup/1_9_1001281158.dbf thread=1 sequence=9
channel clone_default: deleting archived log(s)
archived log file name=/u01/backup/1_9_1001281158.dbf RECID=81 STAMP=1001447201
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_10.281.1001446089 thread=1 sequence=10
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_11.283.1001446089 thread=1 sequence=11
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_12.267.1001446307 thread=1 sequence=12
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_13.266.1001446309 thread=1 sequence=13
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_14.280.1001446315 thread=1 sequence=14
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_15.301.1001446317 thread=1 sequence=15
archived log file name=+FRA/ACME/ARCHIVELOG/2019_02_28/thread_1_seq_16.299.1001446373 thread=1 sequence=16
media recovery complete, elapsed time: 00:00:02
Finished recover at 28-FEB-19

database opened

contents of Memory Script:
{
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u01/backup/''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u01/backup/''";
}
executing Memory Script

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/backup/''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/backup/''

Performing export of tables...
   EXPDP> Starting "SYS"."TSPITR_EXP_yfFn_oyeA":  
   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> ORA-39127: unexpected error from call to export_string :=SYS.DBMS_TRANSFORM_EXIMP.INSTANCE_INFO_EXP('AQ$_ORDERS_QUEUETABLE_S','IX',1,1,'12.01.00.00.00',newblock) 
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '+DATA/ACME/DATAFILE/example.266.1000672081'
ORA-06512: at "SYS.DBMS_TRANSFORM_EXIMP", line 197
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9901
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_TRANSFORM_EXIMP.INSTANCE_INFO_EXP('AQ$_STREAMS_QUEUE_TABLE_S','IX',1,1,'12.01.00.00.00',newblock) 
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '+DATA/ACME/DATAFILE/example.266.1000672081'
ORA-06512: at "SYS.DBMS_TRANSFORM_EXIMP", line 197
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9901
   EXPDP> . . exported "HR"."LOLITO"                               17.07 KB     107 rows
   EXPDP> Master table "SYS"."TSPITR_EXP_yfFn_oyeA" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TSPITR_EXP_yfFn_oyeA is:
   EXPDP>   /u01/backup/tspitr_yfFn_52443.dmp
   EXPDP> Job "SYS"."TSPITR_EXP_yfFn_oyeA" completed with 2 error(s) at Thu Feb 28 19:47:28 2019 elapsed 0 00:00:25
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_yfFn_ijqa" successfully loaded/unloaded
   IMPDP> Starting "SYS"."TSPITR_IMP_yfFn_ijqa":  
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
   IMPDP> . . imported "HR"."LOLITO"                               17.07 KB     107 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_yfFn_ijqa" successfully completed at Thu Feb 28 19:48:28 2019 elapsed 0 00:00:22
Import completed


Removing automatic instance
Automatic instance removed
auxiliary instance file /u01/backup/ACME/datafile/o1_mf_temp_g7k017st_.tmp deleted
auxiliary instance file /u01/backup/YFFN_PITR_ACME/onlinelog/o1_mf_3_g7k07qcd_.log deleted
auxiliary instance file /u01/backup/YFFN_PITR_ACME/onlinelog/o1_mf_2_g7k07q53_.log deleted
auxiliary instance file /u01/backup/YFFN_PITR_ACME/onlinelog/o1_mf_1_g7k07pyb_.log deleted
auxiliary instance file /u01/backup/YFFN_PITR_ACME/datafile/o1_mf_users_g7k07gmn_.dbf deleted
auxiliary instance file /u01/backup/ACME/datafile/o1_mf_sysaux_g7k004cj_.dbf deleted
auxiliary instance file /u01/backup/ACME/datafile/o1_mf_undotbs1_g7k004ct_.dbf deleted
auxiliary instance file /u01/backup/ACME/datafile/o1_mf_system_g7k004cn_.dbf deleted
auxiliary instance file /u01/backup/ACME/controlfile/o1_mf_g7jzzxy4_.ctl deleted
auxiliary instance file tspitr_yfFn_52443.dmp deleted
Finished recover at 28-FEB-19

RMAN> exit


Recovery Manager complete.

SQL> connect hr/hr;
Connected.
SQL> select tname from tab;

TNAME
--------------------------------------------------------------------------------
COUNTRIES
JOB_HISTORY
EMPLOYEES
JOBS
DEPARTMENTS
LOCATIONS
REGIONS
EMP_DETAILS_VIEW
LOLITO

9 rows selected.

SQL> connect hr/hr;
Connected.
SQL> select tname from tab;

TNAME
--------------------------------------------------------------------------------
COUNTRIES
JOB_HISTORY
EMPLOYEES
JOBS
DEPARTMENTS
LOCATIONS
REGIONS
EMP_DETAILS_VIEW
LOLITO

9 rows selected.

SQL> select count(*) from hr.lolito;

  COUNT(*)
----------
       107

SQL> 


OTRO METODO DE RESTAURACION


[oracle@localhost ~]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Mon May 4 20:52:32 2020

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

connected to target database: ACME (DBID=2033062067)

RMAN> RECOVER TABLE HR.LOLITO UNTIL SEQUENCE 27 AUXILIARY DESTINATION '/u01/backup/';

Starting recover at 04-MAY-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=66 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='fjxD'

initialization parameters used for automatic instance:
db_name=ACME
db_unique_name=fjxD_pitr_ACME
compatible=12.1.0.0.0
db_block_size=8192
db_files=200
sga_target=1G
processes=80
diagnostic_dest=/u01/app/oracle
db_create_file_dest=/u01/backup/
log_archive_dest_1='location=/u01/backup/'
#No auxiliary parameter file used


starting up automatic instance ACME

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                281019648 bytes
Database Buffers             780140544 bytes
Redo Buffers                   5480448 bytes
Automatic instance created

contents of Memory Script:
{
# set requested point in time
set until  logseq 27 thread 1;
# 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 04-MAY-20
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 +FRA/ACME/AUTOBACKUP/2020_05_04/s_1039544686.262.1039544687
channel ORA_AUX_DISK_1: piece handle=+FRA/ACME/AUTOBACKUP/2020_05_04/s_1039544686.262.1039544687 tag=TAG20200504T182446
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:13
output file name=/u01/backup/ACME/controlfile/o1_mf_hc1krprp_.ctl
Finished restore at 04-MAY-20

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  logseq 27 thread 1;
# 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 clone tempfile  2 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

executing command: SET NEWNAME

renamed tempfile 1 to /u01/backup/ACME/datafile/o1_mf_temp_%u_.tmp in control file
renamed tempfile 2 to /u01/backup/ACME/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 04-MAY-20
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 /u01/backup/ACME/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/backup/ACME/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/backup/ACME/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2020_05_04/nnndf0_tag20200504t182329_0.275.1039544609
channel ORA_AUX_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2020_05_04/nnndf0_tag20200504t182329_0.275.1039544609 tag=TAG20200504T182329
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:06
Finished restore at 04-MAY-20

datafile 1 switched to datafile copy
input datafile copy RECID=16 STAMP=1039553681 file name=/u01/backup/ACME/datafile/o1_mf_system_hc1krz4s_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=17 STAMP=1039553681 file name=/u01/backup/ACME/datafile/o1_mf_undotbs1_hc1krz50_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=18 STAMP=1039553681 file name=/u01/backup/ACME/datafile/o1_mf_sysaux_hc1krz4o_.dbf

contents of Memory Script:
{
# set requested point in time
set until  logseq 27 thread 1;
# 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 04-MAY-20
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 22 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_22.298.1039544685
archived log for thread 1 with sequence 23 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_23.272.1039550065
archived log for thread 1 with sequence 24 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_24.266.1039550071
archived log for thread 1 with sequence 25 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_25.279.1039550075
archived log for thread 1 with sequence 26 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_26.293.1039550077
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_22.298.1039544685 thread=1 sequence=22
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_23.272.1039550065 thread=1 sequence=23
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_24.266.1039550071 thread=1 sequence=24
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_25.279.1039550075 thread=1 sequence=25
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_26.293.1039550077 thread=1 sequence=26
media recovery complete, elapsed time: 00:00:09
Finished recover at 04-MAY-20

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/backup/ACME/controlfile/o1_mf_hc1krprp_.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    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                285213952 bytes
Database Buffers             775946240 bytes
Redo Buffers                   5480448 bytes

sql statement: alter system set  control_files =   ''/u01/backup/ACME/controlfile/o1_mf_hc1krprp_.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 bytes
Variable Size                285213952 bytes
Database Buffers             775946240 bytes
Redo Buffers                   5480448 bytes

sql statement: alter database mount clone database

contents of Memory Script:
{
# set requested point in time
set until  logseq 27 thread 1;
# set destinations for recovery set and auxiliary set datafiles
set newname for datafile  6 to new;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile  6;
switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 04-MAY-20
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=27 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 00006 to /u01/backup/FJXD_PITR_ACME/datafile/o1_mf_users_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2020_05_04/nnndf0_tag20200504t182329_0.275.1039544609
channel ORA_AUX_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2020_05_04/nnndf0_tag20200504t182329_0.275.1039544609 tag=TAG20200504T182329
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 04-MAY-20

datafile 6 switched to datafile copy
input datafile copy RECID=20 STAMP=1039553744 file name=/u01/backup/FJXD_PITR_ACME/datafile/o1_mf_users_hc1kwzw9_.dbf

contents of Memory Script:
{
# set requested point in time
set until  logseq 27 thread 1;
# online the datafiles restored or switched
sql clone "alter database datafile  6 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  6 online

Starting recover at 04-MAY-20
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 22 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_22.298.1039544685
archived log for thread 1 with sequence 23 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_23.272.1039550065
archived log for thread 1 with sequence 24 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_24.266.1039550071
archived log for thread 1 with sequence 25 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_25.279.1039550075
archived log for thread 1 with sequence 26 is already on disk as file +FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_26.293.1039550077
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_22.298.1039544685 thread=1 sequence=22
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_23.272.1039550065 thread=1 sequence=23
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_24.266.1039550071 thread=1 sequence=24
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_25.279.1039550075 thread=1 sequence=25
archived log file name=+FRA/ACME/ARCHIVELOG/2020_05_04/thread_1_seq_26.293.1039550077 thread=1 sequence=26
media recovery complete, elapsed time: 00:00:01
Finished recover at 04-MAY-20

database opened

contents of Memory Script:
{
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u01/backup/''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u01/backup/''";
}
executing Memory Script

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/backup/''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/backup/''

Performing export of tables...
   EXPDP> Starting "SYS"."TSPITR_EXP_fjxD_sunw":  
   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> ORA-39127: unexpected error from call to export_string :=SYS.DBMS_TRANSFORM_EXIMP.INSTANCE_INFO_EXP('AQ$_ORDERS_QUEUETABLE_S','IX',1,1,'12.01.00.00.00',newblock) 
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '+DATA/ACME/DATAFILE/example.257.1038425975'
ORA-06512: at "SYS.DBMS_TRANSFORM_EXIMP", line 197
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9901
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_TRANSFORM_EXIMP.INSTANCE_INFO_EXP('AQ$_STREAMS_QUEUE_TABLE_S','IX',1,1,'12.01.00.00.00',newblock) 
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '+DATA/ACME/DATAFILE/example.257.1038425975'
ORA-06512: at "SYS.DBMS_TRANSFORM_EXIMP", line 197
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9901
   EXPDP> . . exported "HR"."LOLITO"                               17.07 KB     107 rows
   EXPDP> Master table "SYS"."TSPITR_EXP_fjxD_sunw" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TSPITR_EXP_fjxD_sunw is:
   EXPDP>   /u01/backup/tspitr_fjxD_71835.dmp
   EXPDP> Job "SYS"."TSPITR_EXP_fjxD_sunw" completed with 2 error(s) at Mon May 4 20:57:54 2020 elapsed 0 00:01: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_fjxD_EpBc" successfully loaded/unloaded
   IMPDP> Starting "SYS"."TSPITR_IMP_fjxD_EpBc":  
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
   IMPDP> . . imported "HR"."LOLITO"                               17.07 KB     107 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_fjxD_EpBc" successfully completed at Mon May 4 21:00:59 2020 elapsed 0 00:01:13
Import completed


Removing automatic instance
Automatic instance removed
auxiliary instance file /u01/backup/ACME/datafile/o1_mf_temp_hc1kvkgk_.tmp deleted
auxiliary instance file /u01/backup/ACME/datafile/o1_mf_temp_hc1kvkrg_.tmp deleted
auxiliary instance file /u01/backup/FJXD_PITR_ACME/onlinelog/o1_mf_3_hc1kx3v9_.log deleted
auxiliary instance file /u01/backup/FJXD_PITR_ACME/onlinelog/o1_mf_2_hc1kx378_.log deleted
auxiliary instance file /u01/backup/FJXD_PITR_ACME/onlinelog/o1_mf_1_hc1kx2jw_.log deleted
auxiliary instance file /u01/backup/FJXD_PITR_ACME/datafile/o1_mf_users_hc1kwzw9_.dbf deleted
auxiliary instance file /u01/backup/ACME/datafile/o1_mf_sysaux_hc1krz4o_.dbf deleted
auxiliary instance file /u01/backup/ACME/datafile/o1_mf_undotbs1_hc1krz50_.dbf deleted
auxiliary instance file /u01/backup/ACME/datafile/o1_mf_system_hc1krz4s_.dbf deleted
auxiliary instance file /u01/backup/ACME/controlfile/o1_mf_hc1krprp_.ctl deleted
auxiliary instance file tspitr_fjxD_71835.dmp deleted
Finished recover at 04-MAY-20

RMAN> 




No hay comentarios: