Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

   
 

Open Data Guard standby in read-only mode

Oracle Database Tips by Donald BurlesonDecember 9, 2015

<

Data Guard

Donald K. Burleson

Opening a Data Guard Oracle instance in Read-only Mode

As explained before, a physical standby database can be toggled between recovery and read-only mode. If the database is currently in managed recovery mode, in order to open it for reporting, cancel the recovery and open it as read-only. The following statements summarize the steps involved:

 

Opening the Oracle instance in Read-only Mode

  • Stop the managed recovery process using:

ALTER DATABASE RECOVER MANAGED
Oracle instance CANCEL;

  • Open database as read only:

ALTER DATABASE OPEN READ ONLY;

If the database is shutdown, in order to open it as read-only, mount the database as standby and then open it as read-only. The following statements illustrate this:

  • Startup the database using:

STARTUP NOMOUNT;

  • Mount the Oracle instance using:

ALTER DATABASE MOUNT STANDBY DATABASE;

  • Open the database in read only mode using:

ALTER DATABASE OPEN READ ONLY;

To start recovery again on the standby site, terminate all active user sessions and issue the following statement:


ALTER DATABASE RECOVER MANAGED Oracle instance DISCONNECT FROM SESSION;

The v$session dynamic performance view can be used to find the active user sessions in the database.

When the database is open in read-only mode for reporting and query purposes, it is very likely that sorting operations will take place. In any database, sorting operations occur in memory specified by the sort_area_size or on a disk in a temporary tablespace. Ideally, all sorting operations should occur in memory, but that is not always possible, so temporary tablespaces are required.

If the temporary tablespace was not created during the creation of the physical standby database, it must be created before queries can be executed on the standby database. There are few things that must be considered about a temporary tablespace in the standby database:

A temporary tablespace cannot be created on the standby database.  Tempfiles can only be associated with a temporary tablespace. Therefore, the temporary tablespace should be present on the primary database before creating the standby database, or it should be created on a Oracle instance through the recovery mechanism.

 

Opening the Oracle instance in Read-only Mode

  • The temporary tablespace should contain only temporary files.
     

  • The temporary tablespace should be locally managed.

To add a temporary file to a temporary tablespace, open the Oracle instance in read-only mode and add the tempfile. The following statement adds a tempfile to the temporary tablespace temp on the standby database:

ALTER TABLESPACE TEMP
ADD TEMPFILE '/oracle/appsdb/data/temp01.dbf'
SIZE 200M REUSE;

Manual Recovery of Standby Databases

Starting with Oracle9i, manual recovery may not be the natural option for recovering a standby database, but this mode formed the foundation of Oracle instance technology back in the days of Oracle7.x. Apart from the historical importance, there are other good reasons to learn manual recovery.  The knowledge of manual recovery can prove to be very handy when the managed recovery is not working. Moreover, in some cases it may not be possible to establish an Oracle Net connection between the primary and the standby node, and in this situation manual recovery is the only option.

 


The above text is an excerpt from the book: Oracle Data Guard Handbook


��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.