Documente Academic
Documente Profesional
Documente Cultură
RMAN> exit
RECOVERY
SQL> exit
SQL> exit
SQL> exit
SQL> exit
SQL> exit
SQL> exit
CONTROLFILE BACKUP
SQL> exit
SQL> exit
SQL> exit
SQL>startup mount
ORACLE instance started.
Total System Global Area 960372736 bytes
Fixed Size 2295320 bytes
Variable Size 612370920 bytes
Database Buffers 339738624 bytes
Redo Buffers 5967872 bytes
Database mounted.
SQL> exit
RMAN> exit
Recovery Manager complete.
SQL> exit
RMAN> exit
Recovery Manager complete.
PITR of a PDB
SQL> commit;
Commit complete.
SQL> exit
RMAN> exit
Recovery Manager complete.
SQL> exit
[oracle@DB12c ~]$ sqlplus system/oracle_4U@localhost:1521/pdb1
SQL*Plus: Release 12.1.0.1.0 Production on Sat Jun 14 02:37:13 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Last Successful login time: Sat Jun 14 2014 02:31:13 +05:30
SQL> exit
RMAN> RUN {
SET UNTIL SCN = 2306877;
RESTORE PLUGGABLE DATABASE pdb1;
RECOVER PLUGGABLE DATABASE pdb1 AUXILIARY
DESTINATION='/u02/app/oracle/oradata';
ALTER PLUGGABLE DATABASE pdb1 OPEN RESETLOGS;
}
executing command: SET until clause
Starting restore at 14-06-2014 02:42:43
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00008 to
/u02/app/oracle/oradata/cdb2/pdb1_1/system01.dbf
channel ORA_DISK_1: restoring datafile 00009 to
/u02/app/oracle/oradata/cdb2/pdb1_1/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00020 to
/u02/app/oracle/oradata/cdb2/pdb1_1/ldata_01.dbf
channel ORA_DISK_1: reading from backup piece
/u02/app/oracle/fast_recovery_area/CDB2/FBB29A29F2840F63E0437802A8C01E1C/
backupset/2014_06_14/o1_mf_nnndf_TAG20140614T023515_9spswct6_.bkp
channel ORA_DISK_1: piece
handle=/u02/app/oracle/fast_recovery_area/CDB2/FBB29A29F2840F63E0437802A8
C01E1C/backupset/2014_06_14/o1_mf_nnndf_TAG20140614T023515_9spswct6_.bkp
tag=TAG20140614T023515
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
Finished restore at 14-06-2014 02:42:51
Starting recover at 14-06-2014 02:42:51
current log archived
using channel ORA_DISK_1
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='byCF'
initialization parameters used for automatic instance:
db_name=CDB2
db_unique_name=byCF_pitr_pdb1_CDB2
compatible=12.1.0.0.0
db_block_size=8192
db_files=200
sga_target=1G
processes=80
diagnostic_dest=/u02/app/oracle
db_create_file_dest=/u02/app/oracle/oradata
log_archive_dest_1='location=/u02/app/oracle/oradata'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used
starting up automatic instance CDB2
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 scn 2306877;
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
}
executing Memory Script
executing command: SET until clause
Starting restore at 14-06-2014 02:42:57
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=82 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
/u02/app/oracle/fast_recovery_area/CDB2/autobackup/2014_06_14/o1_mf_s_850
185322_9spswm1d_.bkp
channel ORA_AUX_DISK_1: piece
handle=/u02/app/oracle/fast_recovery_area/CDB2/autobackup/2014_06_14/o1_m
f_s_850185322_9spswm1d_.bkp tag=TAG20140614T023522
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file
name=/u02/app/oracle/oradata/CDB2/controlfile/o1_mf_9sptbsbv_.ctl
Finished restore at 14-06-2014 02:42:58
sql statement: alter database mount clone database
contents of Memory Script:
{
# set requested point in time
set until scn 2306877;
# switch to valid datafilecopies
switch clone datafile 8 to datafilecopy
"/u02/app/oracle/oradata/cdb2/pdb1_1/system01.dbf";
switch clone datafile 9 to datafilecopy
"/u02/app/oracle/oradata/cdb2/pdb1_1/sysaux01.dbf";
switch clone datafile 20 to datafilecopy
"/u02/app/oracle/oradata/cdb2/pdb1_1/ldata_01.dbf";
# 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 datafile 6 to new;
set newname for clone datafile 19 to new;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 4, 3, 6, 19;
switch clone datafile all;
}
executing Memory Script
executing command: SET until clause
datafile 8 switched to datafile copy
input datafile copy RECID=3 STAMP=850185783 file
name=/u02/app/oracle/oradata/cdb2/pdb1_1/system01.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=4 STAMP=850185783 file
name=/u02/app/oracle/oradata/cdb2/pdb1_1/sysaux01.dbf
datafile 20 switched to datafile copy
input datafile copy RECID=5 STAMP=850185783 file
name=/u02/app/oracle/oradata/cdb2/pdb1_1/ldata_01.dbf
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 14-06-2014 02:43:03
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
/u02/app/oracle/oradata/CDB2/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to
/u02/app/oracle/oradata/CDB2/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to
/u02/app/oracle/oradata/CDB2/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to
/u02/app/oracle/oradata/CDB2/datafile/o1_mf_users_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00019 to
/u02/app/oracle/oradata/CDB2/datafile/o1_mf_cdata_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece
/u02/app/oracle/fast_recovery_area/CDB2/backupset/2014_06_14/o1_mf_nnndf_
TAG20140614T010005_9spn9xb9_.bkp
RMAN> exit
Recovery Manager complete.
FLASHBACK DATABASE