SlideShare a Scribd company logo
1 of 7
Download to read offline
Restore RMAN to New Host
Osama Mustafa Page 1
Steps On Source Database
**Most Of work will be done on target database
1- Get DBID By Using The below :
SQL > Select Db_id from v$database ;
Or
RMAN target /
2- Get the last SCN On Database since we will not have active redolog using the below
document :
SQL > select max(next_change#) from v$archived_log where archived = 'YES' group by
thread#;
Or Using RMAN:
RMAN> list backup of archivelog all;
Restore RMAN to New Host
Osama Mustafa Page 2
3- Take Backup Using RMAN :
run {
allocate channel d1 type disk format 'YOUR-PATH/Database_%U;
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
BACKUP DATABASE PLUS ARCHIVELOG;
backup current controlfile format 'YOUR_PATH/controlfile_%U';
release channel c1;
release channel c2;
release channel c3;
}
Now move all generated backup file to the new host with the same directory for example if you
backup on folder /u01/app then on new host should be the same.
Restore RMAN to New Host
Osama Mustafa Page 3
Steps On New Server
After copy file do the below steps:
1- export ORACLE_SID=SID_SAME_AS_PROD
RMAN TARGET /
RMAN > set dbid <as you get it from above query>;
RMAN > Startup nomount;
RMAN > restore spfile to pfile '/u01/app/oracle/oradata/orcl/initorcl.ora' from
autobackup;
RMAN> shutdown abort;
Now you have to edit SPFile ;
*.audit_file_dest=’LOCATION’
*.control_files=’LOCATION’
*.db_recovery_file_dest_size=Size
*.db_recovery_file_dest=’LOCATION’
*.diagnostic_dest=’LOCATION’
*.log_archive_dest_1='LOCATION=LOCATION’
*.local_listener='LISTENER_ORCL'
Restore RMAN to New Host
Osama Mustafa Page 4
RMAN> startup nomount pfile='/u01/app/oracle/oradata/orcl/initorcl.ora';
RMAN> restore controlfile from autobackup;
RMAN> alter database mount;
Note: now you have 2 options 1 - move the backup to same location on target server 2- Copy
Backup to any location but you need to use CATALOG Command check below :
RMAN> catalog start with 'Where You copy Backup';
You are almost Done, You have But before restore database you can move datafile to any
location using (all the below steps on RMAN ) But
Remember don't run the below yet:
SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/orcl/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/u01/app/oracle/oradata/orcl/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle/oradata/orcl/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle/oradata/orcl/users01.dbf';
SET NEWNAME FOR DATAFILE 5 TO '/u01/app/oracle/oradata/orcl/example01.dbf';
SET NEWNAME FOR DATAFILE 6 TO '/u01/app/oracle/oradata/orcl/test.dbf';
SET NEWNAME FOR DATAFILE 7 TO '/u01/app/oracle/oradata/orcl/dbfs01.dbf';
**Note: After TO: New Location.
Restore RMAN to New Host
Osama Mustafa Page 5
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo01.log'' TO
''/u01/app/oracle/oradata/orcl/redo/redo01.log'' ";
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo02.log'' TO
''/u01/app/oracle/oradata/orcl/redo/redo02.log'' ";
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo03.log'' TO
''/u01/app/oracle/oradata/orcl/redo/redo03.log'' ";
Are you still having SCN that we see it above :)
Ok Now you RMAN Script will looks like below
RUN {
SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/orcl/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/u01/app/oracle/oradata/orcl/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle/oradata/orcl/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle/oradata/orcl/users01.dbf';
SET NEWNAME FOR DATAFILE 5 TO '/u01/app/oracle/oradata/orcl/example01.dbf';
SET NEWNAME FOR DATAFILE 6 TO '/u01/app/oracle/oradata/orcl/test.dbf';
SET NEWNAME FOR DATAFILE 7 TO '/u01/app/oracle/oradata/orcl/dbfs01.dbf';
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo01.log'' TO
''/u01/app/oracle/oradata/orcl/redo/redo01.log'' ";
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo02.log'' TO
''/u01/app/oracle/oradata/orcl/redo/redo02.log'' ";
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo03.log'' TO
''/u01/app/oracle/oradata/orcl/redo/redo03.log'' ";
Restore RMAN to New Host
Osama Mustafa Page 6
SET UNTIL SCN <ABOVE_QUERY>;
ESTORE DATABASE;
SWITCH DATAFILE ALL;
RECOVER DATABASE;
}
Sqlplus / as sysdba
SQL > Alter database open Resetlogs ;
Thank you
Osama Mustafa
http://osamamustafa.blogspot.com
Twitter: @OsamaOracle
Restore RMAN to New Host
Osama Mustafa Page 7

More Related Content

What's hot

Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentationVimlendu Kumar
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New GenerationAnil Nair
 
Oracle Database performance tuning using oratop
Oracle Database performance tuning using oratopOracle Database performance tuning using oratop
Oracle Database performance tuning using oratopSandesh Rao
 
Oracle Cloud Storage Service & Oracle Database Backup Cloud Service
Oracle Cloud Storage Service & Oracle Database Backup Cloud ServiceOracle Cloud Storage Service & Oracle Database Backup Cloud Service
Oracle Cloud Storage Service & Oracle Database Backup Cloud ServiceJean-Philippe PINTE
 
Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slidesMohamed Farouk
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slidesMohamed Farouk
 
Fast Start Failover DataGuard
Fast Start Failover DataGuardFast Start Failover DataGuard
Fast Start Failover DataGuardBorsaniya Vaibhav
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperJeff Smith
 
Best Practices for the Most Impactful Oracle Database 18c and 19c Features
Best Practices for the Most Impactful Oracle Database 18c and 19c FeaturesBest Practices for the Most Impactful Oracle Database 18c and 19c Features
Best Practices for the Most Impactful Oracle Database 18c and 19c FeaturesMarkus Michalewicz
 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on ExadataAnil Nair
 
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...Sandesh Rao
 
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]vasuballa
 
Performance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresPerformance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresJitendra Singh
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Markus Michalewicz
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by exampleMauro Pagano
 

What's hot (20)

Oracle ASM Training
Oracle ASM TrainingOracle ASM Training
Oracle ASM Training
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New Generation
 
Oracle RAC 12c Overview
Oracle RAC 12c OverviewOracle RAC 12c Overview
Oracle RAC 12c Overview
 
Oracle Database performance tuning using oratop
Oracle Database performance tuning using oratopOracle Database performance tuning using oratop
Oracle Database performance tuning using oratop
 
Oracle Cloud Storage Service & Oracle Database Backup Cloud Service
Oracle Cloud Storage Service & Oracle Database Backup Cloud ServiceOracle Cloud Storage Service & Oracle Database Backup Cloud Service
Oracle Cloud Storage Service & Oracle Database Backup Cloud Service
 
Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slides
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
 
Fast Start Failover DataGuard
Fast Start Failover DataGuardFast Start Failover DataGuard
Fast Start Failover DataGuard
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
 
Best Practices for the Most Impactful Oracle Database 18c and 19c Features
Best Practices for the Most Impactful Oracle Database 18c and 19c FeaturesBest Practices for the Most Impactful Oracle Database 18c and 19c Features
Best Practices for the Most Impactful Oracle Database 18c and 19c Features
 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on Exadata
 
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
 
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
 
Performance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresPerformance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and Underscores
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
 
Data Guard Architecture & Setup
Data Guard Architecture & SetupData Guard Architecture & Setup
Data Guard Architecture & Setup
 
Oracle Database 12c : Multitenant
Oracle Database 12c : MultitenantOracle Database 12c : Multitenant
Oracle Database 12c : Multitenant
 
Oracle Data Guard
Oracle Data GuardOracle Data Guard
Oracle Data Guard
 

Viewers also liked

Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery ProcedureAnar Godjaev
 
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 RACPaulo Fagundes
 
RMAN best practices for RAC
RMAN best practices for RACRMAN best practices for RAC
RMAN best practices for RACSyed Hussain
 
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Yury Velikanov
 
10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaper10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaperYury Velikanov
 
10 Problems with your RMAN backup script
10 Problems with your RMAN backup script10 Problems with your RMAN backup script
10 Problems with your RMAN backup scriptYury Velikanov
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman scriptMaris Elsins
 
Rman Presentation
Rman PresentationRman Presentation
Rman PresentationRick van Ek
 
Oracle 11g R2 RAC implementation and concept
Oracle 11g R2 RAC implementation and conceptOracle 11g R2 RAC implementation and concept
Oracle 11g R2 RAC implementation and conceptSantosh Kangane
 
Ibm tivoli storage manager for databases data protection for oracle for windo...
Ibm tivoli storage manager for databases data protection for oracle for windo...Ibm tivoli storage manager for databases data protection for oracle for windo...
Ibm tivoli storage manager for databases data protection for oracle for windo...Banking at Ho Chi Minh city
 
Optimizing the Enterprise Manager 12c
Optimizing the Enterprise Manager 12cOptimizing the Enterprise Manager 12c
Optimizing the Enterprise Manager 12cKellyn Pot'Vin-Gorman
 
Refresh standby using rman backup
Refresh standby using rman backupRefresh standby using rman backup
Refresh standby using rman backupMohsen B
 
Install Solaris 11.1 on a Virtualbox VM
Install Solaris 11.1 on a Virtualbox VMInstall Solaris 11.1 on a Virtualbox VM
Install Solaris 11.1 on a Virtualbox VMLaurent Leturgez
 
Oracle database 12 c on oracle linux 7.3
Oracle database 12 c on oracle linux 7.3Oracle database 12 c on oracle linux 7.3
Oracle database 12 c on oracle linux 7.3suk kim
 
RMAN backup Oracle
RMAN backup OracleRMAN backup Oracle
RMAN backup OracleAlfan Dya
 
Oracle 12c r1 installation on solaris 11.1
Oracle 12c r1 installation on solaris 11.1Oracle 12c r1 installation on solaris 11.1
Oracle 12c r1 installation on solaris 11.1Laurent Leturgez
 

Viewers also liked (20)

Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
 
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
 
RMAN best practices for RAC
RMAN best practices for RACRMAN best practices for RAC
RMAN best practices for RAC
 
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
 
10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaper10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaper
 
RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA
 
Rac questions
Rac questionsRac questions
Rac questions
 
10 Problems with your RMAN backup script
10 Problems with your RMAN backup script10 Problems with your RMAN backup script
10 Problems with your RMAN backup script
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
 
Rman Presentation
Rman PresentationRman Presentation
Rman Presentation
 
Oracle 11g R2 RAC implementation and concept
Oracle 11g R2 RAC implementation and conceptOracle 11g R2 RAC implementation and concept
Oracle 11g R2 RAC implementation and concept
 
Ibm tivoli storage manager for databases data protection for oracle for windo...
Ibm tivoli storage manager for databases data protection for oracle for windo...Ibm tivoli storage manager for databases data protection for oracle for windo...
Ibm tivoli storage manager for databases data protection for oracle for windo...
 
Optimizing the Enterprise Manager 12c
Optimizing the Enterprise Manager 12cOptimizing the Enterprise Manager 12c
Optimizing the Enterprise Manager 12c
 
Cman
CmanCman
Cman
 
Refresh standby using rman backup
Refresh standby using rman backupRefresh standby using rman backup
Refresh standby using rman backup
 
Install Solaris 11.1 on a Virtualbox VM
Install Solaris 11.1 on a Virtualbox VMInstall Solaris 11.1 on a Virtualbox VM
Install Solaris 11.1 on a Virtualbox VM
 
Oracle database 12 c on oracle linux 7.3
Oracle database 12 c on oracle linux 7.3Oracle database 12 c on oracle linux 7.3
Oracle database 12 c on oracle linux 7.3
 
RMAN backup Oracle
RMAN backup OracleRMAN backup Oracle
RMAN backup Oracle
 
Oracle 12c r1 installation on solaris 11.1
Oracle 12c r1 installation on solaris 11.1Oracle 12c r1 installation on solaris 11.1
Oracle 12c r1 installation on solaris 11.1
 
Ebs clone r12.2.4
Ebs clone r12.2.4Ebs clone r12.2.4
Ebs clone r12.2.4
 

Similar to Step by Step Restore rman to different host

oracle upgradation
oracle upgradationoracle upgradation
oracle upgradationinfluxbob
 
Oracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard SetupOracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard SetupArun Sharma
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_pptmaclean liu
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guideAmit87_dba
 
Cloning database using srdf copy
Cloning database using srdf copyCloning database using srdf copy
Cloning database using srdf copyAmit Vashishth
 
Oracle Database Backup Cloud Service
Oracle Database Backup Cloud ServiceOracle Database Backup Cloud Service
Oracle Database Backup Cloud ServiceMarketingArrowECS_CZ
 
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
 
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
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12cuzzal basak
 
Collaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mysteryCollaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mysteryNelson Calero
 
Rman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORTRman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORTSyed SadathUllah
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Buvivaankumar
 
Rman workshop short
Rman workshop shortRman workshop short
Rman workshop shortNabi Abdul
 

Similar to Step by Step Restore rman to different host (20)

Les 07 Rman Rec
Les 07 Rman RecLes 07 Rman Rec
Les 07 Rman Rec
 
Les 07 rman_rec
Les 07 rman_recLes 07 rman_rec
Les 07 rman_rec
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
 
Oracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard SetupOracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard Setup
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
Oracle backup
Oracle backupOracle backup
Oracle backup
 
5895640.ppt
5895640.ppt5895640.ppt
5895640.ppt
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guide
 
Cloning database using srdf copy
Cloning database using srdf copyCloning database using srdf copy
Cloning database using srdf copy
 
Oracle Database Backup Cloud Service
Oracle Database Backup Cloud ServiceOracle Database Backup Cloud Service
Oracle Database Backup Cloud Service
 
Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 
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.
 
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.
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
 
Collaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mysteryCollaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mystery
 
Les 08 Dupe Db
Les 08 Dupe DbLes 08 Dupe Db
Les 08 Dupe Db
 
Rman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORTRman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORT
 
Database upgradation
Database upgradationDatabase upgradation
Database upgradation
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Bu
 
Rman workshop short
Rman workshop shortRman workshop short
Rman workshop short
 

More from Osama Mustafa

Case study for software architect
Case study for software architectCase study for software architect
Case study for software architectOsama Mustafa
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dbaOsama Mustafa
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your codeOsama Mustafa
 
Java business service
Java business serviceJava business service
Java business serviceOsama Mustafa
 
Steps creating data_integration_services
Steps creating data_integration_servicesSteps creating data_integration_services
Steps creating data_integration_servicesOsama Mustafa
 
Build, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerBuild, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerOsama Mustafa
 
Oracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOsama Mustafa
 
Helping implementer dealing with famous siebel based system messages and er...
Helping implementer dealing with famous siebel   based system messages and er...Helping implementer dealing with famous siebel   based system messages and er...
Helping implementer dealing with famous siebel based system messages and er...Osama Mustafa
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dbaOsama Mustafa
 
Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Osama Mustafa
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOsama Mustafa
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2Osama Mustafa
 
Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.Osama Mustafa
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaOsama Mustafa
 
Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Osama Mustafa
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vaultOsama Mustafa
 

More from Osama Mustafa (20)

Case study for software architect
Case study for software architectCase study for software architect
Case study for software architect
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dba
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
 
DevOps Project
DevOps Project DevOps Project
DevOps Project
 
Java business service
Java business serviceJava business service
Java business service
 
Steps creating data_integration_services
Steps creating data_integration_servicesSteps creating data_integration_services
Steps creating data_integration_services
 
Build, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerBuild, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using Docker
 
Oracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single node
 
Helping implementer dealing with famous siebel based system messages and er...
Helping implementer dealing with famous siebel   based system messages and er...Helping implementer dealing with famous siebel   based system messages and er...
Helping implementer dealing with famous siebel based system messages and er...
 
Weblogic and docker
Weblogic and dockerWeblogic and docker
Weblogic and docker
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dba
 
Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c Installation
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2
 
OBIA Installation
OBIA Installation OBIA Installation
OBIA Installation
 
Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafa
 
Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vault
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

Step by Step Restore rman to different host

  • 1. Restore RMAN to New Host Osama Mustafa Page 1 Steps On Source Database **Most Of work will be done on target database 1- Get DBID By Using The below : SQL > Select Db_id from v$database ; Or RMAN target / 2- Get the last SCN On Database since we will not have active redolog using the below document : SQL > select max(next_change#) from v$archived_log where archived = 'YES' group by thread#; Or Using RMAN: RMAN> list backup of archivelog all;
  • 2. Restore RMAN to New Host Osama Mustafa Page 2 3- Take Backup Using RMAN : run { allocate channel d1 type disk format 'YOUR-PATH/Database_%U; allocate channel c1 type disk; allocate channel c2 type disk; allocate channel c3 type disk; BACKUP DATABASE PLUS ARCHIVELOG; backup current controlfile format 'YOUR_PATH/controlfile_%U'; release channel c1; release channel c2; release channel c3; } Now move all generated backup file to the new host with the same directory for example if you backup on folder /u01/app then on new host should be the same.
  • 3. Restore RMAN to New Host Osama Mustafa Page 3 Steps On New Server After copy file do the below steps: 1- export ORACLE_SID=SID_SAME_AS_PROD RMAN TARGET / RMAN > set dbid <as you get it from above query>; RMAN > Startup nomount; RMAN > restore spfile to pfile '/u01/app/oracle/oradata/orcl/initorcl.ora' from autobackup; RMAN> shutdown abort; Now you have to edit SPFile ; *.audit_file_dest=’LOCATION’ *.control_files=’LOCATION’ *.db_recovery_file_dest_size=Size *.db_recovery_file_dest=’LOCATION’ *.diagnostic_dest=’LOCATION’ *.log_archive_dest_1='LOCATION=LOCATION’ *.local_listener='LISTENER_ORCL'
  • 4. Restore RMAN to New Host Osama Mustafa Page 4 RMAN> startup nomount pfile='/u01/app/oracle/oradata/orcl/initorcl.ora'; RMAN> restore controlfile from autobackup; RMAN> alter database mount; Note: now you have 2 options 1 - move the backup to same location on target server 2- Copy Backup to any location but you need to use CATALOG Command check below : RMAN> catalog start with 'Where You copy Backup'; You are almost Done, You have But before restore database you can move datafile to any location using (all the below steps on RMAN ) But Remember don't run the below yet: SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/orcl/system01.dbf'; SET NEWNAME FOR DATAFILE 2 TO '/u01/app/oracle/oradata/orcl/sysaux01.dbf'; SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle/oradata/orcl/undotbs01.dbf'; SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle/oradata/orcl/users01.dbf'; SET NEWNAME FOR DATAFILE 5 TO '/u01/app/oracle/oradata/orcl/example01.dbf'; SET NEWNAME FOR DATAFILE 6 TO '/u01/app/oracle/oradata/orcl/test.dbf'; SET NEWNAME FOR DATAFILE 7 TO '/u01/app/oracle/oradata/orcl/dbfs01.dbf'; **Note: After TO: New Location.
  • 5. Restore RMAN to New Host Osama Mustafa Page 5 SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo01.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo01.log'' "; SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo02.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo02.log'' "; SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo03.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo03.log'' "; Are you still having SCN that we see it above :) Ok Now you RMAN Script will looks like below RUN { SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/orcl/system01.dbf'; SET NEWNAME FOR DATAFILE 2 TO '/u01/app/oracle/oradata/orcl/sysaux01.dbf'; SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle/oradata/orcl/undotbs01.dbf'; SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle/oradata/orcl/users01.dbf'; SET NEWNAME FOR DATAFILE 5 TO '/u01/app/oracle/oradata/orcl/example01.dbf'; SET NEWNAME FOR DATAFILE 6 TO '/u01/app/oracle/oradata/orcl/test.dbf'; SET NEWNAME FOR DATAFILE 7 TO '/u01/app/oracle/oradata/orcl/dbfs01.dbf'; SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo01.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo01.log'' "; SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo02.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo02.log'' "; SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo03.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo03.log'' ";
  • 6. Restore RMAN to New Host Osama Mustafa Page 6 SET UNTIL SCN <ABOVE_QUERY>; ESTORE DATABASE; SWITCH DATAFILE ALL; RECOVER DATABASE; } Sqlplus / as sysdba SQL > Alter database open Resetlogs ; Thank you Osama Mustafa http://osamamustafa.blogspot.com Twitter: @OsamaOracle
  • 7. Restore RMAN to New Host Osama Mustafa Page 7