Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Oracle Data Guard Interview Questions

1)  How to setup Data Guard?

2) What are different types of modes in Data Guard and which is default?

ANS:

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)?

ANS:

Till Oracle 10g, 9 standby databases are supported.
From Oracle 11g R2, we can create 30 standby databases..

4) What are the parameters we’ve to set in primary/standby for Data Guard ?

ANS:

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 ?


ANS:

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 ADG (or) 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?

ANS:

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?

ANS:

By using RMAN incremental backup.


10) What is snapshot standby (or) How can we give a physical standby to user in READ WRITE mode and let him do updates and revert back to standby?

ANS:

Till Oralce 10g, create guaranteed restore point, open in read write, let him do updates, flashback to restore point, start MRP.

From Oracle 11g, convert physical standby to snapshot standby, let him do updates, convert to physical standby, start MRP.


11)  What are new features in 11g Data Guard?

ANS:
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

12) 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. Data Guard can recover and apply more redo data from a standby redo log than from archived redo log files alone.

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.

13) What is dg_config ?

ANS:

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.

14) What is RTA (real time apply) mode MRP? 

ANS:

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.

15)  What is the difference between normal MRP (managed apply) and RTA MRP (real time apply)?

ANS:
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.


16) What is the difference between SYNC/ASYNC, LGWR/ARCH, and AFFIRM/NOAFFIRM ?

ANS:

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.


17) What is StaticConnectIdentifier property used for?

ANS:
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.

18) What is failover/switchover (or) what is the difference between failover & switchover

ANS:
Switchover – This is done when both primary and standby databases are available. It is pre-planned.
Failover – This is done when the primary database is NO longer available (ie in a Disaster). It is not pre-planned.


29) What are the background processes involved in Data Guard?

ANS:
MRP, LSP,  

Comments

Popular posts from this blog

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

PostgreSQL Pgbadger Installation On Linux

PostgreSQL pgBadger

How to configure Replication Manager (repmgr) ?

Migrating From Oracle to PostgreSQL using ora2pg open source tools