1) How to setup Data Guard?
---Dataguard Implementation Steps
http://oracledbazone.blogspot.in/2015/01/oracle-dataguard-implementation.html
2) What are different types of modes in Data Guard and which
is default?
Maximum performance:
This is the default protection
mode.
It provides the highest level
of data protection that is possible without affecting the performance of a
primary database.
This is accomplished by
allowing transactions to commit as soon as all redo data generated by those
transactions has been written to the online log.
Maximum protection:
This protection mode ensures
that no data loss will occur if the primary database fails.
To provide this level of
protection, the redo data needed to recover a transaction must be written to
both the online redo log and to at least one standby database before the
transaction commits.
To ensure that data loss
cannot occur, the primary database will shut down, rather than continue
processing transactions.
Maximum availability:
This protection mode provides
the highest level of data protection that is possible without compromising the
availability of a primary database.
Transactions do not commit
until all redo data needed to recover those transactions has been written to
the online redo log and to at least one standby database.
3) How many standby databases we can create (in 10g/11g)?
Till Oracle 10g, 9 standby databases
are supported.
From Oracle 11g R2, we can create 30 standby databases.
4) What are the parameters we have to set in primary/standby
for Data Guard ?
DB_UNIQUE_NAME
LOG_ARCHIVE_CONFIG
LOG_ARCHIVE_MAX_PROCESSES
DB_CREATE_FILE_DEST
DB_FILE_NAME_CONVERT
LOG_FILE_NAME_CONVERT
LOG_ARCHIVE_DEST_n
LOGARCHIVE_DEST_STATE_n
FAL_SERVER
FAL_CLIENT
STANDBY_FILE_MANAGEMENT
5) What is the use of fal_server & fal_client, is it
mandatory to set these ?
FAL_SERVER
specifies the FAL (fetch
archive log) server for a standby database. The value is an Oracle Net service
name, which is assumed to be configured properly on the standby database system
to point to the desired FAL server.
FAL_CLIENT
specifies the FAL (fetch
archive log) client name that is used by the FAL service, configured through the
FAL_SERVER initialization
parameter, to refer to the FAL client.
The value is an Oracle Net
service name, which is assumed to be configured properly on the FAL server
system to point to the FAL client (standby database).
6) What are differences between physical, logical, snapshot
standby and Active DG , what are different types of standby databases?
Physical standby – in mount state, MRP will apply archives
ADG – in READ ONLY state, MRP
will apply archives
Logical standby – in READ ONLY
state, LSP will run
Snapshot standby databases – Physical standby database can be converted
to snapshot standby database, which will be in READ WRITE mode, can do any kind
of testing, then we can convert back snapshot standby database to physical
standby database and start MRP which will apply all pending archives.
7) How to find out backlog of standby?
SELECT ROUND((SYSDATE -
A.NEXT_TIME)*24*60) AS "BACKLOG",M.SEQUENCE#-1 "SEQ
APPLIED",M.PROCESS, M.STATUS
FROM V$ARCHIVED_LOG A, (SELECT
PROCESS,SEQUENCE#, STATUS FROM V$MANAGED_STANDBY WHERE PROCESS LIKE '%MRP%')M
WHERE A.SEQUENCE#=(M.SEQUENCE#-1);
8) If you didn't have access to the standby database and you
wanted to find out what error has occurred in a data guard configuration, what
view would you check in the primary database to check the error message?
You can check the v$dataguard_status view.
SELECT MESSAGE FROM V$DATAGUARD_STATUS;
9) How can u recover standby which far behind from primary or
without archive logs how can we make standby sync?
By using RMAN incremental backup.
10) What are new features in 11g Data Guard?
Here is some data guard category and there enhancement
1) Data Protection
Advanced Compression
Lost-write protection
Fast-Start Failover
2) Increase ROI
Active Data Guard
Snapshot Standby
3) High Availability
Faster Redo Apply
Faster failover &
switchover
Automatic Failover using ASYNC
4) Manageability
Mixed Windows/Linux
11) What are the uses of standby redo log files
A standby redo log is required for the maximum protection and
maximum availability modes and the LGWR ASYNC transport mode is recommended for
all databases.
You should plan the standby redo log configuration and create all required log groups and group members when you create the standby database. For increased availability, consider multiplexing the standby redo log files, similar to the way that online redo log files are multiplexed.
If the real-time apply feature is enabled, log apply services can apply redo data as it is received, without waiting for the current standby redo log file to be archived. This results in faster switchover and failover times because the standby redo log files have been applied already to the standby database by the time the failover or switchover begins
12) What is dg_config ?
Specify the DG_CONFIG attribute to identify the DB_UNIQUE_NAME for the primary database and each standby database in the Data Guard configuration. The default value of this parameter enables the primary database to send redo data to remote destinations and enables standby databases to receive redo data. The
DG_CONFIG attribute must be set to enable the dynamic addition of a standby database to a Data Guard configuration that has a Real Application Clusters primary database running in either maximum protection or maximum availability mode.
13) What is RTA (real time apply) mode MRP?
Real-time apply where before log shipping the LGWR process
writes to a standbylog file simultaneously along with the online redolog file.
This standby logfile is
written to standby log file on standby server. There is no loss of any
committed transaction whatsoever in Real-Time Apply scenario.
•In Real Time Apply, once a transaction is committed on the
Primary, the committed changes will be available on the Standby in Real Time
even without switching the log at the Primary
MRP - Managed recovery process - For Data Guard, the
background process that applies archived redo log to the standby database.
14) What is the difference between normal MRP (managed
apply) and RTA MRP (real time apply)?
The difference between Redo Apply & Real-Time Apply
------------------------------------------------------
Normally, by default, Archiver
processes will be responsible for Redo Transport from Primary to Standby.
Once a log switch happens on the Primary, the online redo log
is archived in the Local Archive destination as pointed to by
Log_archive_dest_1
by an Archiver process.
Another Archiver process will
then transmit the redo to the remote standby destination as indicated by
Log_archive_dest_2.
Data Guard Remote File Server
(RFS) Process on the Standby then writes redo data from the Standby redo log
file to archive redo log file.
Log apply services then makes
use of Managed Recovery Process (MRP) process to apply the redo to the standby
database.
This method of propagating
redo from the primary to standby is called Redo Apply and it happens only on
log switch at the Primary.
When using Redo Apply mode,
the status of MRP in v$managed_standby view will show as WAIT_FOR_LOG.
Real Time Apply, in contrast, uses either LGWR or Archiver on
the Primary to write redo data to Standby Redo log on the Standby and Log Apply
Services can apply the redo data in real-time without the need of the current
standby redo log being archived. Once a transaction is committed on the
Primary, the committed changes will be available on the Standby in Real Time
even without switching the log.
When using Real Time Apply mode, the status of MRP in
v$managed_standby view will show as APPLYING_LOG.
15) What is the difference between SYNC/ASYNC, LGWR/ARCH, and
AFFIRM/NOAFFIRM ?
Specifies that network I/O is to be done synchronously (SYNC)
or asynchronously (ASYNC) when archival is performed using the log writer
process (LGWR).
Specifies whether redo transport services use archiver
processes (ARCn) or the log writer process (LGWR) to collect transaction redo
data and transmit it to standby destinations. If neither the ARCH or LGWR
attributes are specified, the default is ARCH.
Controls whether redo transport services use synchronous or
asynchronous I/O to write redo data to disk
AFFIRM—specifies that all disk I/O to archived redo log files
and standby redo log files is performed synchronously and completes
successfully before the log writer process continues.
NOAFFIRM—specifies that all disk I/O to archived redo log
files and standby redo log files is performed asynchronously; the log writer
process on the primary database does not wait until the disk I/O completes
before continuing.
16) What is Static ConnectIdentifier property used for?
11gr2 new database property, StaticConnectIdentifier, which
allows the user to specify a static connect identifier that the DGMGRL client
will use to start database instances.
17) What is failover/switchover (or) what is the difference
between failover & switchover
Switchover – This is done when both primary and standby
databases are available.
Failover – This is done when
the primary database is NO longer available (i.e in a Disaster).
18) What are the background processes involved in Data Guard?
MRP, LSP,