Skip to Main Content
  • Questions
  • Using Standby (DR) database for reporting

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Uday.

Asked: October 11, 2012 - 11:12 am UTC

Last updated: December 04, 2012 - 9:33 am UTC

Version: 11g

Viewed 1000+ times

You Asked


I have a primary and a DR database - Oracle 11g.
I have a OBI read only application that connects to the database for reporting. Nightly there is a batch cycle that runs on the primary database (informatica, DAC, control-m, sql procedures) and updates the database.
After the batch cycle runs there is no updates made to the database.

My question is can I point my reporting app (OBI) to my DR database which would be in read only mode ?

I would like do this because my DR db and my reporting app are on the same physical location. Primary db is on a different physical location and adds network latency.

and Tom said...

Yes, assuming it does only read only things - no sequence.nextvals, no temporary scratch tables and such.

this is one of the typical uses of a dataguard database - read only reporting, either via active data guard (database can be recovering and reporting at the same time) or by taking the standby out of managed recovery mode (you'll be accumulating redo on the standby now) and opening it read only.

Rating

  (4 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

snapshot standby

Laurent Schneider, October 12, 2012 - 4:00 am UTC

Another interesting use of dataguard is the snapshot standby, where you open your database read write during the day and do the recover during the night.

http://docs.oracle.com/cd/E11882_01/server.112/e17022/manage_ps.htm#BACIEJJI
A snapshot standby database is a fully updatable standby database
Tom Kyte
October 12, 2012 - 8:13 am UTC



working link:

http://docs.oracle.com/cd/E11882_01/server.112/e17022/manage_ps.htm#SBYDB4801

(sorry, I decided 12 years ago to use #-B as a bold tag.... when a url has #-B in it, it turns on bold ;) )

Use of snapshot database for UAT

Sal, December 03, 2012 - 11:40 pm UTC

Dear Tom,

Lets say I create a snapshot database for end user testing of new code. Snapshot will be created of the production database, and new code will be put on, which will make thorogh changes to the data as well as objects and then tested. This will go on for about a month. Now, I want to discard all changes and catch it up to production and then repeat the cycle. Total data is about 50 GB.
Primary can go down during this period for whatever reason.

Advisable??
Tom Kyte
December 04, 2012 - 9:33 am UTC

doesn't seem like it.

first, your snapshot standby won't be a good standby as time goes on - it would take a long time to flash it back and to recover it. so it wouldn't be a standby.

second, you'd need a really large fast recovery area to be able to flashback 30 days.

it seems you want to run your standby as a standby and use rman duplicate database to create a UAT instance

50gb is so tiny - just have a database for standby and another for UAT

Daily refreshed snapshot standby

Kim, August 08, 2013 - 1:31 pm UTC

Hi Tom

Sorry if this is a new question, I am not sure.
We have a snapshot standby database which each night is converted to a physical standby, refreshed and then converted backup to snapshot standby.

My issue is that we cannot find a good way to monitor this database using Oracle Coud Control (12c).
Currently, we have the database in blackout except when it is refreshing.
If we set a blackout just before the conversion starts, and removes this after the conversion is finished, 12c issues an alert that the status of the database has changed.
Also, we have different metrics we would like to use, depending on the state of the database (snapshot/physical).

I fail to see how we can achieve this - monitoring the database when it is running as snapshot standby, as well as monitoring it when it runs as a physical standby.
One idea could be to register the database twice (of possible?) and then use one for physical standby monitoring, and the other for monitoring the snapshot standby state.

What do You think?

snapshot standby in DR

Kev, December 05, 2013 - 9:09 am UTC

Hi Tom,

We have an environment whereby we have a single physical standby that we want to use occasionally for testing as a snapshot standby.

We have been testing the environment and one of the tests involved converting the snapshot standby to a physical standby when the primary is no longer available. When we attempted this we got the following error:

DGMGRL> convert database 'DB_SITE1' to physical standby;
Converting database "DB_SITE1" to a Physical Standby database, please wait...
Error: ORA-01034: ORACLE not available
Error: ORA-16625: cannot reach database "DB_SITE2"

Does this mean that a second physical standby should be used in the event the primary goes down and the standby is in snapshot mode?

When we don't need the second physical standby how can we:

a. Convert the snapshot standby to a physical standby
b. Ensure that all logs have/can be applied

Many thanks in advance.

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library