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

Apple bag brochure main by squared-mk
Apple bag   brochure main by squared-mkApple bag   brochure main by squared-mk
Apple bag brochure main by squared-mk
SquaredMK Ltd
 
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
 
Приборы радиациоонного контроля
Приборы радиациоонного контроляПриборы радиациоонного контроля
Приборы радиациоонного контроля
nizhgma.ru
 
Оборудование
ОборудованиеОборудование
Оборудование
nizhgma.ru
 
SIEF CP - Presentation - Jan 2016
SIEF CP - Presentation - Jan 2016SIEF CP - Presentation - Jan 2016
SIEF CP - Presentation - Jan 2016
Lydia Ross
 
planeación Geografia 1 bloque 1 secuencia 1
planeación Geografia 1 bloque 1 secuencia 1planeación Geografia 1 bloque 1 secuencia 1
planeación Geografia 1 bloque 1 secuencia 1
Rey Tellez
 
BCS CCS Enterprise Systems
BCS CCS Enterprise SystemsBCS CCS Enterprise Systems
BCS CCS Enterprise Systems
Geoff Sharman
 
Unidad iii tecnologia aplicada a la educacion
Unidad iii tecnologia aplicada a la educacionUnidad iii tecnologia aplicada a la educacion
Unidad iii tecnologia aplicada a la educacion
Claudia M Villa Arias
 
EL CICLO VITAL DE LAS RANAS
EL CICLO VITAL DE LAS RANASEL CICLO VITAL DE LAS RANAS
EL CICLO VITAL DE LAS RANAS
silvia_mansilla
 
Mont Best Observing Young Children
Mont Best Observing Young ChildrenMont Best Observing Young Children
Mont Best Observing Young Children
Susie Knott
 
Senior Design Research Paper
Senior Design Research PaperSenior Design Research Paper
Senior Design Research Paper
Noel Villegas Jr
 
Aerial Mapping
Aerial MappingAerial Mapping
Aerial Mapping
Simon Handley
 
Curriculum Gino Buratti
Curriculum Gino BurattiCurriculum Gino Buratti
Curriculum Gino Buratti
Gino Buratti
 
5 to b gasto
5 to b gasto5 to b gasto
5 to b gasto
Rosneily Aranguren
 
MobileLearningMuseums
MobileLearningMuseumsMobileLearningMuseums
MobileLearningMuseums
Stephanie Sandifer
 
English Resume Romain Masson
English Resume Romain MassonEnglish Resume Romain Masson
English Resume Romain Masson
Romain Masson
 
Parotiditis
ParotiditisParotiditis
Parotiditis
Jesús Carbajal
 

Viewers also liked (17)

Apple bag brochure main by squared-mk
Apple bag   brochure main by squared-mkApple bag   brochure main by squared-mk
Apple bag brochure main by squared-mk
 
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.
 
Приборы радиациоонного контроля
Приборы радиациоонного контроляПриборы радиациоонного контроля
Приборы радиациоонного контроля
 
Оборудование
ОборудованиеОборудование
Оборудование
 
SIEF CP - Presentation - Jan 2016
SIEF CP - Presentation - Jan 2016SIEF CP - Presentation - Jan 2016
SIEF CP - Presentation - Jan 2016
 
planeación Geografia 1 bloque 1 secuencia 1
planeación Geografia 1 bloque 1 secuencia 1planeación Geografia 1 bloque 1 secuencia 1
planeación Geografia 1 bloque 1 secuencia 1
 
BCS CCS Enterprise Systems
BCS CCS Enterprise SystemsBCS CCS Enterprise Systems
BCS CCS Enterprise Systems
 
Unidad iii tecnologia aplicada a la educacion
Unidad iii tecnologia aplicada a la educacionUnidad iii tecnologia aplicada a la educacion
Unidad iii tecnologia aplicada a la educacion
 
EL CICLO VITAL DE LAS RANAS
EL CICLO VITAL DE LAS RANASEL CICLO VITAL DE LAS RANAS
EL CICLO VITAL DE LAS RANAS
 
Mont Best Observing Young Children
Mont Best Observing Young ChildrenMont Best Observing Young Children
Mont Best Observing Young Children
 
Senior Design Research Paper
Senior Design Research PaperSenior Design Research Paper
Senior Design Research Paper
 
Aerial Mapping
Aerial MappingAerial Mapping
Aerial Mapping
 
Curriculum Gino Buratti
Curriculum Gino BurattiCurriculum Gino Buratti
Curriculum Gino Buratti
 
5 to b gasto
5 to b gasto5 to b gasto
5 to b gasto
 
MobileLearningMuseums
MobileLearningMuseumsMobileLearningMuseums
MobileLearningMuseums
 
English Resume Romain Masson
English Resume Romain MassonEnglish Resume Romain Masson
English Resume Romain Masson
 
Parotiditis
ParotiditisParotiditis
Parotiditis
 

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

SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 

Recently uploaded (20)

SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 

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;