I Strongly recommend to read this presentation before reading questions

http://sureshgandhi.fles.wordpress.com/2012/10/dataguardpresentation.ppt
1. !an "racle#s $ata %uard be used on Standard &dition' and if so how( )ow can
you test that the standby database is in sync(
Oracle's Data Guard technology is a layer of software and automation built on top of the
standby database facility. In Oracle Standard Edition it is possible to be a standby database,
and update it *manually*. oughly, put your production database in archi!elog mode. "reate
a hotbac#up of the database and mo!e it to the standby machine. $hen create a standby
control%le on the production machine, and ship that %le, along with all the archi!ed redolog
%les to the standby ser!er. Once you ha!e all these %les assembled, place them in their
proper locations, reco!er the standby database, and you're ready to roll. &rom this point on,
you must manually ship, and manually apply those archi!ed redologs to stay in sync with
production.
$o test your standby database, ma#e a change to a table on the production ser!er, and
commit the change. $hen manually switch a log%le so those changes are archi!ed. 'anually
ship the newest archi!ed redolog %le, and manually apply it on the standby database. $hen
open your standby database in read(only mode, and select from your changed table to !erify
those changes are a!ailable. Once you're done, shutdown your standby and startup again in
standby mode.
2. *hat is the di+erence between ,cti-e $ataguard' and the .ogical Standby
implementation of 10g dataguard(
)cti!e dataguard is mostly about the physical standby.
*se physical standby for testing without compromising protection of the production system.
+ou can open the physical standby read,write ( do some destructi!e things in it -drop tables,
change data, whate!er ( run a test ( perhaps with real application testing.. /hile this is
happening, redo is still streaming from production, if production fails ( you are co!ered. *se
physical standby for reporting while in managed reco!ery mode. Since physical standby
supports all of the datatypes ( and logical standby does not -00g added broader support, but
not 0112. ( there are times when logical standby isn3t su4cient. It also permits fast
incremental bac#ups when o5oading bac#ups to a physical standby database.
/. *hat is a $ataguard(
Oracle Dataguard is a disaster reco!ery solution from Oracle "orporation that has been
utili6ed in the industry e7tensi!ely at times of 8rimary site failure, failo!er, switcho!er
scenarios.
0. *hat are the uses of "racle $ata %uard(
a. Oracle Data Guard ensures high a!ailability, data protection, and disaster reco!ery for
enterprise data.
b. Data Guard pro!ides a comprehensi!e set of ser!ices that create, maintain, manage, and
monitor one or more standby databases to enable production Oracle databases to sur!i!e
disasters and data corruptions.
c. /ith Data Guard, administrators can optionally impro!e production database performance
by o5oading resource(intensi!e bac#up and reporting operations to standby systems.
1. *hat is 2edo 3ransport Ser-ices(
It control the automated transfer of redo data from the production database to one or more
archi!al destinations.
edo transport ser!ices perform the following tas#s9
a. $ransmit redo data from the primary system to the standby systems in the con%guration.
b. 'anage the process of resol!ing any gaps in the archi!ed redo log %les due to a networ#
failure.
c. )utomatically detect missing or corrupted archi!ed redo log %les on a standby system and
automatically retrie!e replacement archi!ed redo log %les from the
primary database or another standby database.
4. *hat is apply ser-ices(
)pply redo data on the standby database to maintain transactional synchroni6ation with the
primary database. edo data can be applied either from archi!ed redo log %les, or, if real(
time apply is enabled, directly from the standby redo log %les as they are being %lled,
without re:uiring the redo data to be archi!ed %rst at the standby database. It also allows
read(only access to the data.
5. *hat is di+erence between physical and standby databases(
$he main di;erence between physical and logical standby databases is the manner in
which apply ser!ices apply the archi!ed redo data9
a. &or physical standby databases, Data Guard uses edo )pply technology, which applies
redo data on the standby database using standard reco!ery techni:ues of
an Oracle database.
b. &or logical standby databases, Data Guard uses S<= )pply technology, which %rst
transforms the recei!ed redo data into S<= statements and then e7ecutes the
generated S<= statements on the logical standby database.
6. *hat is $ata %uard 7ro8er(
Data guard >ro#er manage primary and standby databases using the S<= command(line
interfaces or the Data Guard bro#er interfaces, including a command(line interface
-DG'G=. and a graphical user interface that is integrated in Oracle Enterprise 'anager. It
can be used to perform9
a. "reate and enable Data Guard con%gurations, including setting up redo transport ser!ices
and apply ser!ices
b. 'anage an entire Data Guard con%guration from any system in the con%guration
c. 'anage and monitor Data Guard con%gurations that contain Oracle )" primary or
standby databases
d. Simplify switcho!ers and failo!ers by allowing you to in!o#e them using either a single
#ey clic# in Oracle Enterprise 'anager or a single command in the DG'G= command(line
interface.
e. Enable fast(start failo!er to fail o!er automatically when the primary database becomes
una!ailable. /hen fast(start failo!er is enabled, the Data Guard bro#er determines if a
failo!er is necessary and initiates the failo!er to the speci%ed target standby database
automatically, with no need for D>) inter!ention.
9. *hat are the $ata guard :rotection modes and summari;e each(
'a7imum a!ailability 9
$his protection mode pro!ides the highest le!el of data protection that is possible without
compromising the a!ailability of a primary database. $ransactions do not commit until all
redo data needed to reco!er those transactions has been written to the online redo log and
to at least one standby database.
'a7imum performance 9
$his is the default protection mode. It pro!ides the highest le!el of data protection that is
possible without a;ecting the performance of a primary database. $his is accomplished by
allowing transactions to commit as soon as all redo data generated by those transactions
has been written to the online log.
'a7imum protection 9
$his protection mode ensures that no data loss will occur if the primary database fails. $o
pro!ide this le!el of protection, the redo data needed to reco!er a transaction must be
written to both the online redo log and to at least one standby database before the
transaction commits. $o ensure that data loss cannot occur, the primary database will shut
down, rather than continue processing transactions.
10. If you didn#t ha-e access to the standby database and you wanted to fnd out
what error has occurred in a data guard confguration' what -iew would you chec8
in the primary database to chec8 the error message(
+ou can chec# the !?dataguard@status !iew. Select message from !?dataguard@statusA
11. In "racle 11g' what command in 2<,= can you use to create the standby
database while the target database is acti-e(
Oracle 00g has made it e7tremely simple to set up a standby database en!ironment
because Recovery Manager -')B. now supports the ability to clone the e7isting primary
database directly to the intended standby database siteover the network !ia the
$>:.I!,3& $,3,7,S& command set while the target database is active. ')B
automatically generates a con!ersion script in memory on the primary site and uses that
script to manage the cloning operation on the standby site with !irtually no D>) inter!ention
re:uired. +ou can e7ecute this in a run bloc# in ')B9
duplicate target database for standby doreco!er from acti!e databaseA
12. *hat additional standby database mode does "racle 11g o+er(
Oracle 00g has introduced the Oracle Snapshot Standby Database. In Snapshot Standby
Database a physical standby database can easily open in read(write mode and again you
can con!ert it bac# to the physical standby database. $his is suitable for test and
de!elopment en!ironments and also maintains protection by continuing to recei!e data from
the production database and archi!ing it for later use.
1/. In "racle 11g how can speed up bac8ups on the standby database(
In Oracle 00g, bloc# change trac#ing is now supported in the standby database.
10. *ith the a-ailability of ,cti-e $ata %uard' what role does S?. ,pply @logical
standbyA continue to play(
*se S<= )pply for the following re:uirements9 -a. when you re:uire read(write access to a
synchroni6ed standby database but do not modify primary data, -b. when you wish to add
local tables to the standby database that can also be updated, or -c. when you wish to
create additional inde7es to optimi6e read performance. $he ability to handle local writes
ma#es S<= )pply better suited to pac#aged reporting applications that often re:uire write
access to local tables that e7ist only at the target database. S<= )pply also pro!ides rolling
upgrade capability for patchsets and maCor database releases. $his rolling upgrade
functionality can also be used by physical standby databases beginning with Oracle 00g
using $ransient =ogical Standby.
11. *hy would I use ,cti-e $ata %uard and not simply use S?. ,pply @logical
standbyA that is included with $ata %uard 11g(
If read(only access satis%es the re:uirement ( )cti!e Data Guard is a closer %t for the
re:uirement, and therefore is much easier to implement than any other approach. )cti!e
Data Guard supports all datatypes and is !ery simple to implement. )n )cti!e Data Guard
replica can also easily support additional uses ( o5oading bac#ups from the primary
database, ser!e as an open read(write test system during o;(pea# hours -Snapshot
Standby., and pro!ide an e7act copy of the production database for disaster reco!ery ( fully
utili6ing standby ser!ers, storage and software while in standby role.
14. *hy do I need the "racle 11g ,cti-e $ata %uard "ption(
8re!ious capabilities did not allow edo )pply to be acti!e while a physical standby database
was open read(only, and did not enable ')B bloc# change trac#ing on the standby
database. $his resulted in -a. read(only access to data that was fro6en as of the time that
the standby database was opened read(only, -b. failo!er and switcho!er operations that
could ta#e longer to complete due to the bac#log of redo data that would need to be applied,
and -c. incremental bac#ups that could ta#e up to D17 longer to complete ( e!en on a
database with a moderate rate of change. 8re!ious capabilities are still included with Oracle
Data Guard 00g, no additional license is re:uired to use pre!ious capabilities.
15. If you wanted to upgrade your current 10g physical standby data guard
confguration to 11g' can you upgrade the standby to 11g frst then upgrade the
primary (
+es, in Oracle 00g, you can temporarily con!ert the physical standby database to a logical
standby database to perform a rolling upgrade. /hen you issue the con!ert command you
need to #eep the identity9
alter database reco!er logical standby #eep identityA
16. If you ha-e a lowBbandwidth *,= networ8' what can you do to impro-e the
"racle 11g data guard confguration in a %,: detected situation(
Oracle 00g introduces the capability to compress redo log data as it transports o!er the
networ# to the standby database. It can be enabled using the compression parameter.
"ompression becomes enabled only when a gap e7ists and the standby database needs to
catch up to the primary database.
alter system set log@archi!e@dest@0E'SEFI"EED>)00GD "O'8ESSIOBEEB)>=E'A
19. In an "racle 11g .ogical Standby $ata %uard confguration' how can you tell
the dbmsscheduler to only run Cobs in primary database(
Oracle 00g, logical standby now pro!ides support for D>'S@S"GED*=E. It is capable of
running Cobs in both primary and logical standby database. +ou can use the
D>'S@S"GED*=E.SE$@)$$I>*$E procedure to set the database@role. +ou can specify that
the Cobs can run only when operating in that particular database role.
20. )ow can you control when an archi-e log can be deleted in the standby
database in oracle 11g (
In Oracle 00g, you can control it by using the log@auto@delete initiali6ation parameter. $he
log@auto@delete parameter must be coupled with the log@auto@del@retention@target
parameter to specify the number of minutes an archi!elog is maintained until it is purged.
Default is DH hours. &or archi!elog retention to be e;ecti!e, the log@auto@delete parameter
must be set to true.
21. !an "racle $ata %uard be used with Standard &dition of "racle (
+es and Bo. $he automated features of Data Guard are not a!ailable in the standard edition
of Oracle. +ou can still howe!er, perform log shipping manually and write scripts to manually
perform the steps. If you are on uni7 platform, you can write shell scripts that identify the
logs and then use the scp or sftp command to ship it to the standby ser!er. $hen on the
standby ser!er, identify which logs ha!e not been applied and apply,reco!er them maually
and remo!e them once applied.