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

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
 

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
 
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
 
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
 
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
 
Data Migration in Database
Data Migration in DatabaseData Migration in Database
Data Migration in Database
 
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
 
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
 
Rman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORTRman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORT
 
Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940
 
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
 
Clase 09 03-2013
Clase 09 03-2013Clase 09 03-2013
Clase 09 03-2013
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Rec
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
 
Les 07 Rman Rec
Les 07 Rman RecLes 07 Rman Rec
Les 07 Rman Rec
 
Test Dml With Nologging
Test Dml With NologgingTest Dml With Nologging
Test Dml With Nologging
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
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
 
Oracle optach update
Oracle optach updateOracle optach update
Oracle optach update
 

Viewers also liked

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-101DotNetCampus
 
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 klucznyklukart17
 
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 drivenjavascriptdevelopmentDotNetCampus
 
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
 

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.
 
12c on RHEL7
12c on RHEL712c on RHEL7
12c on RHEL7
 
Fe04 angular js-101
Fe04   angular js-101Fe04   angular js-101
Fe04 angular js-101
 
Presentación bullying
Presentación bullyingPresentación bullying
Presentación bullying
 
Presentac..
Presentac..Presentac..
Presentac..
 
Prezentacja łeba kluczny
Prezentacja łeba klucznyPrezentacja łeba kluczny
Prezentacja łeba kluczny
 
CENTRO storico o PERIFERIA storica?
CENTRO storico o PERIFERIA storica?CENTRO storico o PERIFERIA storica?
CENTRO storico o PERIFERIA storica?
 
Fe05 test drivenjavascriptdevelopment
Fe05   test drivenjavascriptdevelopmentFe05   test drivenjavascriptdevelopment
Fe05 test drivenjavascriptdevelopment
 
Active SWV Article revised
Active SWV Article revisedActive SWV Article revised
Active SWV Article revised
 
Bases Fondo Financiamiento Compartido
Bases Fondo Financiamiento CompartidoBases Fondo Financiamiento Compartido
Bases Fondo Financiamiento Compartido
 
Định Hướng SEO 2014
Định Hướng SEO 2014Định Hướng SEO 2014
Định Hướng SEO 2014
 
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…
 
Contaminación
ContaminaciónContaminación
Contaminación
 
Preoperative Evaluation of a patient
Preoperative Evaluation of a patientPreoperative Evaluation of a patient
Preoperative Evaluation of a patient
 
Presentac..
Presentac..Presentac..
Presentac..
 
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
 
Presentación educativa (pedagogía)
Presentación educativa (pedagogía)Presentación educativa (pedagogía)
Presentación educativa (pedagogía)
 
Literatura ecuatoriana
Literatura ecuatorianaLiteratura ecuatoriana
Literatura ecuatoriana
 
Joa 9 6
Joa 9 6Joa 9 6
Joa 9 6
 
Tipografía y sus familias
Tipografía y sus familiasTipografía y sus familias
Tipografía y sus familias
 

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

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
 

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
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.doc
 
Cloning database using srdf copy
Cloning database using srdf copyCloning database using srdf copy
Cloning database using srdf copy
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
 
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)
 
Oracle Database Management Basic 1
Oracle Database Management Basic 1Oracle Database Management Basic 1
Oracle Database Management Basic 1
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recovery
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Bu
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
 
Rman workshop short
Rman workshop shortRman workshop short
Rman workshop short
 
Missing redo logs in oracle
Missing redo logs in oracleMissing redo logs in oracle
Missing redo logs in oracle
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Features
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
 
还原Oracle中真实的cache recovery
还原Oracle中真实的cache recovery还原Oracle中真实的cache recovery
还原Oracle中真实的cache recovery
 
Collaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mysteryCollaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mystery
 
Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 
Collaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mysteryCollaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mystery
 
Oracle ORA Errors
Oracle ORA ErrorsOracle ORA Errors
Oracle ORA Errors
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 

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;