SlideShare a Scribd company logo
WHEN BOTH DIRECTORY AND DB NAME ARE SAME.
PRE - STEPS
I. DATABASE IN ARCHIVE LOG MODE.
II.CONTROL FILE AUTO BACKUP ON.
STEPS TO BE PERFORMED ON TARGET ( SOURCE ) DATABASE :
DB NAME : TARG
1. TAKE BACKUP OF DATABASE
RMAN > backup databaseplus archivelog;
2. ONCE BACKUP DONE COPY BACKUP-PIECES TO AUXILIARY (DESTINATION ) DATABASE USING LINUX
COMMAND scp.
RMAN > listbackup; (Shows listof back pieces )
RMAN > listbackup of controlfile;( shows control filebackup piece loction )
3. COPY PARAMETER FILE (init file) TO AUXILIARY ( DESTINATION ) DATABASE.
$ scp initTARG oracle@192.168.1.***:$ORACLE_HOME/dbs
4. ISSUE BELOW COMMANDS ON TARGET ( SOURCE ) DATABASE FOR FOR DATAFILES, REDOLOG FILES, CONTROL
FILES LOCATIONS.
SQL> select file_name from dba_data_files;
SQL> select name from v$controlfile;
SQL> select member from v$logfile;
STEPS TO BE PERFORMED ON AUXILIARY (DESTINATION ) DATABASE.:
DB NAME : TARG
5. MAKE DIRECTORY STRUCTURE SAME AS TARGET ( SOURCE ) ON AUXILIARY ( DESTINATION ) SERVER FOR
DATAFILES, REDOLOG FILES, CONTROL FILES.
FOR DIRECTORY STRUCTURE REFER STEP 4.
6. START AUXILIARY ( DESTINATION ) DATABASE IN NOMOUNT MODE
$ export ORACLE_SID=TARG
$ sqlplus'/as sysdba'
[oracle@Dup dbs]$ sqlplus'/as sysdba'
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 19 11:27:10 2017
Copyright (c) 1982, 2011,Oracle. All rights reserved.
Connected to an idleinstance.
SQL> startup nomount
ORACLE instancestarted.
Total System Global Area 422670336 bytes
Fixed Size 1345380 bytes
VariableSize 264243356 bytes
DatabaseBuffers 150994944 bytes
Redo Buffers 6086656 bytes
SQL> exit
7. CONNECT TO AUXILIARY ( DESTINATION ) DATABASE.
$ rman auxiliary /
8. ISSUE DUPLICATE CONNAMD FROM RMAN PROMPT IN AUXILIARY ( DESTINATION ) DATABASE .
RMAN> duplicatedatabaseto TARG backup location '/u01/copied_backups' nofilenamecheck;
StartingDuplicateDb at 19-JAN-17
contents of Memory Script:
{
sql clone"create spfilefrommemory";
}
executing Memory Script
sql statement: create spfilefrom memory
contents of Memory Script:
{
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
Oracleinstanceshutdown
connected to auxiliary database(notstarted)
Oracleinstancestarted
Total System Global Area 422670336 bytes
Fixed Size 1345380 bytes
VariableSize 268437660 bytes
DatabaseBuffers 146800640 bytes
Redo Buffers 6086656 bytes
contents of Memory Script:
{
sql clone"alter system set db_name =
''TARG'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone"alter system set db_unique_name =
''TARG'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone primary controlfilefrom '/u01/copied_backups/o1_mf_s_933677269_d80lzzcs_.bkp';
alter clone databasemount;
}
executing Memory Script
sql statement: alter system set db_name = ''TARG'' comment= ''Modified by RMAN duplicate''
scope=spfile
sql statement: alter system set db_unique_name = ''TARG'' comment= ''Modified by RMAN duplicate''
scope=spfile
Oracleinstanceshutdown
Oracleinstancestarted
Total System Global Area 422670336 bytes
Fixed Size 1345380 bytes
VariableSize 268437660 bytes
DatabaseBuffers 146800640 bytes
Redo Buffers 6086656 bytes
Startingrestore at 19-JAN-17
allocated channel:ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK
channel ORA_AUX_DISK_1: restoringcontrol file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output filename=/u01/app/oracle/oradata/TARG/control01.ctl
output filename=/u01/app/oracle/fast_recovery_area/TARG/control02.ctl
Finished restoreat 19-JAN-17
databasemounted
released channel: ORA_AUX_DISK_1
allocated channel:ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK
contents of Memory Script:
{
set until scn 834228;
set newname for datafile 1 to
"/u01/app/oracle/oradata/TARG/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/TARG/sysaux01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/TARG/undotbs01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/TARG/users01.dbf";
restore
clonedatabase
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Startingrestore at 19-JAN-17
usingchannel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: startingdatafilebackup setrestore
channel ORA_AUX_DISK_1: specifyingdatafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoringdatafile00001 to /u01/app/oracle/oradata/TARG/system01.dbf
channel ORA_AUX_DISK_1: restoringdatafile00002 to /u01/app/oracle/oradata/TARG/sysaux01.dbf
channel ORA_AUX_DISK_1: restoringdatafile00003 to /u01/app/oracle/oradata/TARG/undotbs01.dbf
channel ORA_AUX_DISK_1: restoringdatafile00004 to /u01/app/oracle/oradata/TARG/users01.dbf
channel ORA_AUX_DISK_1: readingfrom backup piece
/u01/copied_backups/o1_mf_nnndf_TAG20170119T104443_d80lt42d_.bkp
channel ORA_AUX_DISK_1: piece
handle=/u01/copied_backups/o1_mf_nnndf_TAG20170119T104443_d80lt42d_.bkp tag=TAG20170119T104443
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:03:15
Finished restoreat 19-JAN-17
contents of Memory Script:
{
switch clonedatafileall;
}
executing Memory Script
datafile1 switched to datafilecopy
input datafilecopy RECID=1 STAMP=933680265 filename=/u01/app/oracle/oradata/TARG/system01.dbf
datafile2 switched to datafilecopy
input datafilecopy RECID=2 STAMP=933680265 filename=/u01/app/oracle/oradata/TARG/sysaux01.dbf
datafile3 switched to datafilecopy
input datafilecopy RECID=3 STAMP=933680265 file
name=/u01/app/oracle/oradata/TARG/undotbs01.dbf
datafile4 switched to datafilecopy
input datafilecopy RECID=4 STAMP=933680265 filename=/u01/app/oracle/oradata/TARG/users01.dbf
contents of Memory Script:
{
set until scn 834228;
recover
clonedatabase
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Startingrecover at 19-JAN-17
usingchannel ORA_AUX_DISK_1
startingmedia recovery
channel ORA_AUX_DISK_1: startingarchived logrestoreto default destination
channel ORA_AUX_DISK_1: restoringarchived log
archived logthread=1 sequence=9
channel ORA_AUX_DISK_1: readingfrom backup piece
/u01/copied_backups/o1_mf_annnn_TAG20170119T104747_d80lzvrk_.bkp
channel ORA_AUX_DISK_1: piece
handle=/u01/copied_backups/o1_mf_annnn_TAG20170119T104747_d80lzvrk_.bkp tag=TAG20170119T104747
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
archived logfile
name=/u01/app/oracle/fast_recovery_area/TARG/archivelog/2017_01_19/o1_mf_1_9_d80oxx8o_.arc thread=1
sequence=9
channel clone_default: deleting archived log(s)
archived logfile
name=/u01/app/oracle/fast_recovery_area/TARG/archivelog/2017_01_19/o1_mf_1_9_d80oxx8o_.arc RECID=1
STAMP=933680277
media recovery complete, elapsed time: 00:00:02
Finished recover at 19-JAN-17
Oracleinstancestarted
Total System Global Area 422670336 bytes
Fixed Size 1345380 bytes
VariableSize 268437660 bytes
DatabaseBuffers 146800640 bytes
Redo Buffers 6086656 bytes
contents of Memory Script:
{
sql clone"alter system set db_name =
''TARG'' comment=
''Reset to original valueby RMAN'' scope=spfile";
sql clone"alter system reset db_unique_name scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set db_name = ''TARG'' comment= ''Reset to original valueby RMAN''
scope=spfile
sql statement: alter system reset db_unique_name scope=spfile
Oracleinstanceshutdown
connected to auxiliary database(notstarted)
Oracleinstancestarted
Total System Global Area 422670336 bytes
Fixed Size 1345380 bytes
VariableSize 268437660 bytes
DatabaseBuffers 146800640 bytes
Redo Buffers 6086656 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TARG" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 SIZE 50 M ,
GROUP 2 SIZE 50 M ,
GROUP 3 SIZE 50 M
DATAFILE
'/u01/app/oracle/oradata/TARG/system01.dbf'
CHARACTER SET WE8MSWIN1252
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/TARG/temp01.dbf";
switch clonetempfile all;
catalogclonedatafilecopy "/u01/app/oracle/oradata/TARG/sysaux01.dbf",
"/u01/app/oracle/oradata/TARG/undotbs01.dbf",
"/u01/app/oracle/oradata/TARG/users01.dbf";
switch clonedatafileall;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/oradata/TARG/temp01.dbf in control file
cataloged datafilecopy
datafilecopy filename=/u01/app/oracle/oradata/TARG/sysaux01.dbf RECID=1 STAMP=933680360
cataloged datafilecopy
datafilecopy filename=/u01/app/oracle/oradata/TARG/undotbs01.dbf RECID=2 STAMP=933680360
cataloged datafilecopy
datafilecopy filename=/u01/app/oracle/oradata/TARG/users01.dbf RECID=3 STAMP=933680361
datafile2 switched to datafilecopy
input datafilecopy RECID=1 STAMP=933680360 filename=/u01/app/oracle/oradata/TARG/sysaux01.dbf
datafile3 switched to datafilecopy
input datafilecopy RECID=2 STAMP=933680360 file
name=/u01/app/oracle/oradata/TARG/undotbs01.dbf
datafile4 switched to datafilecopy
input datafilecopy RECID=3 STAMP=933680361 filename=/u01/app/oracle/oradata/TARG/users01.dbf
contents of Memory Script:
{
Alter clonedatabaseopen resetlogs;
}
executing Memory Script
databaseopened
Finished DuplicateDb at 19-JAN-17
RMAN>
9. CHECK DATAFILE, CONTROL FILE AND REDOLOG FILE LOCATIONS BY CONNECT TO AUXILIARY ( DESTINATION )
DATABASE FROM SQL PROMPT.
SQL> select file_name from dba_data_files;
SQL> select name from v$controlfile;
SQL> select member from v$logfile;

More Related Content

What's hot (19)

Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition Presentation
N/A
 
Cloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step ProcedureCloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step Procedure
Orazer Technologies
 
B35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarezB35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarez
Insight Technology, Inc.
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windows
Roo Wall
 
Data Migration in Database
Data Migration in DatabaseData Migration in Database
Data Migration in Database
Jingun Jung
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
Jorge Batista
 
Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2
Biju Thomas
 
Rman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORTRman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORT
Syed SadathUllah
 
Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940
gopalchsamanta
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby database
uzzal basak
 
Clase 09 03-2013
Clase 09 03-2013Clase 09 03-2013
Clase 09 03-2013
sayajeff
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Rec
vivaankumar
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
vivaankumar
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
Muhammad Qasim
 
Les 07 Rman Rec
Les 07 Rman RecLes 07 Rman Rec
Les 07 Rman Rec
vivaankumar
 
Test Dml With Nologging
Test Dml With NologgingTest Dml With Nologging
Test Dml With Nologging
N/A
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
maclean liu
 
Migrate from database file system to asm
Migrate from database file system to asmMigrate from database file system to asm
Migrate from database file system to asm
Surender Martha
 
Oracle optach update
Oracle optach updateOracle optach update
Oracle optach update
Rakesh rao
 
Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition Presentation
N/A
 
Cloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step ProcedureCloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step Procedure
Orazer Technologies
 
B35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarezB35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarez
Insight Technology, Inc.
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windows
Roo Wall
 
Data Migration in Database
Data Migration in DatabaseData Migration in Database
Data Migration in Database
Jingun Jung
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
Jorge Batista
 
Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2
Biju Thomas
 
Rman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORTRman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORT
Syed SadathUllah
 
Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940
gopalchsamanta
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby database
uzzal basak
 
Clase 09 03-2013
Clase 09 03-2013Clase 09 03-2013
Clase 09 03-2013
sayajeff
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Rec
vivaankumar
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
vivaankumar
 
Test Dml With Nologging
Test Dml With NologgingTest Dml With Nologging
Test Dml With Nologging
N/A
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
maclean liu
 
Migrate from database file system to asm
Migrate from database file system to asmMigrate from database file system to asm
Migrate from database file system to asm
Surender Martha
 
Oracle optach update
Oracle optach updateOracle optach update
Oracle optach update
Rakesh rao
 

Viewers also liked (20)

Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
subhani shaik
 
12c on RHEL7
12c on RHEL712c on RHEL7
12c on RHEL7
Osama Mustafa
 
Fe04 angular js-101
Fe04   angular js-101Fe04   angular js-101
Fe04 angular js-101
DotNetCampus
 
Presentación bullying
Presentación bullyingPresentación bullying
Presentación bullying
alonsocr23
 
Presentac..
Presentac..Presentac..
Presentac..
alonsocr23
 
Prezentacja łeba kluczny
Prezentacja łeba klucznyPrezentacja łeba kluczny
Prezentacja łeba kluczny
klukart17
 
CENTRO storico o PERIFERIA storica?
CENTRO storico o PERIFERIA storica?CENTRO storico o PERIFERIA storica?
CENTRO storico o PERIFERIA storica?
leideepreMiano
 
Fe05 test drivenjavascriptdevelopment
Fe05   test drivenjavascriptdevelopmentFe05   test drivenjavascriptdevelopment
Fe05 test drivenjavascriptdevelopment
DotNetCampus
 
Active SWV Article revised
Active SWV Article revisedActive SWV Article revised
Active SWV Article revised
Amber Lipscomb, MA
 
Bases Fondo Financiamiento Compartido
Bases Fondo Financiamiento CompartidoBases Fondo Financiamiento Compartido
Bases Fondo Financiamiento Compartido
Sec Proyectos
 
Định Hướng SEO 2014
Định Hướng SEO 2014Định Hướng SEO 2014
Định Hướng SEO 2014
Nguyễn Văn Mạnh
 
LA RESISTENCIA DE LOS CAJAMARQUINOS POR UN NUEVO MODELO DE DESARROLLO HUMA…
LA RESISTENCIA DE LOS CAJAMARQUINOS POR UN NUEVO MODELO DE DESARROLLO HUMA…LA RESISTENCIA DE LOS CAJAMARQUINOS POR UN NUEVO MODELO DE DESARROLLO HUMA…
LA RESISTENCIA DE LOS CAJAMARQUINOS POR UN NUEVO MODELO DE DESARROLLO HUMA…
Daniel Vega UNMSM
 
Contaminación
ContaminaciónContaminación
Contaminación
nachito98xD
 
Preoperative Evaluation of a patient
Preoperative Evaluation of a patientPreoperative Evaluation of a patient
Preoperative Evaluation of a patient
Vaishali Syal
 
Presentac..
Presentac..Presentac..
Presentac..
alonsocr23
 
Hej.mielec.pl - Kolejowe inwestycje w nowej perspektywie UE na Podkarpaciu
Hej.mielec.pl - Kolejowe inwestycje w nowej perspektywie UE na PodkarpaciuHej.mielec.pl - Kolejowe inwestycje w nowej perspektywie UE na Podkarpaciu
Hej.mielec.pl - Kolejowe inwestycje w nowej perspektywie UE na Podkarpaciu
HejMielec
 
Presentación educativa (pedagogía)
Presentación educativa (pedagogía)Presentación educativa (pedagogía)
Presentación educativa (pedagogía)
alonsocr23
 
Literatura ecuatoriana
Literatura ecuatorianaLiteratura ecuatoriana
Literatura ecuatoriana
kennyabigail
 
Joa 9 6
Joa 9 6Joa 9 6
Joa 9 6
joa1096
 
Tipografía y sus familias
Tipografía y sus familiasTipografía y sus familias
Tipografía y sus familias
Luis Rivera
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
subhani shaik
 
Fe04 angular js-101
Fe04   angular js-101Fe04   angular js-101
Fe04 angular js-101
DotNetCampus
 
Presentación bullying
Presentación bullyingPresentación bullying
Presentación bullying
alonsocr23
 
Prezentacja łeba kluczny
Prezentacja łeba klucznyPrezentacja łeba kluczny
Prezentacja łeba kluczny
klukart17
 
CENTRO storico o PERIFERIA storica?
CENTRO storico o PERIFERIA storica?CENTRO storico o PERIFERIA storica?
CENTRO storico o PERIFERIA storica?
leideepreMiano
 
Fe05 test drivenjavascriptdevelopment
Fe05   test drivenjavascriptdevelopmentFe05   test drivenjavascriptdevelopment
Fe05 test drivenjavascriptdevelopment
DotNetCampus
 
Bases Fondo Financiamiento Compartido
Bases Fondo Financiamiento CompartidoBases Fondo Financiamiento Compartido
Bases Fondo Financiamiento Compartido
Sec Proyectos
 
LA RESISTENCIA DE LOS CAJAMARQUINOS POR UN NUEVO MODELO DE DESARROLLO HUMA…
LA RESISTENCIA DE LOS CAJAMARQUINOS POR UN NUEVO MODELO DE DESARROLLO HUMA…LA RESISTENCIA DE LOS CAJAMARQUINOS POR UN NUEVO MODELO DE DESARROLLO HUMA…
LA RESISTENCIA DE LOS CAJAMARQUINOS POR UN NUEVO MODELO DE DESARROLLO HUMA…
Daniel Vega UNMSM
 
Preoperative Evaluation of a patient
Preoperative Evaluation of a patientPreoperative Evaluation of a patient
Preoperative Evaluation of a patient
Vaishali Syal
 
Hej.mielec.pl - Kolejowe inwestycje w nowej perspektywie UE na Podkarpaciu
Hej.mielec.pl - Kolejowe inwestycje w nowej perspektywie UE na PodkarpaciuHej.mielec.pl - Kolejowe inwestycje w nowej perspektywie UE na Podkarpaciu
Hej.mielec.pl - Kolejowe inwestycje w nowej perspektywie UE na Podkarpaciu
HejMielec
 
Presentación educativa (pedagogía)
Presentación educativa (pedagogía)Presentación educativa (pedagogía)
Presentación educativa (pedagogía)
alonsocr23
 
Literatura ecuatoriana
Literatura ecuatorianaLiteratura ecuatoriana
Literatura ecuatoriana
kennyabigail
 
Tipografía y sus familias
Tipografía y sus familiasTipografía y sus familias
Tipografía y sus familias
Luis Rivera
 

Similar to Rman cloning when both directory and db name are same. (20)

Backup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RACBackup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RAC
Paulo Fagundes
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.doc
Lucky Ally
 
Cloning database using srdf copy
Cloning database using srdf copyCloning database using srdf copy
Cloning database using srdf copy
Amit Vashishth
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
Vinay Thota
 
Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)
than sare
 
Oracle Database Management Basic 1
Oracle Database Management Basic 1Oracle Database Management Basic 1
Oracle Database Management Basic 1
Chien Chung Shen
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recovery
Arun Sharma
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
uzzal basak
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
altistory
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Bu
vivaankumar
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
Anar Godjaev
 
Rman workshop short
Rman workshop shortRman workshop short
Rman workshop short
Nabi Abdul
 
Missing redo logs in oracle
Missing redo logs in oracleMissing redo logs in oracle
Missing redo logs in oracle
Bolisetty Srinivas
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Features
xiangrong
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
Enkitec
 
还原Oracle中真实的cache recovery
还原Oracle中真实的cache recovery还原Oracle中真实的cache recovery
还原Oracle中真实的cache recovery
maclean liu
 
Collaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mysteryCollaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mystery
Nelson Calero
 
Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
mohammed shahnawaz ahmed
 
Collaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mysteryCollaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mystery
Nelson Calero
 
Oracle ORA Errors
Oracle ORA ErrorsOracle ORA Errors
Oracle ORA Errors
Manish Mudhliyar
 
Backup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RACBackup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RAC
Paulo Fagundes
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.doc
Lucky Ally
 
Cloning database using srdf copy
Cloning database using srdf copyCloning database using srdf copy
Cloning database using srdf copy
Amit Vashishth
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
Vinay Thota
 
Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)
than sare
 
Oracle Database Management Basic 1
Oracle Database Management Basic 1Oracle Database Management Basic 1
Oracle Database Management Basic 1
Chien Chung Shen
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recovery
Arun Sharma
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
uzzal basak
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
altistory
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Bu
vivaankumar
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
Anar Godjaev
 
Rman workshop short
Rman workshop shortRman workshop short
Rman workshop short
Nabi Abdul
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Features
xiangrong
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
Enkitec
 
还原Oracle中真实的cache recovery
还原Oracle中真实的cache recovery还原Oracle中真实的cache recovery
还原Oracle中真实的cache recovery
maclean liu
 
Collaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mysteryCollaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mystery
Nelson Calero
 
Collaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mysteryCollaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mystery
Nelson Calero
 

Recently uploaded (20)

Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 

Rman cloning when both directory and db name are same.

  • 1. WHEN BOTH DIRECTORY AND DB NAME ARE SAME. PRE - STEPS I. DATABASE IN ARCHIVE LOG MODE. II.CONTROL FILE AUTO BACKUP ON. STEPS TO BE PERFORMED ON TARGET ( SOURCE ) DATABASE : DB NAME : TARG 1. TAKE BACKUP OF DATABASE RMAN > backup databaseplus archivelog; 2. ONCE BACKUP DONE COPY BACKUP-PIECES TO AUXILIARY (DESTINATION ) DATABASE USING LINUX COMMAND scp. RMAN > listbackup; (Shows listof back pieces ) RMAN > listbackup of controlfile;( shows control filebackup piece loction ) 3. COPY PARAMETER FILE (init file) TO AUXILIARY ( DESTINATION ) DATABASE. $ scp initTARG oracle@192.168.1.***:$ORACLE_HOME/dbs 4. ISSUE BELOW COMMANDS ON TARGET ( SOURCE ) DATABASE FOR FOR DATAFILES, REDOLOG FILES, CONTROL FILES LOCATIONS. SQL> select file_name from dba_data_files;
  • 2. SQL> select name from v$controlfile; SQL> select member from v$logfile; STEPS TO BE PERFORMED ON AUXILIARY (DESTINATION ) DATABASE.: DB NAME : TARG 5. MAKE DIRECTORY STRUCTURE SAME AS TARGET ( SOURCE ) ON AUXILIARY ( DESTINATION ) SERVER FOR DATAFILES, REDOLOG FILES, CONTROL FILES. FOR DIRECTORY STRUCTURE REFER STEP 4. 6. START AUXILIARY ( DESTINATION ) DATABASE IN NOMOUNT MODE $ export ORACLE_SID=TARG $ sqlplus'/as sysdba' [oracle@Dup dbs]$ sqlplus'/as sysdba' SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 19 11:27:10 2017 Copyright (c) 1982, 2011,Oracle. All rights reserved. Connected to an idleinstance. SQL> startup nomount ORACLE instancestarted.
  • 3. Total System Global Area 422670336 bytes Fixed Size 1345380 bytes VariableSize 264243356 bytes DatabaseBuffers 150994944 bytes Redo Buffers 6086656 bytes SQL> exit 7. CONNECT TO AUXILIARY ( DESTINATION ) DATABASE. $ rman auxiliary / 8. ISSUE DUPLICATE CONNAMD FROM RMAN PROMPT IN AUXILIARY ( DESTINATION ) DATABASE . RMAN> duplicatedatabaseto TARG backup location '/u01/copied_backups' nofilenamecheck; StartingDuplicateDb at 19-JAN-17 contents of Memory Script: { sql clone"create spfilefrommemory"; } executing Memory Script sql statement: create spfilefrom memory contents of Memory Script: { shutdown clone immediate; startup clone nomount; } executing Memory Script
  • 4. Oracleinstanceshutdown connected to auxiliary database(notstarted) Oracleinstancestarted Total System Global Area 422670336 bytes Fixed Size 1345380 bytes VariableSize 268437660 bytes DatabaseBuffers 146800640 bytes Redo Buffers 6086656 bytes contents of Memory Script: { sql clone"alter system set db_name = ''TARG'' comment= ''Modified by RMAN duplicate'' scope=spfile"; sql clone"alter system set db_unique_name = ''TARG'' comment= ''Modified by RMAN duplicate'' scope=spfile"; shutdown clone immediate; startup clone force nomount restore clone primary controlfilefrom '/u01/copied_backups/o1_mf_s_933677269_d80lzzcs_.bkp'; alter clone databasemount; } executing Memory Script sql statement: alter system set db_name = ''TARG'' comment= ''Modified by RMAN duplicate'' scope=spfile sql statement: alter system set db_unique_name = ''TARG'' comment= ''Modified by RMAN duplicate'' scope=spfile Oracleinstanceshutdown
  • 5. Oracleinstancestarted Total System Global Area 422670336 bytes Fixed Size 1345380 bytes VariableSize 268437660 bytes DatabaseBuffers 146800640 bytes Redo Buffers 6086656 bytes Startingrestore at 19-JAN-17 allocated channel:ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=18 device type=DISK channel ORA_AUX_DISK_1: restoringcontrol file channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03 output filename=/u01/app/oracle/oradata/TARG/control01.ctl output filename=/u01/app/oracle/fast_recovery_area/TARG/control02.ctl Finished restoreat 19-JAN-17 databasemounted released channel: ORA_AUX_DISK_1 allocated channel:ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=18 device type=DISK contents of Memory Script: { set until scn 834228; set newname for datafile 1 to "/u01/app/oracle/oradata/TARG/system01.dbf"; set newname for datafile 2 to "/u01/app/oracle/oradata/TARG/sysaux01.dbf"; set newname for datafile 3 to "/u01/app/oracle/oradata/TARG/undotbs01.dbf"; set newname for datafile 4 to
  • 6. "/u01/app/oracle/oradata/TARG/users01.dbf"; restore clonedatabase ; } executing Memory Script executing command: SET until clause executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Startingrestore at 19-JAN-17 usingchannel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: startingdatafilebackup setrestore channel ORA_AUX_DISK_1: specifyingdatafile(s) to restore from backup set channel ORA_AUX_DISK_1: restoringdatafile00001 to /u01/app/oracle/oradata/TARG/system01.dbf channel ORA_AUX_DISK_1: restoringdatafile00002 to /u01/app/oracle/oradata/TARG/sysaux01.dbf channel ORA_AUX_DISK_1: restoringdatafile00003 to /u01/app/oracle/oradata/TARG/undotbs01.dbf channel ORA_AUX_DISK_1: restoringdatafile00004 to /u01/app/oracle/oradata/TARG/users01.dbf channel ORA_AUX_DISK_1: readingfrom backup piece /u01/copied_backups/o1_mf_nnndf_TAG20170119T104443_d80lt42d_.bkp channel ORA_AUX_DISK_1: piece handle=/u01/copied_backups/o1_mf_nnndf_TAG20170119T104443_d80lt42d_.bkp tag=TAG20170119T104443 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:03:15 Finished restoreat 19-JAN-17 contents of Memory Script:
  • 7. { switch clonedatafileall; } executing Memory Script datafile1 switched to datafilecopy input datafilecopy RECID=1 STAMP=933680265 filename=/u01/app/oracle/oradata/TARG/system01.dbf datafile2 switched to datafilecopy input datafilecopy RECID=2 STAMP=933680265 filename=/u01/app/oracle/oradata/TARG/sysaux01.dbf datafile3 switched to datafilecopy input datafilecopy RECID=3 STAMP=933680265 file name=/u01/app/oracle/oradata/TARG/undotbs01.dbf datafile4 switched to datafilecopy input datafilecopy RECID=4 STAMP=933680265 filename=/u01/app/oracle/oradata/TARG/users01.dbf contents of Memory Script: { set until scn 834228; recover clonedatabase delete archivelog ; } executing Memory Script executing command: SET until clause Startingrecover at 19-JAN-17 usingchannel ORA_AUX_DISK_1 startingmedia recovery channel ORA_AUX_DISK_1: startingarchived logrestoreto default destination channel ORA_AUX_DISK_1: restoringarchived log archived logthread=1 sequence=9
  • 8. channel ORA_AUX_DISK_1: readingfrom backup piece /u01/copied_backups/o1_mf_annnn_TAG20170119T104747_d80lzvrk_.bkp channel ORA_AUX_DISK_1: piece handle=/u01/copied_backups/o1_mf_annnn_TAG20170119T104747_d80lzvrk_.bkp tag=TAG20170119T104747 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01 archived logfile name=/u01/app/oracle/fast_recovery_area/TARG/archivelog/2017_01_19/o1_mf_1_9_d80oxx8o_.arc thread=1 sequence=9 channel clone_default: deleting archived log(s) archived logfile name=/u01/app/oracle/fast_recovery_area/TARG/archivelog/2017_01_19/o1_mf_1_9_d80oxx8o_.arc RECID=1 STAMP=933680277 media recovery complete, elapsed time: 00:00:02 Finished recover at 19-JAN-17 Oracleinstancestarted Total System Global Area 422670336 bytes Fixed Size 1345380 bytes VariableSize 268437660 bytes DatabaseBuffers 146800640 bytes Redo Buffers 6086656 bytes contents of Memory Script: { sql clone"alter system set db_name = ''TARG'' comment= ''Reset to original valueby RMAN'' scope=spfile"; sql clone"alter system reset db_unique_name scope=spfile"; shutdown clone immediate; startup clone nomount; } executing Memory Script
  • 9. sql statement: alter system set db_name = ''TARG'' comment= ''Reset to original valueby RMAN'' scope=spfile sql statement: alter system reset db_unique_name scope=spfile Oracleinstanceshutdown connected to auxiliary database(notstarted) Oracleinstancestarted Total System Global Area 422670336 bytes Fixed Size 1345380 bytes VariableSize 268437660 bytes DatabaseBuffers 146800640 bytes Redo Buffers 6086656 bytes sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TARG" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 SIZE 50 M , GROUP 2 SIZE 50 M , GROUP 3 SIZE 50 M DATAFILE '/u01/app/oracle/oradata/TARG/system01.dbf' CHARACTER SET WE8MSWIN1252 contents of Memory Script: { set newname for tempfile 1 to "/u01/app/oracle/oradata/TARG/temp01.dbf";
  • 10. switch clonetempfile all; catalogclonedatafilecopy "/u01/app/oracle/oradata/TARG/sysaux01.dbf", "/u01/app/oracle/oradata/TARG/undotbs01.dbf", "/u01/app/oracle/oradata/TARG/users01.dbf"; switch clonedatafileall; } executing Memory Script executing command: SET NEWNAME renamed tempfile 1 to /u01/app/oracle/oradata/TARG/temp01.dbf in control file cataloged datafilecopy datafilecopy filename=/u01/app/oracle/oradata/TARG/sysaux01.dbf RECID=1 STAMP=933680360 cataloged datafilecopy datafilecopy filename=/u01/app/oracle/oradata/TARG/undotbs01.dbf RECID=2 STAMP=933680360 cataloged datafilecopy datafilecopy filename=/u01/app/oracle/oradata/TARG/users01.dbf RECID=3 STAMP=933680361 datafile2 switched to datafilecopy input datafilecopy RECID=1 STAMP=933680360 filename=/u01/app/oracle/oradata/TARG/sysaux01.dbf datafile3 switched to datafilecopy input datafilecopy RECID=2 STAMP=933680360 file name=/u01/app/oracle/oradata/TARG/undotbs01.dbf datafile4 switched to datafilecopy input datafilecopy RECID=3 STAMP=933680361 filename=/u01/app/oracle/oradata/TARG/users01.dbf contents of Memory Script: { Alter clonedatabaseopen resetlogs; } executing Memory Script databaseopened Finished DuplicateDb at 19-JAN-17
  • 11. RMAN> 9. CHECK DATAFILE, CONTROL FILE AND REDOLOG FILE LOCATIONS BY CONNECT TO AUXILIARY ( DESTINATION ) DATABASE FROM SQL PROMPT. SQL> select file_name from dba_data_files; SQL> select name from v$controlfile; SQL> select member from v$logfile;
  翻译: