SlideShare a Scribd company logo
Restore Production Database to Development Platform  A step-by-step example Howard Hackworth Research Scientist and Database Administrator Eli Lilly and Company,  Lilly Biotechnology Center, San Diego, CA [email_address] 12 years DBA experience. OCP 8i, 9i, and 10g.
Purpose To demonstrate the steps taken to restore your production database to an alternate host. Oracle® Database Backup and Recovery User's Guide 11g Release 2 (11.2).
Overview As part of your DR (Disaster Recovery) procedures you may want to restore your production database to a different host. This allows you to: test your current backups. rehearse the necessary steps required in the event of a real emergency, such as hardware failure on the production host.
Recommendation Rehearse, document, and practice your ability to recover the database on a regular basis.
Overview of setup and configuration Oracle Enterprise Edition 11gR2. 11.2.0.1.0 Linux RH5 NetBackup 6.5.5 Identical environments: Identical versions of Oracle. Same ORACLE_HOME and ORACLE_BASE. The archive log directory is defined to be the Flash Recovery Area: You know the DBID. Control file autobackup feature enabled with the default format.
NetBackup MML considerations Restoring from tape using the NetBackup MML MANDITORY requirement on the NetBackup Master Server. On the NBU Master server the following directory and file must exist: /[netbackup install]/db/altnames/No.Restrictions
Restore File System Directories Restore the prod related file system directories to the development host. $ORACLE_BASE /admin/prod $ORACLE_BASE/diag/rdbms/prod $ORACLE_BASE/cfgtoollogs/dbca/prod $ORACLE_BASE/cfgtoollogs/emca/prod $ORACLE_BASE /flash_recovery_area/PROD On your development host server, delete all files and directories from the restored archive log destination(s).
Shutdown the DEV instance Shut down OEM for dev % emctl stop dbconsole   Shutdown the DEV instance
Set the PROD environment on the development server Set ORACLE_SID to PROD.  Insure there is a password file for PROD. If the prod password file does not exist, create one. This allows you to login as ‘sys as sysdba’ to the newly restored database. Be sure it matches the password for sys on prod.
Restore If you are restoring the database for test purposes, never connect to the RMAN recovery catalog throughout the test. Connect to RMAN  without the catalog . Set the DBID for the new database.
Restore RMAN> startup nomount; startup failed: ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file ‘/app/oracle/product/11.2.0/dbs/initprod.ora' starting Oracle instance without parameter file for retrieval of spfile Oracle instance started   RMAN will fail to find the server parameter file, which has not yet been restored, but will start the instance with a "dummy" file.
Restore Restore the spfile to pfile. RMAN> run { allocate channel t1 device type sbt; send 'NB_ORA_SERV=NBU_MasterServer.com, NB_ORA_CLIENT=Original_Client.com'; set controlfile autobackup format for device type sbt to '%F'; restore spfile to pfile '?/dbs/initprod.ora' from autobackup; shutdown abort; }
Restore Edit the server parameter file (if necessary). Restart the instance with the restored parameter file.   RMAN> startup force nomount pfile='?/dbs/initprod.ora'; Oracle instance started
Restore Restore the control file from an autobackup, then mount the database.   RMAN> run { allocate channel t1 device type sbt; send 'NB_ORA_SERV= NBU_MasterServer.com, NB_ORA_CLIENT= Original_Client.com'; restore controlfile from autobackup; alter database mount; }
Restore Restore the database. RMAN> run { allocate channel t1 device type sbt; send 'NB_ORA_SERV= NBU_MasterServer.com, NB_ORA_CLIENT= Original_Client.com'; set until sequence 929 thread 1; restore database; recover database; }
Restore Open the database and reset the redo logs. RMAN> RMAN> alter database open resetlogs; database opened RMAN> RMAN> exit Recovery Manager complete.
Memory Parameters modifications Allow enough memory for both to run at the same time. Updates to pfile (both prod and dev) memory_max_target memory_target   Update db_recovery_file_dest and reduce flashback retention period. alter system set db_recovery_file_dest_size=250M scope=both; alter system set db_flashback_retention_target=1440 scope=both; #24 hours
Building OEM Drop existing OEM repository % cd $ORACLE_HOME/sysman/admin/emdrep/bin/ % ./RepManager devhost.com <listener port> prod -action drop Enter SYS user's password :  xxxxxxxx Enter repository user name : sysman Create new OEM repository for the restored instance cd $ORACLE_HOME/bin % ./emca -config dbcontrol db -repos create Enterprise Manager configuration completed successfully FINISHED EMCA
Dropping the new copy of the PROD database Stop OEM ~% emctl stop dbconsole; Shutdown the newly restored db and restart in Exclusive mode using the pfile. SQL> shutdown immediate; SQL> startup pfile='?/dbs/initprod.ora' mount exclusive restrict;
Dropping the new copy of the PROD database Issue the drop database command SQL> drop database;   Database dropped.   Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> quit
Conclusion A DBA can do everything else in the world wrong -- EVERYTHING.  We can fix that, we can resolve those issues.  But if they mess up backup and recovery – forget about it. You are hosed.  ~ Unknown author and DBA

More Related Content

PPTX
Cloning Oracle EBS R12: A Step by Step Procedure
PPTX
Data Guard New Features
PDF
Step by Step Restore rman to different host
DOCX
Physical_Standby_Database_R12.2.4
PDF
FIXING BLOCK CORRUPTION (RMAN) on 11G
 
PPT
Les 06 Perform Rec
PDF
Pluggable database tutorial
PDF
Basic - Oracle Edition Based Redefinition Presentation
 
Cloning Oracle EBS R12: A Step by Step Procedure
Data Guard New Features
Step by Step Restore rman to different host
Physical_Standby_Database_R12.2.4
FIXING BLOCK CORRUPTION (RMAN) on 11G
 
Les 06 Perform Rec
Pluggable database tutorial
Basic - Oracle Edition Based Redefinition Presentation
 

What's hot (20)

PDF
Oracle 11g Installation With ASM and Data Guard Setup
PDF
Pluggable database tutorial 2
TXT
oracle dba
PDF
Backup andrecoverychecklist
PDF
Oracle applications 11i hot backup cloning with rapid clone
DOC
Oracle applications 11i hot backup cloning with rapid clone
PPT
Les 01 Arch
DOCX
Backup and Recovery
PDF
Install and upgrade Oracle grid infrastructure 12.1.0.2
PPT
Les 10 Tune Rman
PDF
Pluggable database 3
DOC
Rman cloning guide
PPT
Les 02 Config Rec
PDF
Refresh development from productions
PPT
Les 07 Rman Rec
PDF
B35 all you wanna know about rman by francisco alvarez
DOCX
Asm disk group migration from
DOCX
Creating a physical standby database 11g on windows
PPT
Les 05 Create Bu
PPT
Less02 Installation
Oracle 11g Installation With ASM and Data Guard Setup
Pluggable database tutorial 2
oracle dba
Backup andrecoverychecklist
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
Les 01 Arch
Backup and Recovery
Install and upgrade Oracle grid infrastructure 12.1.0.2
Les 10 Tune Rman
Pluggable database 3
Rman cloning guide
Les 02 Config Rec
Refresh development from productions
Les 07 Rman Rec
B35 all you wanna know about rman by francisco alvarez
Asm disk group migration from
Creating a physical standby database 11g on windows
Les 05 Create Bu
Less02 Installation

Viewers also liked (20)

PPTX
2 clasificación de los ángulos
PDF
El Costo de las Redes Sociales
PPT
Bolum3111
PDF
06. a. salinan permendikbud no. 68 th 2013 ttg ttg kd dan struktur kurikulum ...
PPTX
Shoug at apouc2015 4min pitch_biotwang_v2
PPTX
New Zealand Franchising Confidence Index | January 2016
PDF
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
PPT
Forward Progress Energy Field
PPTX
2012 CTL presentation
PPT
Vision and Planning Energy Field
PPTX
New Zealand Franchising Confidence Index | October 2013
PPTX
Recruitment Services of M/s. Diverse
PDF
Audit Services of M/s. Diverse
PDF
在Aix6.1上安装11g r2 rac grid infrastructure集群
PPT
7 cabaranprofesionkeguruan-090610200126-phpapp01
PPT
Purpose & Standards Energy Field
PDF
Villaggio - November at a Glance Email
PDF
Hypothermia and the battle casualty Wishaw
PDF
Ais life 2010-3
PDF
Oracle中比对2张表之间数据是否一致的几种方法
2 clasificación de los ángulos
El Costo de las Redes Sociales
Bolum3111
06. a. salinan permendikbud no. 68 th 2013 ttg ttg kd dan struktur kurikulum ...
Shoug at apouc2015 4min pitch_biotwang_v2
New Zealand Franchising Confidence Index | January 2016
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
Forward Progress Energy Field
2012 CTL presentation
Vision and Planning Energy Field
New Zealand Franchising Confidence Index | October 2013
Recruitment Services of M/s. Diverse
Audit Services of M/s. Diverse
在Aix6.1上安装11g r2 rac grid infrastructure集群
7 cabaranprofesionkeguruan-090610200126-phpapp01
Purpose & Standards Energy Field
Villaggio - November at a Glance Email
Hypothermia and the battle casualty Wishaw
Ais life 2010-3
Oracle中比对2张表之间数据是否一致的几种方法

Similar to 2011 384 hackworth_ppt (20)

PPT
Les 07 rman_rec
PPT
Les 08 Dupe Db
PPTX
Convert single instance to RAC
PDF
oracle upgradation
DOC
Oracle data guard configuration in 12c
PPT
D17316 gc20 l05_phys_sql
PPT
15362590.ppt
PPT
Les 20 dup_db
PDF
How to create a non managed standby database
PDF
Oracle Database Backup
PPT
5895640.ppt
PPT
Oracle backup and recovery
PDF
17398351 sap-system-copy-homcopyv1
PPT
Adventures in Dataguard
DOC
Controlfilemanagement
PDF
Installing oracle grid infrastructure and database 12c r1
PPT
Less04 Instance
PDF
Kp.3 pengaturan sistem dan user
PDF
Out of the Box Replication in Postgres 9.4(PgCon)
PDF
Out of the Box Replication in Postgres 9.4(PgCon)
Les 07 rman_rec
Les 08 Dupe Db
Convert single instance to RAC
oracle upgradation
Oracle data guard configuration in 12c
D17316 gc20 l05_phys_sql
15362590.ppt
Les 20 dup_db
How to create a non managed standby database
Oracle Database Backup
5895640.ppt
Oracle backup and recovery
17398351 sap-system-copy-homcopyv1
Adventures in Dataguard
Controlfilemanagement
Installing oracle grid infrastructure and database 12c r1
Less04 Instance
Kp.3 pengaturan sistem dan user
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)

More from maclean liu (20)

PDF
Mysql企业备份发展及实践
PDF
Oracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアル
PDF
【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略
PDF
基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案
PDF
TomCat迁移步骤简述以及案例
PDF
PRM DUL Oracle Database Health Check
PDF
dbdao.com 汪伟华 my-sql-replication复制高可用配置方案
DOCX
Vbox virtual box在oracle linux 5 - shoug 梁洪响
PDF
【诗檀软件】Mysql高可用方案
PPTX
Apouc 4min pitch_biotwang_v2
PDF
使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1
PDF
诗檀软件 Oracle开发优化基础
PDF
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wang
PDF
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24
PDF
追求Jdbc on oracle最佳性能?如何才好?
PDF
Prm dul is an oracle database recovery tool database
PDF
Oracle prm dul, jvm and os
PDF
Oracle dba必备技能 使用os watcher工具监控系统性能负载
PDF
Parnassus data recovery manager for oracle database user guide v0.3
DOCX
Oracle prm安装说明
Mysql企业备份发展及实践
Oracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアル
【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略
基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案
TomCat迁移步骤简述以及案例
PRM DUL Oracle Database Health Check
dbdao.com 汪伟华 my-sql-replication复制高可用配置方案
Vbox virtual box在oracle linux 5 - shoug 梁洪响
【诗檀软件】Mysql高可用方案
Apouc 4min pitch_biotwang_v2
使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1
诗檀软件 Oracle开发优化基础
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wang
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24
追求Jdbc on oracle最佳性能?如何才好?
Prm dul is an oracle database recovery tool database
Oracle prm dul, jvm and os
Oracle dba必备技能 使用os watcher工具监控系统性能负载
Parnassus data recovery manager for oracle database user guide v0.3
Oracle prm安装说明

Recently uploaded (20)

PPTX
the-solar-system.pptxxxxxxxxxxxxxxxxxxxx
PPTX
just letters randomized coz i need to up
PPTX
SPARSH-SVNITs-Annual-Cultural-Fest presentation for orientation
PDF
Gess1025.pdfdadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
PDF
WKA #29: "FALLING FOR CUPID" TRANSCRIPT.pdf
PDF
What is Rotoscoping Best Software for Rotoscoping in 2025.pdf
PPTX
PRECISION AGRICULTURE- 1.pptx for agriculture
PPTX
providenetworksystemadministration.pptxhnnhgcbdjckk
PPTX
wegen seminar ppt.pptxhkjbkhkjjlhjhjhlhhvg
PPTX
genderandsexuality.pptxjjjjjjjjjjjjjjjjjjjj
DOCX
Lambutchi Calin Claudiu had a discussion with the Buddha about the restructur...
PPTX
Other Dance Forms - G10 MAPEH Reporting.pptx
PDF
Between the Reels and the Revolution Enzo Zelocchi’s Unscripted Path Through ...
DOC
NSCAD毕业证学历认证,温哥华岛大学毕业证国外证书制作申请
PDF
oppenheimer and the story of the atomic bomb
PPT
business model and some other things that
PPTX
The story of Nomuzi and the way she was living
DOCX
Elisabeth de Pot, the Witch of Flanders .
PPTX
Hacking Movie – Best Films on Cybercrime & Digital Intrigue
PDF
My Oxford Year- A Love Story Set in the Halls of Oxford
the-solar-system.pptxxxxxxxxxxxxxxxxxxxx
just letters randomized coz i need to up
SPARSH-SVNITs-Annual-Cultural-Fest presentation for orientation
Gess1025.pdfdadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
WKA #29: "FALLING FOR CUPID" TRANSCRIPT.pdf
What is Rotoscoping Best Software for Rotoscoping in 2025.pdf
PRECISION AGRICULTURE- 1.pptx for agriculture
providenetworksystemadministration.pptxhnnhgcbdjckk
wegen seminar ppt.pptxhkjbkhkjjlhjhjhlhhvg
genderandsexuality.pptxjjjjjjjjjjjjjjjjjjjj
Lambutchi Calin Claudiu had a discussion with the Buddha about the restructur...
Other Dance Forms - G10 MAPEH Reporting.pptx
Between the Reels and the Revolution Enzo Zelocchi’s Unscripted Path Through ...
NSCAD毕业证学历认证,温哥华岛大学毕业证国外证书制作申请
oppenheimer and the story of the atomic bomb
business model and some other things that
The story of Nomuzi and the way she was living
Elisabeth de Pot, the Witch of Flanders .
Hacking Movie – Best Films on Cybercrime & Digital Intrigue
My Oxford Year- A Love Story Set in the Halls of Oxford

2011 384 hackworth_ppt

  • 1. Restore Production Database to Development Platform A step-by-step example Howard Hackworth Research Scientist and Database Administrator Eli Lilly and Company, Lilly Biotechnology Center, San Diego, CA [email_address] 12 years DBA experience. OCP 8i, 9i, and 10g.
  • 2. Purpose To demonstrate the steps taken to restore your production database to an alternate host. Oracle® Database Backup and Recovery User's Guide 11g Release 2 (11.2).
  • 3. Overview As part of your DR (Disaster Recovery) procedures you may want to restore your production database to a different host. This allows you to: test your current backups. rehearse the necessary steps required in the event of a real emergency, such as hardware failure on the production host.
  • 4. Recommendation Rehearse, document, and practice your ability to recover the database on a regular basis.
  • 5. Overview of setup and configuration Oracle Enterprise Edition 11gR2. 11.2.0.1.0 Linux RH5 NetBackup 6.5.5 Identical environments: Identical versions of Oracle. Same ORACLE_HOME and ORACLE_BASE. The archive log directory is defined to be the Flash Recovery Area: You know the DBID. Control file autobackup feature enabled with the default format.
  • 6. NetBackup MML considerations Restoring from tape using the NetBackup MML MANDITORY requirement on the NetBackup Master Server. On the NBU Master server the following directory and file must exist: /[netbackup install]/db/altnames/No.Restrictions
  • 7. Restore File System Directories Restore the prod related file system directories to the development host. $ORACLE_BASE /admin/prod $ORACLE_BASE/diag/rdbms/prod $ORACLE_BASE/cfgtoollogs/dbca/prod $ORACLE_BASE/cfgtoollogs/emca/prod $ORACLE_BASE /flash_recovery_area/PROD On your development host server, delete all files and directories from the restored archive log destination(s).
  • 8. Shutdown the DEV instance Shut down OEM for dev % emctl stop dbconsole   Shutdown the DEV instance
  • 9. Set the PROD environment on the development server Set ORACLE_SID to PROD. Insure there is a password file for PROD. If the prod password file does not exist, create one. This allows you to login as ‘sys as sysdba’ to the newly restored database. Be sure it matches the password for sys on prod.
  • 10. Restore If you are restoring the database for test purposes, never connect to the RMAN recovery catalog throughout the test. Connect to RMAN without the catalog . Set the DBID for the new database.
  • 11. Restore RMAN> startup nomount; startup failed: ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file ‘/app/oracle/product/11.2.0/dbs/initprod.ora' starting Oracle instance without parameter file for retrieval of spfile Oracle instance started   RMAN will fail to find the server parameter file, which has not yet been restored, but will start the instance with a &quot;dummy&quot; file.
  • 12. Restore Restore the spfile to pfile. RMAN> run { allocate channel t1 device type sbt; send 'NB_ORA_SERV=NBU_MasterServer.com, NB_ORA_CLIENT=Original_Client.com'; set controlfile autobackup format for device type sbt to '%F'; restore spfile to pfile '?/dbs/initprod.ora' from autobackup; shutdown abort; }
  • 13. Restore Edit the server parameter file (if necessary). Restart the instance with the restored parameter file.   RMAN> startup force nomount pfile='?/dbs/initprod.ora'; Oracle instance started
  • 14. Restore Restore the control file from an autobackup, then mount the database.   RMAN> run { allocate channel t1 device type sbt; send 'NB_ORA_SERV= NBU_MasterServer.com, NB_ORA_CLIENT= Original_Client.com'; restore controlfile from autobackup; alter database mount; }
  • 15. Restore Restore the database. RMAN> run { allocate channel t1 device type sbt; send 'NB_ORA_SERV= NBU_MasterServer.com, NB_ORA_CLIENT= Original_Client.com'; set until sequence 929 thread 1; restore database; recover database; }
  • 16. Restore Open the database and reset the redo logs. RMAN> RMAN> alter database open resetlogs; database opened RMAN> RMAN> exit Recovery Manager complete.
  • 17. Memory Parameters modifications Allow enough memory for both to run at the same time. Updates to pfile (both prod and dev) memory_max_target memory_target   Update db_recovery_file_dest and reduce flashback retention period. alter system set db_recovery_file_dest_size=250M scope=both; alter system set db_flashback_retention_target=1440 scope=both; #24 hours
  • 18. Building OEM Drop existing OEM repository % cd $ORACLE_HOME/sysman/admin/emdrep/bin/ % ./RepManager devhost.com <listener port> prod -action drop Enter SYS user's password : xxxxxxxx Enter repository user name : sysman Create new OEM repository for the restored instance cd $ORACLE_HOME/bin % ./emca -config dbcontrol db -repos create Enterprise Manager configuration completed successfully FINISHED EMCA
  • 19. Dropping the new copy of the PROD database Stop OEM ~% emctl stop dbconsole; Shutdown the newly restored db and restart in Exclusive mode using the pfile. SQL> shutdown immediate; SQL> startup pfile='?/dbs/initprod.ora' mount exclusive restrict;
  • 20. Dropping the new copy of the PROD database Issue the drop database command SQL> drop database;   Database dropped.   Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> quit
  • 21. Conclusion A DBA can do everything else in the world wrong -- EVERYTHING.  We can fix that, we can resolve those issues.  But if they mess up backup and recovery – forget about it. You are hosed. ~ Unknown author and DBA