SlideShare a Scribd company logo
1 of 5
Download to read offline
How To Open The Standby Database When The Primary Is Lost
1/5 2/4/2009
Alejandro Vargas | Principal Support Consultant
Oracle Advanced Customer Services
INDEX
Startup Mount.....................................................................................................................................................................2
Check Status......................................................................................................................................................................2
Recover if you have logs to apply.......................................................................................................................................3
Finish the Recovery process...............................................................................................................................................4
Activate the Standby Database..........................................................................................................................................4
Check the new status.........................................................................................................................................................4
Open the Database.............................................................................................................................................................4
How To Open The Standby Database When The Primary Is Lost
2/5 2/4/2009
Startup Mount
[oracle@rac2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Feb 4 19:51:12 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> STARTUP MOUNT
ORACLE instance started.
Total System Global Area 218103808 bytes
Fixed Size 1260984 bytes
Variable Size 184549960 bytes
Database Buffers 29360128 bytes
Redo Buffers 2932736 bytes
Database mounted.
Check Status
SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
OPEN_MODE PROTECTION_MODE DATABASE_ROLE
---------- -------------------- ----------------
MOUNTED MAXIMUM PERFORMANCE PHYSICAL STANDBY
How To Open The Standby Database When The Primary Is Lost
3/5 2/4/2009
Recover if you have logs to apply
In this example the primary is lost and I don't have more archived logs to apply:
SQL> RECOVER STANDBY DATABASE;
ORA-00279: change 794348 generated at 12/29/2008 12:23:02 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/oradata/dgfdb/archive/1_49_633452428.dbf
ORA-00280: change 794348 for thread 1 is in sequence #49
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00308: cannot open archived log
'/u01/app/oracle/oradata/dgfdb/archive/1_49_633452428.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
SQL> !ls -l /u01/app/oracle/oradata/dgfdb/archive/
total 31072
-rw-r----- 1 oracle oinstall 1158656 Dec 29 11:31 1_37_633452428.dbf
-rw-r----- 1 oracle oinstall 7385600 Dec 29 11:31 1_38_633452428.dbf
-rw-r----- 1 oracle oinstall 4941824 Dec 29 11:31 1_39_633452428.dbf
-rw-r----- 1 oracle oinstall 13739008 Dec 29 11:31 1_40_633452428.dbf
-rw-r----- 1 oracle oinstall 2272256 Dec 29 11:50 1_41_633452428.dbf
-rw-r----- 1 oracle oinstall 1024 Dec 29 11:51 1_42_633452428.dbf
-rw-r----- 1 oracle oinstall 89088 Dec 29 11:51 1_43_633452428.dbf
-rw-r----- 1 oracle oinstall 1847296 Dec 29 12:18 1_44_633452428.dbf
-rw-r----- 1 oracle oinstall 135680 Dec 29 12:18 1_45_633452428.dbf
-rw-r----- 1 oracle oinstall 67584 Dec 29 12:19 1_46_633452428.dbf
How To Open The Standby Database When The Primary Is Lost
4/5 2/4/2009
-rw-r----- 1 oracle oinstall 34816 Dec 29 12:22 1_47_633452428.dbf
-rw-r----- 1 oracle oinstall 2048 Dec 29 12:22 1_48_633452428.dbf
Finish the Recovery process
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
Database altered.
Activate the Standby Database
SQL> ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;
Database altered.
Check the new status
SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
OPEN_MODE PROTECTION_MODE DATABASE_ROLE
---------- -------------------- ----------------
MOUNTED MAXIMUM PERFORMANCE PRIMARY
Open the Database
SQL> ALTER DATABASE OPEN;
How To Open The Standby Database When The Primary Is Lost
5/5 2/4/2009
Database altered.
SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
OPEN_MODE PROTECTION_MODE DATABASE_ROLE
---------- -------------------- ----------------
READ WRITE MAXIMUM PERFORMANCE PRIMARY

More Related Content

Similar to How to-open-the-standby-when-the-primary-is-lost

pdfcoffee.com_i-openwells-basics-training-3-pdf-free.pdf
pdfcoffee.com_i-openwells-basics-training-3-pdf-free.pdfpdfcoffee.com_i-openwells-basics-training-3-pdf-free.pdf
pdfcoffee.com_i-openwells-basics-training-3-pdf-free.pdf
Jalal Neshat
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2
Sal Marcus
 
Informatica installation guide
Informatica installation guideInformatica installation guide
Informatica installation guide
cbosepandian
 
Sybase SQL AnyWhere12
Sybase SQL AnyWhere12Sybase SQL AnyWhere12
Sybase SQL AnyWhere12
Sunny U Okoro
 
Motorola solutions wing 5.2.2 access point system reference guide (part no. 7...
Motorola solutions wing 5.2.2 access point system reference guide (part no. 7...Motorola solutions wing 5.2.2 access point system reference guide (part no. 7...
Motorola solutions wing 5.2.2 access point system reference guide (part no. 7...
Advantec Distribution
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instance
Monowar Mukul
 
oracle10g datagurad
oracle10g dataguradoracle10g datagurad
oracle10g datagurad
Nst Tnagar
 

Similar to How to-open-the-standby-when-the-primary-is-lost (20)

Dataguard physical stand by setup
Dataguard physical stand by setupDataguard physical stand by setup
Dataguard physical stand by setup
 
Pandora FMS: Open LDAP server monitoring administrator's manual
Pandora FMS: Open LDAP server monitoring administrator's manualPandora FMS: Open LDAP server monitoring administrator's manual
Pandora FMS: Open LDAP server monitoring administrator's manual
 
Dw guide 11 g r2
Dw guide 11 g r2Dw guide 11 g r2
Dw guide 11 g r2
 
Dataguard broker and observerst
Dataguard broker and observerstDataguard broker and observerst
Dataguard broker and observerst
 
pdfcoffee.com_i-openwells-basics-training-3-pdf-free.pdf
pdfcoffee.com_i-openwells-basics-training-3-pdf-free.pdfpdfcoffee.com_i-openwells-basics-training-3-pdf-free.pdf
pdfcoffee.com_i-openwells-basics-training-3-pdf-free.pdf
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2
 
Informatica installation guide
Informatica installation guideInformatica installation guide
Informatica installation guide
 
Pandora FMS: Mysql Server Monitoring
Pandora FMS: Mysql Server MonitoringPandora FMS: Mysql Server Monitoring
Pandora FMS: Mysql Server Monitoring
 
Sybase SQL AnyWhere12
Sybase SQL AnyWhere12Sybase SQL AnyWhere12
Sybase SQL AnyWhere12
 
Install
InstallInstall
Install
 
Motorola solutions wing 5.2.2 access point system reference guide (part no. 7...
Motorola solutions wing 5.2.2 access point system reference guide (part no. 7...Motorola solutions wing 5.2.2 access point system reference guide (part no. 7...
Motorola solutions wing 5.2.2 access point system reference guide (part no. 7...
 
actix lte
actix lteactix lte
actix lte
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instance
 
Oracle_9i_Database_Getting_started
Oracle_9i_Database_Getting_startedOracle_9i_Database_Getting_started
Oracle_9i_Database_Getting_started
 
oracle10g datagurad
oracle10g dataguradoracle10g datagurad
oracle10g datagurad
 
Data guard
Data guardData guard
Data guard
 
Punchout
PunchoutPunchout
Punchout
 
SPI Concepts.pdf
SPI Concepts.pdfSPI Concepts.pdf
SPI Concepts.pdf
 
Pandora FMS: SQL Enterprise PIugin
Pandora FMS: SQL Enterprise PIuginPandora FMS: SQL Enterprise PIugin
Pandora FMS: SQL Enterprise PIugin
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

How to-open-the-standby-when-the-primary-is-lost

  • 1. How To Open The Standby Database When The Primary Is Lost 1/5 2/4/2009 Alejandro Vargas | Principal Support Consultant Oracle Advanced Customer Services INDEX Startup Mount.....................................................................................................................................................................2 Check Status......................................................................................................................................................................2 Recover if you have logs to apply.......................................................................................................................................3 Finish the Recovery process...............................................................................................................................................4 Activate the Standby Database..........................................................................................................................................4 Check the new status.........................................................................................................................................................4 Open the Database.............................................................................................................................................................4
  • 2. How To Open The Standby Database When The Primary Is Lost 2/5 2/4/2009 Startup Mount [oracle@rac2 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.3.0 - Production on Wed Feb 4 19:51:12 2009 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. Connected to an idle instance. SQL> STARTUP MOUNT ORACLE instance started. Total System Global Area 218103808 bytes Fixed Size 1260984 bytes Variable Size 184549960 bytes Database Buffers 29360128 bytes Redo Buffers 2932736 bytes Database mounted. Check Status SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE; OPEN_MODE PROTECTION_MODE DATABASE_ROLE ---------- -------------------- ---------------- MOUNTED MAXIMUM PERFORMANCE PHYSICAL STANDBY
  • 3. How To Open The Standby Database When The Primary Is Lost 3/5 2/4/2009 Recover if you have logs to apply In this example the primary is lost and I don't have more archived logs to apply: SQL> RECOVER STANDBY DATABASE; ORA-00279: change 794348 generated at 12/29/2008 12:23:02 needed for thread 1 ORA-00289: suggestion : /u01/app/oracle/oradata/dgfdb/archive/1_49_633452428.dbf ORA-00280: change 794348 for thread 1 is in sequence #49 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} ORA-00308: cannot open archived log '/u01/app/oracle/oradata/dgfdb/archive/1_49_633452428.dbf' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3 SQL> !ls -l /u01/app/oracle/oradata/dgfdb/archive/ total 31072 -rw-r----- 1 oracle oinstall 1158656 Dec 29 11:31 1_37_633452428.dbf -rw-r----- 1 oracle oinstall 7385600 Dec 29 11:31 1_38_633452428.dbf -rw-r----- 1 oracle oinstall 4941824 Dec 29 11:31 1_39_633452428.dbf -rw-r----- 1 oracle oinstall 13739008 Dec 29 11:31 1_40_633452428.dbf -rw-r----- 1 oracle oinstall 2272256 Dec 29 11:50 1_41_633452428.dbf -rw-r----- 1 oracle oinstall 1024 Dec 29 11:51 1_42_633452428.dbf -rw-r----- 1 oracle oinstall 89088 Dec 29 11:51 1_43_633452428.dbf -rw-r----- 1 oracle oinstall 1847296 Dec 29 12:18 1_44_633452428.dbf -rw-r----- 1 oracle oinstall 135680 Dec 29 12:18 1_45_633452428.dbf -rw-r----- 1 oracle oinstall 67584 Dec 29 12:19 1_46_633452428.dbf
  • 4. How To Open The Standby Database When The Primary Is Lost 4/5 2/4/2009 -rw-r----- 1 oracle oinstall 34816 Dec 29 12:22 1_47_633452428.dbf -rw-r----- 1 oracle oinstall 2048 Dec 29 12:22 1_48_633452428.dbf Finish the Recovery process SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH; Database altered. Activate the Standby Database SQL> ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE; Database altered. Check the new status SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE; OPEN_MODE PROTECTION_MODE DATABASE_ROLE ---------- -------------------- ---------------- MOUNTED MAXIMUM PERFORMANCE PRIMARY Open the Database SQL> ALTER DATABASE OPEN;
  • 5. How To Open The Standby Database When The Primary Is Lost 5/5 2/4/2009 Database altered. SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE; OPEN_MODE PROTECTION_MODE DATABASE_ROLE ---------- -------------------- ---------------- READ WRITE MAXIMUM PERFORMANCE PRIMARY