SlideShare a Scribd company logo
1 of 5
Download to read offline
REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA
REFRESH DEVELOPMENT FROM PRODUCTION
Introduction
This document describe steps to refresh database development from production, this way can work on
RAC environment as well.
Environment:-
Production: -
Oracle Database 11.2.0.3
Operating system: Oracle Linux 6.4
Development:-
Oracle Database 11.2.0.3
Operating system: Oracle Linux 6.4
Software needed:-
1- Winscp / or Any FTP Client.
2- ssh Client.
REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA
REFRESH DEVELOPMENT FROM PRODUCTION
About the Author
Osama Mustafa has progressive experience in Oracle Products, community. He recently served as
Oracle Database Administrator.
Provide Database Implementation Solutions, High Availability Solution, Infrastructure and Storage
Planning, Install, Configure, Implement and manage Oracle E-Business Suite environments. Architect,
build and support highly-available Oracle EBS, Database and Fusion Middleware environments including
appropriate reporting, Installs, configures, upgrades, tunes, and maintains production, development and
test databases.
He entered Oracle ACE Program in 2013, he is author for the book Oracle Penetration Testing, Osama
Mustafa Certified OCP 10g,11g, Linux Implementations , Certified Ethical hacker and LPT , and Solaris
Administrator.
Include to all this Osama Mustafa is international Speaker in Oracle User Group and Oracle OTN Tour,
Published Online Articles in His blog about Oracle Technology, Volunteer in Oracle User Group such as
IOUG, ODTUG and UKOUG , Volunteer Board member in RACSIG and Organizer for RACATTACK
Event around the world. Recently his article has been published on OTECH magazine about Real
Application Cluster Here.
Twitter: @OsamaOracle
G+: Osama Mustafa
SlidShare: Osama Mustafa
LinkedIn: http://www.linkedin.com/in/osamamustafa
Blog: https://osamamustafa.blogpsot.com.
REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA
REFRESH DEVELOPMENT FROM PRODUCTION
Step #1:- Take Controlfile From Production Side.
sqlplus "/as sysdba"
SQL> alter database backup controlfile to trace as “Location”;
Database altered.
SQL> exit
Step #2: Go to Location Controlfile Trace.
Open this trace file and copy all its contents to notepad++ on your desktop machine.
Step #3: Now Take Backup for your Database.
sqlplus "/as sysdba"
SQL> alter system archive log current;
SQL> alter database begin backup;
Check the Active Backup:-
SQL> select count(*) from v$backup where status='ACTIVE';
SQL> exit;
Step #4: Now Create backup folder called “BKP_FOLDER” and Copy All the Data files And Redo
Logs to this Directory, once copy is done Run the following command :-
sqlplus "/as sysdba"
SQL> alter system archive log current;
SQL> alter database end backup;
SQL> select count(*) from v$backup where status='ACTIVE';
SQL> alter system archive log current;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> exit;
Create another “ARCH_FOLDER” and Copy All Archives log that generated in the same day to
this folder if your database run No Archive mode skip this step.
All the above Should Be Run on Production.
REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA
REFRESH DEVELOPMENT FROM PRODUCTION
Step #5: On Test Environment, Shutdown the database & Listener.
Note: Rename the directory that containing all data files, Redo logs and control files and
create new directory with the same name.
Step #6: Copy Backup (from production) to Test Server (New Folder).
 Copy all the data files, Redo logs from “BKP_Folder” on production to Directory on
Test Server “Don’t Copy Control file”
 Now Copy all The Archives Logs from Production “Arch_Folder” to same directory
on test.
Step #7: Create control file that already Saved On Notepad.
 Edit Controlfile using Notepad.
 Remove all the lines before the line “STARTUP NOMOUNT”.
 Change the datafiles path from production to test depend on the location.
 Remove all the lines before Restlogs option.
 Change the following line :-
CREATE CONTROLFILE REUSE DATABASE "Production" RESETLOGS
ARCHIVELOG
TO
CREATE CONTROLFILE SET DATABASE "TEST" RESETLOGS
NOARCHIVELOG
If you take the controlfile From RAC remove all the lines contains Logfile Thread 2.
Now your Controlfile is ready and check the permission of Datafiles please.
Save the file under “New_CTL.sql”.
Step #8: Before Run the Script Make sure that Parameter files  log_archive_format Same
as Production. If you don’t use Archive mode forget it.
sqlplus "/as sysdba"
Connected to idle instance
SQL> @New_CTL.sql
Control File created
REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA
REFRESH DEVELOPMENT FROM PRODUCTION
SQL> recover database using backup controlfile until cancel;
In this step it will ask you about Archive log Do you remember why we copied archive
from production to Test indicate the location, if it’s keep asking them apply the
archive log one by one till you receive “Media recovery cancelled.” or “Media recovery
complete.”, it means recovery is successful.
Step #9: Shutdown database and Run the following:-
SQL> shutdown immediate;
SQL> alter database open resetlogs;
If the above command not working set the following parameter to True 
_no_recovery_through_resetlogs=TRUE
Step #10: Disable Thread 2 on Database (if you are using RAC).
SQL > ALTER DATABASE DISABLE THREAD 2;
Then
SQL > ALTER DATABASE DROP LOGFILE …..
Step #11: Finally Shutdown and Startup Database.

More Related Content

What's hot

Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6Osama Mustafa
 
Installing oracle timesten database On Linux
Installing oracle timesten database On Linux Installing oracle timesten database On Linux
Installing oracle timesten database On Linux Osama Mustafa
 
Are You Ready for 12c? Data Migration and Upgrade Best Practices
Are You Ready for 12c? Data Migration and Upgrade Best PracticesAre You Ready for 12c? Data Migration and Upgrade Best Practices
Are You Ready for 12c? Data Migration and Upgrade Best PracticesPerformance Tuning Corporation
 
Install oracle solaris 11.2 using gui
Install oracle solaris 11.2 using guiInstall oracle solaris 11.2 using gui
Install oracle solaris 11.2 using guiOsama 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
 
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
 
Pluggable database 3
Pluggable database 3Pluggable database 3
Pluggable database 3Osama Mustafa
 
J2ee user managment using dwh builder
J2ee user managment using dwh builderJ2ee user managment using dwh builder
J2ee user managment using dwh builderOsama Mustafa
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOsama Mustafa
 
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Osama Mustafa
 
Oracle Linux 7 Beta First Look (Installations)
Oracle Linux 7 Beta First Look (Installations)Oracle Linux 7 Beta First Look (Installations)
Oracle Linux 7 Beta First Look (Installations)Osama Mustafa
 
Pluggable database tutorial 2
Pluggable database tutorial 2Pluggable database tutorial 2
Pluggable database tutorial 2Osama Mustafa
 
Step by Step Restore rman to different host
Step by Step Restore rman to different hostStep by Step Restore rman to different host
Step by Step Restore rman to different hostOsama Mustafa
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11guzzal basak
 
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.2Biju Thomas
 

What's hot (20)

Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6
 
Installing oracle timesten database On Linux
Installing oracle timesten database On Linux Installing oracle timesten database On Linux
Installing oracle timesten database On Linux
 
Are You Ready for 12c? Data Migration and Upgrade Best Practices
Are You Ready for 12c? Data Migration and Upgrade Best PracticesAre You Ready for 12c? Data Migration and Upgrade Best Practices
Are You Ready for 12c? Data Migration and Upgrade Best Practices
 
Install oracle solaris 11.2 using gui
Install oracle solaris 11.2 using guiInstall oracle solaris 11.2 using gui
Install oracle solaris 11.2 using gui
 
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
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafa
 
Oracle autovue
Oracle autovueOracle autovue
Oracle autovue
 
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
 
Pluggable database 3
Pluggable database 3Pluggable database 3
Pluggable database 3
 
J2ee user managment using dwh builder
J2ee user managment using dwh builderJ2ee user managment using dwh builder
J2ee user managment using dwh builder
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c Installation
 
12c installation
12c installation12c installation
12c installation
 
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
 
Oracle Linux 7 Beta First Look (Installations)
Oracle Linux 7 Beta First Look (Installations)Oracle Linux 7 Beta First Look (Installations)
Oracle Linux 7 Beta First Look (Installations)
 
Pluggable database tutorial 2
Pluggable database tutorial 2Pluggable database tutorial 2
Pluggable database tutorial 2
 
Step by Step Restore rman to different host
Step by Step Restore rman to different hostStep by Step Restore rman to different host
Step by Step Restore rman to different host
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
 
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
 
61 Rac
61 Rac61 Rac
61 Rac
 
141 Rac
141 Rac141 Rac
141 Rac
 

Viewers also liked

Deploy agent in em12c
Deploy agent in em12cDeploy agent in em12c
Deploy agent in em12cOsama Mustafa
 
Add target manually em12c
Add target manually em12cAdd target manually em12c
Add target manually em12cOsama Mustafa
 
Oracle smart flash cache
Oracle smart flash cacheOracle smart flash cache
Oracle smart flash cachexiangrong
 
Exadata Smart Scan - What is so smart about it?
Exadata Smart Scan  - What is so smart about it?Exadata Smart Scan  - What is so smart about it?
Exadata Smart Scan - What is so smart about it?Uwe Hesse
 
Migrating to Oracle Database 12c: 300 DBs in 300 days.
Migrating to Oracle Database 12c: 300 DBs in 300 days.Migrating to Oracle Database 12c: 300 DBs in 300 days.
Migrating to Oracle Database 12c: 300 DBs in 300 days.Ludovico Caldara
 
Enable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEEEnable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEEOsama Mustafa
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2Osama Mustafa
 
How to add storage to esxi 5.5
How to add storage to esxi 5.5How to add storage to esxi 5.5
How to add storage to esxi 5.5Osama Mustafa
 

Viewers also liked (9)

Deploy agent in em12c
Deploy agent in em12cDeploy agent in em12c
Deploy agent in em12c
 
Add target manually em12c
Add target manually em12cAdd target manually em12c
Add target manually em12c
 
Oracle smart flash cache
Oracle smart flash cacheOracle smart flash cache
Oracle smart flash cache
 
Exadata Smart Scan - What is so smart about it?
Exadata Smart Scan  - What is so smart about it?Exadata Smart Scan  - What is so smart about it?
Exadata Smart Scan - What is so smart about it?
 
AWR & ASH Analysis
AWR & ASH AnalysisAWR & ASH Analysis
AWR & ASH Analysis
 
Migrating to Oracle Database 12c: 300 DBs in 300 days.
Migrating to Oracle Database 12c: 300 DBs in 300 days.Migrating to Oracle Database 12c: 300 DBs in 300 days.
Migrating to Oracle Database 12c: 300 DBs in 300 days.
 
Enable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEEEnable Mobile Apps Designer in OBIEE
Enable Mobile Apps Designer in OBIEE
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2
 
How to add storage to esxi 5.5
How to add storage to esxi 5.5How to add storage to esxi 5.5
How to add storage to esxi 5.5
 

Similar to Refresh development from productions

oracle upgradation
oracle upgradationoracle upgradation
oracle upgradationinfluxbob
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recoveryaltistory
 
Oracle olap-installation
Oracle olap-installationOracle olap-installation
Oracle olap-installationAmit Sharma
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_pptmaclean liu
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under controlMarcin Przepiórowski
 
E business suite r12.2 changes for database administrators
E business suite r12.2 changes for database administratorsE business suite r12.2 changes for database administrators
E business suite r12.2 changes for database administratorsSrinivasa Pavan Marti
 
E business suite r12.2 changes for database administrators
E business suite r12.2 changes for database administratorsE business suite r12.2 changes for database administrators
E business suite r12.2 changes for database administratorsSrinivasa Pavan Marti
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlMoeen_uddin
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database BackupHandy_Backup
 
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive PresentationNabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive PresentationNabil Nawaz
 
Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userDesty Yani
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2nesmaddy
 
17398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv117398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv1Mmusi Dithotse
 
Less04 instance
Less04 instanceLess04 instance
Less04 instanceImran Ali
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Recvivaankumar
 
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 windowsRoo Wall
 

Similar to Refresh development from productions (20)

oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
 
Les 07 rman_rec
Les 07 rman_recLes 07 rman_rec
Les 07 rman_rec
 
Database upgradation
Database upgradationDatabase upgradation
Database upgradation
 
Oracle olap-installation
Oracle olap-installationOracle olap-installation
Oracle olap-installation
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
 
E business suite r12.2 changes for database administrators
E business suite r12.2 changes for database administratorsE business suite r12.2 changes for database administrators
E business suite r12.2 changes for database administrators
 
E business suite r12.2 changes for database administrators
E business suite r12.2 changes for database administratorsE business suite r12.2 changes for database administrators
E business suite r12.2 changes for database administrators
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
 
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive PresentationNabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation
 
Less04 Instance
Less04 InstanceLess04 Instance
Less04 Instance
 
Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan user
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
 
17398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv117398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv1
 
Less04 instance
Less04 instanceLess04 instance
Less04 instance
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
 
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
 

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
 
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
 
How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4Osama Mustafa
 
Weblogic 12c installation (oracle linux)
Weblogic 12c installation (oracle linux)Weblogic 12c installation (oracle linux)
Weblogic 12c installation (oracle linux)Osama Mustafa
 

More from Osama Mustafa (15)

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
 
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
 
OBIA Installation
OBIA Installation OBIA Installation
OBIA Installation
 
How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4
 
Weblogic 12c installation (oracle linux)
Weblogic 12c installation (oracle linux)Weblogic 12c installation (oracle linux)
Weblogic 12c installation (oracle linux)
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
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...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Refresh development from productions

  • 1. REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA REFRESH DEVELOPMENT FROM PRODUCTION Introduction This document describe steps to refresh database development from production, this way can work on RAC environment as well. Environment:- Production: - Oracle Database 11.2.0.3 Operating system: Oracle Linux 6.4 Development:- Oracle Database 11.2.0.3 Operating system: Oracle Linux 6.4 Software needed:- 1- Winscp / or Any FTP Client. 2- ssh Client.
  • 2. REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA REFRESH DEVELOPMENT FROM PRODUCTION About the Author Osama Mustafa has progressive experience in Oracle Products, community. He recently served as Oracle Database Administrator. Provide Database Implementation Solutions, High Availability Solution, Infrastructure and Storage Planning, Install, Configure, Implement and manage Oracle E-Business Suite environments. Architect, build and support highly-available Oracle EBS, Database and Fusion Middleware environments including appropriate reporting, Installs, configures, upgrades, tunes, and maintains production, development and test databases. He entered Oracle ACE Program in 2013, he is author for the book Oracle Penetration Testing, Osama Mustafa Certified OCP 10g,11g, Linux Implementations , Certified Ethical hacker and LPT , and Solaris Administrator. Include to all this Osama Mustafa is international Speaker in Oracle User Group and Oracle OTN Tour, Published Online Articles in His blog about Oracle Technology, Volunteer in Oracle User Group such as IOUG, ODTUG and UKOUG , Volunteer Board member in RACSIG and Organizer for RACATTACK Event around the world. Recently his article has been published on OTECH magazine about Real Application Cluster Here. Twitter: @OsamaOracle G+: Osama Mustafa SlidShare: Osama Mustafa LinkedIn: http://www.linkedin.com/in/osamamustafa Blog: https://osamamustafa.blogpsot.com.
  • 3. REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA REFRESH DEVELOPMENT FROM PRODUCTION Step #1:- Take Controlfile From Production Side. sqlplus "/as sysdba" SQL> alter database backup controlfile to trace as “Location”; Database altered. SQL> exit Step #2: Go to Location Controlfile Trace. Open this trace file and copy all its contents to notepad++ on your desktop machine. Step #3: Now Take Backup for your Database. sqlplus "/as sysdba" SQL> alter system archive log current; SQL> alter database begin backup; Check the Active Backup:- SQL> select count(*) from v$backup where status='ACTIVE'; SQL> exit; Step #4: Now Create backup folder called “BKP_FOLDER” and Copy All the Data files And Redo Logs to this Directory, once copy is done Run the following command :- sqlplus "/as sysdba" SQL> alter system archive log current; SQL> alter database end backup; SQL> select count(*) from v$backup where status='ACTIVE'; SQL> alter system archive log current; SQL> alter system switch logfile; SQL> alter system switch logfile; SQL> alter system switch logfile; SQL> exit; Create another “ARCH_FOLDER” and Copy All Archives log that generated in the same day to this folder if your database run No Archive mode skip this step. All the above Should Be Run on Production.
  • 4. REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA REFRESH DEVELOPMENT FROM PRODUCTION Step #5: On Test Environment, Shutdown the database & Listener. Note: Rename the directory that containing all data files, Redo logs and control files and create new directory with the same name. Step #6: Copy Backup (from production) to Test Server (New Folder).  Copy all the data files, Redo logs from “BKP_Folder” on production to Directory on Test Server “Don’t Copy Control file”  Now Copy all The Archives Logs from Production “Arch_Folder” to same directory on test. Step #7: Create control file that already Saved On Notepad.  Edit Controlfile using Notepad.  Remove all the lines before the line “STARTUP NOMOUNT”.  Change the datafiles path from production to test depend on the location.  Remove all the lines before Restlogs option.  Change the following line :- CREATE CONTROLFILE REUSE DATABASE "Production" RESETLOGS ARCHIVELOG TO CREATE CONTROLFILE SET DATABASE "TEST" RESETLOGS NOARCHIVELOG If you take the controlfile From RAC remove all the lines contains Logfile Thread 2. Now your Controlfile is ready and check the permission of Datafiles please. Save the file under “New_CTL.sql”. Step #8: Before Run the Script Make sure that Parameter files  log_archive_format Same as Production. If you don’t use Archive mode forget it. sqlplus "/as sysdba" Connected to idle instance SQL> @New_CTL.sql Control File created
  • 5. REFRESH DEVELOPMENT FROM PRODUCTION OSAMA MUSTAFA REFRESH DEVELOPMENT FROM PRODUCTION SQL> recover database using backup controlfile until cancel; In this step it will ask you about Archive log Do you remember why we copied archive from production to Test indicate the location, if it’s keep asking them apply the archive log one by one till you receive “Media recovery cancelled.” or “Media recovery complete.”, it means recovery is successful. Step #9: Shutdown database and Run the following:- SQL> shutdown immediate; SQL> alter database open resetlogs; If the above command not working set the following parameter to True  _no_recovery_through_resetlogs=TRUE Step #10: Disable Thread 2 on Database (if you are using RAC). SQL > ALTER DATABASE DISABLE THREAD 2; Then SQL > ALTER DATABASE DROP LOGFILE ….. Step #11: Finally Shutdown and Startup Database.