25+ Oracle Data Guard Interview Questions [ 95% SUCCESS ] | 2020
Oracle Data Guard Interview Questions and Answers

25+ Oracle Data Guard Interview Questions [ 95% SUCCESS ]

Last updated on 04th Jul 2020, Blog, Interview Questions

About author

Krishnan (Sr Technical Manager )

(5.0) | 16212 Ratings 15294

 These oracle Data Guard Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of oracle Data Guard. As per my experience,  interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer.we are going to cover top 100 Oracle Data Guard Interview questions along with their detailed answers. We will be covering oracle Data guard scenario-based interview questions, oracle Data guard interview questions for freshers as well as oracle Data guard interview questions and answers for experienced.

Q1. What is meant by Data Guard?

Ans:

The software which Oracle Corporation markets as Oracle Data Guard forms an extension to the Oracle relational database management system (RDBMS). It aids in establishing and maintaining secondary standby databases as alternative/supplementary repositories to production primary databases.  provides both graphical user interface (GUI) and command-line (CLI) tools for managing Data Guard configurations.Data Guard supports both physical standby and logical standby sites. Oracle Corporation makes Data Guard available only as a bundled feature included within its “Enterprise Edition” of the Oracle RDBMS.With appropriately set-up Data Guard operations, DBAs can facilitate failovers or switchovers to alternative hosts in the same or alternative locations.

Q2. What are the types of Oracle Data Guard?

Ans:

Oracle Data Guard classified into two types based onthe way of creation and method used for Redo Apply. They are as follows.

  • Physical standby(Redo Apply technology)
  • Logical standby(SQL Apply Technology)
  • Snapshot standby(not applied until the snapshot standby is Converted)

Q3. What is the use of standby redo log?

Ans:

The Advantage of having Standby Redo Logs is that every records written into the Online RedoLogs of the Primary Database is transferred to the Standby database and written into the Standby Redo Logs at the same time.Therefore, you it minimizes the probability of Data Loss on the Standby Database.For real time apply, it is mandatory to have redolog.Without Standby Redo Logs, an Archived Redo Log is created by the RFS process and when it has completed,this Archived Redo Log is applied to the Standby Database by the MRP process . An incomplete ArchiveLog file cannot be applied on the Standby Database and will not be used in a Failover situation. This causes a certain data loss.If you have Standby Redo Logs, the RFS process will write into the Standby Redo Log ,when their record entered in online redo log and when a log switch occurs, the Archiver Process of the Standby Database will archive this Standby Redo Log to an Archived Redo Log, while the MRP process applies the information to the Standby Database. In a Failover situation, you will also have access to the information already written in the Standby Redo Logs, so the information will not be lost.

Q4. What are the advantages in using Oracle Data Guard?

Ans:

Following are the different benefits in using Oracle Data Guard feature in your environment:

  • High Availability.
  • Data Protection.
  • Off loading Backup operation to standby database.
  • Automatic Gap detection and Resolution in standby database.
  • Automatic Role Transition using Data Guard Broker.

Q5. What is active dataguard. Does it needs additional licensing?

Ans:

Active dataguard means, the standby database is open with read only mode;when redo logs are getting applied in real time.Below are the benefit of using active dataguard:

  • Reporting queries can be offloaded to standby database.
  • Physical block corruptions are repaired automatically either at primary or physical standby database.
  • RMAN backups can be initiated from standby , instead  of primary which will reduce cpu load from primary.

Q6. What are the different services available in Oracle Data Guard?

Ans:

Following are the different Services available in Oracle Data Guard of Oracle database:

  • Redo Transport Services.
  • Log Apply Services.
  • Role Transitions.
  • Redo Transport Services
  • Control the automated transfer of redo data from the production database to one or more archival destinations.
  • Apply Services
  • Apply redo data on the standby database to maintain transactional synchronization with the primary database. Redo data can be applied either from archived redo log files, or, if real-time apply is enabled, directly from the standby redo log files as they are being filled, without requiring the redo data to be archived first at the standby database.
  • Role Transitions:Change the role of a database from a standby database to a primary database, or from a primary database to a standby database using either a switchover or a failover operation.

Q7. What are the different types of redo transport services in dataguard?

Ans:

SYNC and ASYNC.

  • SYNC(SYNCHRONOUS):

This mode is used for maximum protection and maximum availability protection mode. The synchronous redo transport mode transmits redo data synchronously with respect to transaction commitment. A transaction cannot commit until all redo generated by that transaction has been successfully sent to every standby destinations.

  • ASYNC(ASYNCHRONOUS):

This mode is used for maximum performance mode. A transaction can commit without waiting for the redo generated by that transaction to be successfully sent to any redo transport destination that uses the asynchronous redo transport mode.

Q8. What are the different Protection modes available in Oracle Data Guard?

Ans:

Following are the different protection modes available in Data Guard of Oracle database you can use any one based on your application requirement.

  • Maximum Protection
  • Maximum Availability
  • Maximum Performance (Default Mode)

Q9. What are the new feature for DG in 11g?

Ans:

  • Active database duplicate
  • snapshot stand by
  • Active data guard
  • Redo compression
  • 32 standby database  configuration support (earlier only 9)
  • FAL_CLIENT not require

Q10. How to check what protection mode of primary database in your Oracle Data Guard?

Ans:

By using following query you can check protection mode of primary database in your Oracle Data Guard setup:

SQL> select protection_mode from v$database;

PROTECTION_MODE

MAXIMUM PERFORMANCE

Q11. What is the difference between Real-time apply and redo apply?

Ans:

In real-time apply, LOG APPLY Service will not wait for the current SRL to archive.SO the redo data is apply AS SOON AS it receive from primary.But in normal apply mode : LOG APPLY service will wait for SRL to archive.

Q12. How to change protection mode in Oracle Data Guard setup?

Ans:

By using the following query your can change the protection mode in your primary database after setting up required value in corresponding LOG_ARCHIVE_DEST_n parameter in the primary database for thcorresponding standby database.

Q13. Which process is responsible for Redo log information  transmitting?

Ans:

LGWR or ARCH.

Q14. What are the advantages of using Physical standby database in Oracle Data Guard?

Ans:

Advantages of using Physical standby database in Oracle Data Guard are as follows:

  • High Availability.
  • Load balancing (Backup and Reporting).
  • Data Protection.
  • Disaster Recovery.

Q15. Which parameter user for GAP Resolution?

Ans:

FAL_SERVER and FAL_CLIENT

When MRP finds that an archive log is missing during media recovery, it sends the fal_client information to the server identified by fal_server and requests fal_server to resend the file again.  The fal_client and fal_server init.ora (spfile) parameters are set on the standby instance

Q16. What is physical standby database in Oracle Data Guard?

Ans:

Provides a physically identical copy of the primary database, with on disk database structures that are identical to the primary database on a block-for-block basis. The database schema, including indexes, are the same. A physical standby database is kept synchronized with the primary database, through Redo Apply, which recovers the redo data received from the primary database and applies the redo to the physical standby database.As of Oracle Database 11g release 1 (11.1), a physical standby database can receive and apply redo while it is open for read-only access. A physical standby database can therefore be used concurrently for data protection and reporting.

Q17. What is difference between Physical stand by and snapshot standby?

Ans:

Snapshot stdb will receive redo but not apply .Normal standby will receive and apply redo.

Q18. What is Logical standby database in Oracle Data Guard?

Ans:

Contains the same logical information as the production database, although the physical organization and structure of the data can be different. The logical standby database is kept synchronized with the primary database through SQL Apply, which transforms the data in the redo received from the primary database into SQL statements and then executes the SQL statements on the standby database.

A logical standby database can be used for other business purposes in addition to disaster recovery requirements. This allows users to access a logical standby database for queries and reporting purposes at any time. Also, using a logical standby database, you can upgrade Oracle Database software and patch sets with almost no downtime. Thus, a logical standby database can be used concurrently for data protection, reporting, and database upgrades.

Q19. What is active dataguard  duplicate?

Ans:

Starting from 11g we can duplicate database by two way:

  • Active DB duplicate.
  • Backup-based duplicate.

Active DB duplicate copies the live TARGET DB over the network to the AUXILLARY destination and then create the duplicate database.In an active duplication process, target database online image copies and archived redo log files were copied through the auxiliary instance service name. So there is no need of target db backup.

Q20. What is Snapshot standby database in Oracle Data Guard?

Ans:

A snapshot standby database is a fully updatable standby database. Like a physical or logical standby database, a snapshot standby database receives and archives redo data from a primary database. Unlike a physical or logical standby database, a snapshot standby database does not apply the redo data that it receives. The redo data received by a snapshot standby database is not applied until the snapshot standby is converted back into a physical standby database, after first discarding any local updates made to the snapshot standby database.

A snapshot standby database is best used in scenarios that require a temporary, updatable snapshot of a physical standby database. Note that because redo data received by a snapshot standby database is not applied until it is converted back into a physical standby, the time needed to recover from a primary database failure is directly proportional to the amount of redo data that needs to be applied.

    Subscribe For Free Demo

    Q21.What are the advantages of Logical standby database in Oracle Data Guard?

    Ans:

    • Better usage of resource
    • Data Protection
    • High Availability
    • Disaster Recovery

    Q22.What is the usage of DB_FILE_NAME_CONVERT parameter in Oracle Data Guard setup?

    Ans:

    DB_FILE_NAME_CONVERT parameter is used in Oracle Data Guard setup that to in standby databases. DB_FILE_NAME_CONVERT parameter are used to update the location of data files in standby database. These parameter are used when you are using different directory structure in standby database compare to primary database data files location.

    Q23.What is the usage of LOG_FILE_NAME_CONVERT parameter in Oracle Data Guard setup?

    Ans:

    LOG_FILE_NAME_CONVERT parameter is used in Oracle Data Guard setup that to in standby databases. LOG_FILE_NAME_CONVERT parameter are used to update the location of redo log files in standby database. These parameter are used when you are using different directory structure in standby database compare to primary database redo log file location.

    Q24.  What are the Step for Physical  Standby?

    Ans:

    These are the steps to follow:

    • Enable forced logging
    • Create a password file
    • Configure a standby redo log
    • Enable archiving
    • Set up the primary database initialization parameters
    • Configure the listener and tnsnames to support the database on both nodes
    • col name format a20
    • col thread# format 999
    • col sequence# format 999
    • col first_change# format 999999
    • col next_change# format 999999
    • SELECT thread#, sequence# AS “SEQ#”, name, first_change# AS “FIRSTSCN”,
    • next_change# AS “NEXTSCN”,archived, deleted,completion_time AS “TIME”
    • FROM   v$archived_log
    • V$ log_history

    Q25.Tell me about parameter which is used for standby database?

    Ans:

    • Log_Archive_Dest_n
    • Log_Archive_Dest_State_n
    • Log_Archive_Config
    • Log_File_Name_Convert
    • Standby_File_Managment
    • DB_File_Name_Convert
    • DB_Unique_Name
    • Control_Files
    • Fat_Client
    • Fat_Server

    The LOG_ARCHIVE_CONFIG parameter enables or disables the sending of redo streams to the standby sites. The DB_UNIQUE_NAME of the primary database is dg1 and the DB_UNIQUE_NAME of the standby database is dg2. The primary database is configured to ship redo log stream to the standby database. In this example, the standby database service is dg2.

    Next, STANDBY_FILE_MANAGEMENT is set to AUTO so that when Oracle files are added or dropped from the primary database, these changes are made to the standby databases automatically. The STANDBY_FILE_MANAGEMENT is only applicable to the physical standby databases.

    Setting the STANDBY_FILE_MANAGEMENT parameter to AUTO is is recommended when using Oracle Managed Files (OMF) on the primary database. Next, the primary database must be running in ARCHIVELOG mode

    Q26.What are the uses of Oracle Data Guard?

    Ans:

    • Oracle Data Guard ensures high availability, data protection, and disaster recovery for enterprise data.
    • Data Guard provides a comprehensive set of services that create, maintain, manage, and monitor one or more standby databases to enable production Oracle databases to survive disasters and data corruptions.
    • With Data Guard, administrators can optionally improve production database performance by offloading resource-intensive backup and reporting operations to standby systems.

    Q27. What is Redo Transport Services?

    Ans:

    It control the automated transfer of redo data from the production database to one or more archival destinations.

    Q28. What is apply services?

    Ans:

    Apply redo data on the standby database to maintain transactional synchronization with the primary database. Redo data can be applied either from archived redo log files, or, if real-time apply is enabled, directly from the standby redo log files as they are being filled, without requiring the redo data to be archived first at the standby database. It also allows read-only access to the data.

    Q29. What is Data Guard Broker?

    Ans:

    Data guard Broker manage primary and standby databases using the SQL command-line interfaces or the Data Guard broker interfaces, including a command-line interface (DGMGRL) and a graphical user interface that is integrated in Oracle Enterprise Manager.

    Q30. What actions can be performed by Data Guard Broker?

    Ans:

    • Create and enable Data Guard configurations, including setting up redo transport services and apply services
    • Manage an entire Data Guard configuration from any system in the configuration
    • Manage and monitor Data Guard configurations that contain Oracle RAC primary or standby databases
    • Simplify switchovers and failovers by allowing you to invoke them using either a single key click in Oracle Enterprise Manager or a single command in the DGMGRL command-line interface.
    • Enable fast-start failover to fail over automatically when the primary database becomes unavailable. When fast-start failover is enabled, the Data Guard broker determines if a failover is necessary and initiates the failover to the specified target standby database automatically, with no need for DBA intervention.
    Course Curriculum

    Enhance Your Career with Oracle Data Guard Training from Real Time Experts

    • Instructor-led Sessions
    • Real-life Case Studies
    • Assignments
    Explore Curriculum

    Q31. What are the Data guard Protection modes and summarize each?

    Ans:

    • 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.

    • 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.

    Q32. 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;

    Q33.  In Oracle 11g, what command in RMAN can you use to create the standby database while the target database is active?

    Ans:

    Oracle 11g has made it extremely simple to set up a standby database environment because Recovery Manager (RMAN) now supports the ability to clone the existing primary database directly to the intended standby database site over the network via the DUPLICATE DATABASE command set while the target database is active.  RMAN automatically generates a conversion script in memory on the primary site and uses that script to manage the cloning operation on the standby site with virtually no DBA intervention required.   You can execute this in a run block in RMAN:duplicate target database for standby dorecover from active database;

    Q34.  What additional standby database mode does Oracle 11g offer?

    Ans:

    Oracle 11g 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 convert it back to the physical standby database. This is suitable for test and development environments and also maintains protection by continuing to receive data from the production database and archiving it for later use.

    Q35. In Oracle 11g how can speed up backups on the standby database?

    Ans:

    In Oracle 11g, block change tracking is now supported in the standby database.

    Q36.  With the availability of Active Data Guard, what role does SQL Apply (logical standby) continue to play?

    Ans:

    Use SQL Apply for the following requirements: (a) when you require read-write access to a synchronized 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 indexes to optimize read performance.  The ability to handle local writes makes SQL Apply better suited to packaged reporting applications that often require write access to local tables that exist only at the target database. SQL Apply also provides rolling upgrade capability for patchsets and major database releases.  This rolling upgrade functionality can also be used by physical standby databases beginning with Oracle 11g using Transient Logical Standby.

    Q37.  Why would I use Active Data Guard and not simply use SQL Apply (logical standby) that is included with Data Guard 11g?

    Ans:

    If read-only access satisfies the requirement – Active Data Guard is a closer fit for the requirement, and therefore is much easier to implement than any other approach.  Active Data Guard supports all datatypes and is very simple to implement. An Active Data Guard replica can also easily support additional uses – offloading backups from the primary database, serve as an open read-write test system during off-peak hours (Snapshot Standby), and provide an exact copy of the production database for disaster recovery – fully utilizing standby servers, storage and software while in standby role.

    Q38.  Why do I need the Oracle 11g Active Data Guard Option?

    Ans:

    Previous capabilities did not allow Redo Apply to be active while a physical standby database was open read-only, and did not enable RMAN block change tracking on the standby database.  This resulted in (a) read-only access to data that was frozen as of the time that the standby database was opened read-only, (b) failover and switchover operations that could take longer to complete due to the backlog of redo data that would need to be applied, and (c) incremental backups that could take up to 20x longer to complete – even on a database with a moderate rate of change. Previous capabilities are still included with Oracle Data Guard 11g, no additional license is required to use previous capabilities.

    Q39.  If you wanted to upgrade your current 10g physical standby data guard configuration to 11g, can you upgrade the standby to 11g first then upgrade the primary ?

    Ans:

    Yes, in Oracle 11g, you can temporarily convert the physical standby database to a logical standby database to perform a rolling upgrade.  When you issue the convert command you need to keep the identity:alter database recover logical standby keep identity;

    Q40.  If you have a low-bandwidth WAN network, what can you do to improve the Oracle 11g data guard configuration in a GAP detected situation?

    Ans:

    Oracle 11g introduces the capability to compress redo log data as it transports over the network to the standby database.  It can be enabled using the compression parameter.  Compression becomes enabled only when a gap exists and the standby database needs to catch up to the primary database.

    alter system set log_archive_dest_1=’SERVICE=DBA11GDR COMPRESSION=ENABLE’;

    Q41.  In an Oracle 11g Logical Standby Data Guard configuration, how can you tell the dbms_scheduler to only run jobs in primary database?

    Ans:

    Oracle 11g, logical standby now provides support for DBMS_SCHEDULER.  It is capable of running jobs in both primary and logical standby database.  You can use  the DBMS_SCHEDULER.SET_ATTRIBUTE procedure to set the database_role.  You can specify that the jobs can run only when operating in that particular database role.

    Q42.  How can you control when an archive log can be deleted in the standby database in oracle 11g ?

    Ans:

    In Oracle 11g, you can control it by using the log_auto_delete initialization parameter.  The log_auto_delete parameter must be coupled with the log_auto_del_retention_target parameter to specify the number of minutes an archivelog is maintained until it is purged. Default is 24 hours.  For archivelog retention to be effective, the log_auto_delete parameter must be set to true.

    Q43.  Can Oracle Data Guard be used with Standard Edition of Oracle ?

    Ans:

    Yes and No.   The automated features of Data Guard are not available in the standard edition of Oracle.   You can still however, perform log shipping manually and write scripts to manually perform the steps.    If you are on unix platform, you can write shell scripts that identify the logs and then use the scp or sftp command to ship it to the standby server.  Then on the standby server, identify which logs have not been applied and apply/recover them maually and remove them once applied.

    Q44. What is the difference between Active Dataguard, and the Logical Standby implementation of 10g dataguard?

    Ans:

    Active dataguard is mostly about the physical standby.

    Use physical standby for testing without compromising protection of the production system. You can open the physical standby read/write – do some destructive things in it (drop tables, change data, whatever – run a test – perhaps with real application testing). While this is happening, redo is still streaming from production, if production fails – you are covered. Use physical standby for reporting while in managed recovery mode. Since physical standby supports all of the datatypes – and logical standby does not (11g added broader support, but not 100%) – there are times when logical standby isn’t sufficient. It also permits fast incremental backups when offloading backups to a physical standby database.

    Q45. Can Oracle’s Data Guard be used on Standard Edition, and if so how? How can you test that the standby database is in sync?

    Ans:

    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*. Roughly, put your production database in archivelog mode. Create a hotbackup of the database and move it to the standby machine. Then create a standby controlfile on the production machine, and ship that file, along with all the archived redolog files to the standby server. Once you have all these files assembled, place them in their proper locations, recover the standby database, and you’re ready to roll. From this point on, you must manually ship, and manually apply those archived redologs to stay in sync with production.

    To test your standby database, make a change to a table on the production server, and commit the change. Then manually switch a logfile so those changes are archived. Manually ship the newest archived redolog file, and manually apply it on the standby database. Then open your standby database in read-only mode, and select from your changed table to verify those changes are available. Once you’re done, shutdown your standby and startup again in standby mode.

    Q46.What is data guard in simple language?

    Ans:

    Your primary database is running and you want to reduce downtime because of unplanned outages. You create a replica of this primary database (termed as standby database).

    You regularly ship redo generated in the primary database to standby database and apply it there. So that is our ‘Data Guard’ standby database and it is in a continuous state of recovery, validating and applying redo to remain in sync with the primary database.

    Q47.Your standby database was out of reach because of network issue. How will you synchronize it with primary database again?

    Ans:

    Data Guard automatically resynchronizes the standby following network or standby outages using redo data that has been archived at the primary.

    Q48.What is Redo Transport Services (RTS)?

    Ans:

    This process takes care of the transmission of redo from a primary database to the standby database.

    Q49. how Redo Transport Services (RTS) works?

    Ans:

    • Log Network Server (LNS) reads redo information from the redo buffer in SGA of PRIMARY Database
    • Log Network Server (LNS) passes redo to Oracle Net Services for transmission to the STANDBY database
    • Remote File Server (RFS) records the redo information transmitted by the LNS at the STANDBY database
    • Remote File Server (RFS) writes it to a sequential file called a standby redo log file (SRL) at the STANDBY database

    Q50.Synchronous transport (SYNC) how it works?

    Ans:

    • Log Network Server (LNS) reads redo information from the redo buffer in SGA of PRIMARY Database
    • Log Network Server (LNS) passes redo to Oracle Net Services for transmission to the STANDBY database
    • Remote File Server (RFS) records the redo information transmitted by the LNS at the STANDBY database
    • Remote File Server (RFS) writes it to a sequential file called a standby redo log file (SRL) at the STANDBY database
    • Remote File Server (RFS) transmits an acknowledgement back to the LNS process on the primary database
    • Log Network Server (LNS) notifies the LGWR that transmission is complete on the primary database.
    • Log Writer (LGWR) acknowledges the commit to the user.
    Course Curriculum

    Enroll in Oracle Data Guard Course & Get Noticed By Top Hiring Companies

    Weekday / Weekend BatchesSee Batch Details

    Q51.Asynchronous transport (ASYNC)  how it works?

    Ans:

    • Log Network Server (LNS) reads redo information from the redo buffer in SGA of PRIMARY Database
    • Log Network Server (LNS) passes redo to Oracle Net Services for transmission to the STANDBY database
    • Remote File Server (RFS) records the redo information transmitted by the LNS at the STANDBY database
    • Remote File Server (RFS) writes it to a sequential file called a standby redo log file (SRL) at the STANDBY database

    Q52.How Synchronous transport (SYNC) can impact the primary database performance?

    Ans:

    SYNC guarantees protection for every transaction that the database acknowledges as having been committed but at the same time LGWR must wait for confirmation that data is protected at the standby before it can proceed with the next transaction. It can impact primary database performance and it depends on factors like:

    • the amount of redo information to be written
    • available network bandwidth
    • round-trip network latency (RTT)
    • standby I/O performance writing to the SRL.
    • distance betweeen primary and standby databases as network RTT increases with distance.

    Q53.What is Data Guard’s Automatic Gap Resolution?

    Ans:

    Your database is using ASYNC transport method and the instance load is at the peak. The LNS is unable to keep pace and the log buffer is recycled before the redo can be transmitted to the standby, the LNS automatically transitions to reading and sending from the Online Redo logs. Once the LNS is caught up, it automatically transitions back to reading & sending directly from the log buffer.

    Q54.What is the difference between Physical standby and Logical standby database?

    Ans:

    Data Guard Apply process in standby database can apply redo information directly and in that case it will be called physical standby.

    • Physical Standby:In this case standby database is an exact, block-by-block, physical replica of the primary database.The change vectors received by RFS process are directly applied to the standby database by using media recovery.so here the apply process read data blocks, assemble redo changes from mappings, and then apply redo changes to data blocks directly.Physical Standby is the best choice for disaster recovery (DR) based upon their simplicity, transparency, high performance, and good data protection.
    • Logical Standby:In this case standby database uses SQL Apply method to “mine” the redo by converting it to logical change records, and then building SQLtransactions and applying SQL to the standby database.As this process of replaying the workload is more complex than the Physical Standby’s process, so it requires more memory, CPU, and I/O.One good advantage here is that a logical standby database can be opened read-write while SQL Apply is active which means you can update (create/insert/delete etc) local tables and schemas in the logical standby database.

    Q55.How is Data Guard Apply process works if primary and secondary database involves Oracle RAC?

    Ans:

    • If Primary database is RAC but standby is Non-RAC:Each primary Oracle RAC instance ships its own thread of redo that is merged by the Data Guard apply process at the standby and applied in SCN order to the standby database.
    • If both Primary and standby databases are RAC:If the standby is also an Oracle RAC database, only one instance (the apply instance) will merge and apply changes to the standby database. If the apply instance fail for any reason, the apply process will automatically failover to a surviving instance in the Oracle RAC standby database when using the Data Guard broker.

    Q56.What is Active Data Guard Option (Oracle Database 11g Enterprise Edition)?

    Ans:

    For physical standby database, prior to 11g, the database would have to be in the mount state when media recovery was active which means you were not able to query the standby database during media recovery stage as there was no read-consistent view.

    Active Data Guard 11g features solves the read consistency problem by use of a “query” SCN. The media recovery process on the standby database will advance the query SCN after all the changes in a transaction have been applied . The query SCN will appear to user as the CURRENT_SCN column in the V$DATABASE view on the standby database. So Read-only users will only be able to see data up to the query SCN, and hence guaranteeing the same read consistency as the primary database.

    This enables a physical standby database to be open as read-only while media recovery is active, making it useful for doing read-only workloads.Also, if you need read-write access to the standby database, you can use SQL Apply method of dataguard.

    Q57.What are the important database parameters related to Data Guard corruption prevention?

    Ans:

    On the primary database:

    • DB_ULTRA_SAFE

    Values can be DATA_AND_INDEX or DATA_ONLY. Setting DB_ULTRA_SAFE at the primary will also automatically set DB_ LOST_WRITE_PROTECT=TYPICAL on the primary database.

    In Oracle Database 11g Release 2 (11.2), the primary database automatically attempts to repair the corrupted block in real time by fetching a good version of the same block from a physical standby database.

    On the standby database:

    • DB_BLOCK_CHECKSUM=FULL

    DB_BLOCK_CHECKSUM detects redo and data block corruptions and detect corruptions on the primary database and protect the standby database. This parameter requires minimal CPU resources.

    • DB_LOST_WRITE_PROTECT=TYPICAL

    A lost write can occur when an I/O subsystem acknowledges the completion of a write, while in fact the write did not occur in persistent storage.

    This will create a stale version of the data block. When the DB_LOST_WRITE_PROTECT initialization parameter is set, the database records buffer cache block reads in the redo log, and this information is used to detect lost writes.

    Q58.What are different Data Guard protection modes?

    Ans:

    Data Guard protection modes implement rules that controls how the configuration will respond to failures, enabling you to achieve specific objectives for data protection, availability, and performance.

    • Maximum Performance

    – emphasis is on primary database performance over data protection.

    – requires ASYNC (the default method) redo transport so that the LGWR process never waits for acknowledgment from the standby database.

    – network connection between primary and standby OR the availability of the standby database DO NOT IMPACT the primary database performance.

    • Maximum Availability

    – first emphasis is on availability and second priority is zero data loss protection.

    – requires SYNC redo transport so primary database performance may be impacted in waiting for acknowledgment from the standby (it doesn’t mean indefinite wait in case standby database fails, maximum wait will be equal to parameter NET_TIMEOUT seconds).

    • Maximum Protection

    – utmost priority is on data protection.

    – also requires SYNC redo transport.

    – unlike ‘Maximum Availability’ it does not consider the NET_TIMEOUT parameter, which means If the primary does not receive acknowledgment from a SYNC standby database, it will stall primary and eventually abort it, preventing any unprotected commits from occurring.

    – highly recommended to use a minimum of two SYNC standby databases at different locations if using ‘Maximum Protection’ to have high availability of primary database.

    Q59.What is Switchover event?

    Ans:

    Switchover is useful for minimizing downtime during planned maintenance. It is a planned event in which Data Guard reverses the roles of the primary and a standby database.

    Q60. What are the operations happens when switchover command is executed?

    Ans:

    • primary database is notified that a switchover is about to occur.
    • all users are disconnected from the primary.
    • a special redo record is generated that signals the End Of Redo (EOR).
    • primary database is converted into a standby database.
    • the final EOR record is applied to standby database, this guarantees that no data has been lost, and it converts the standby to the primary role.

     Q61.What is Failover event?

    Ans:

    The Failover process is similar to switchover event except that the primary database never has the chance to write an EOR record as this is an unplanned event.

    Q62. What are the different types ofFailover event ?

    Ans:

    • Manual:Administrator have complete control of primary-standby role transitions. It can lengthen the outage by the amount of time required for the administrator to be notified and manual execution of command.
    • Automatic:It uses Data Guard’s Fast-Start Failover feature which automatically detects the failure, evaluates the status of the Data Guard configuration, and, if appropriate, executes the failover to a previously chosen standby database.

    Q63.Which tools can be used for Data Guard Management?

    Ans:

    • SQL*Plus – traditional method, can prove most tedious to use
    • Data Guard broker – automates and centralizes the creation, maintenance, and monitoring of a Data Guard configuration. Simplifies and automates many administrative tasks. It has its own command line (DGMGRL) and syntax.
    • Enterprise Manager – requires that the Data Guard broker be enabled. a GUI to the Data Guard broker, replacing the DGMGRL command line and interfacing directly with the broker’s monitor processes.

    Q64.What is Data Guard 11g snapshot standby?

    Ans:

    With 11g, you can thoroughly test your changes on a true replica of your production system and database using actual production workload.

    Data Guard 11g physical standby can now be converted to a snapshot standby, independent of the primary database, that is open read-write and able to be used for preproduction testing. It uses Flashback Database and sets a guaranteed restore point (GRP) at the SCN before the standby was open read-write.

    Q65.What is the difference between Recovery Point Objective(RPO) and Recovery Time Objective (RTO)?

    Ans:

    • Recovery Point Objective(RPO)

    RPO concerns with data. It is the amount of data you are willing to lose when the failure occurs in your database system. Usually people define data loss in terms of time, so possible values can be 5 seconds of data loss, 2 hours of data loss etc.Remember that each standby database has its own set of attributes and parameters. It means you can mix zero data loss standby databases with minimal data loss standbydatabases in the same Data Guard configuration

    • Recovery Time Objective (RTO)

    RTO is defined as how fast you can get back up and running (whereas RPO is concerned with data loss).So with your RPO strategy you lost say only about 6 seconds of data as you committed to your client but with RTO you need to formulate how fast clients can connect back to the database system after the data loss has occurred.

    Q66.What are Standby Redo Log (SRL) files?

    Ans:

    The SRL files are where the Remote File Server (RFS) process at your standby database writes the incoming redo so that it is persistent on disk for recovery. SRL files are important for better redo transport performance and data protection.SRL are MUST in Maximum Availability or Maximum Protection mode and OPTIONAL (but recommended) in Maximum Performance mode.If there are no Standby Redo Log (SRL) files, then at each log switch in the primary database, the RFS process on the standby database that is serving an asynchronous standby destination has to create an archive log of the right size. While the RFS is busy doing creating the archive log file, the LNS process at the primary database has to wait, getting further and further behind the LGWR (in case of Maximum Performance mode). That is why it recommended to have Standby Redo Log (SRL) files in Maximum Performance mode also.

    Q67.What is Fast Start Fail Over (FSFO)?

    Ans:

    Main criticism of Oracle standby databases has always been that too much manual interaction is required in case of disaster situation. FSFO helps in filling up this requirement. FSFO quickly and reliably fails over the target standby database to the primary database role, without requiring you to perform any manual steps to invoke the failover.  Please keep in mind that you need to have Broker configuration done to be able to use FSFO feature.

    Q68.What is the concept of OBSERVER in Fast Start Fail Over ( FSFO)?

    Ans:

    In normal scenario, If you have to perform a switch over activity in your standby setup you keep some kind of monitor/observation on your setup so that you are aware that when your primary database is not available and you need to switch over to standby database. Oracle helped in getting this manual observation activity by providing an OBSERVER process which constantly monitors the availability of the Primary database. Now, if we run OBSERVER on the primary or secondary database server itself then their is risk that the OBSERVER itself will get down when that server is down because of disaster. That is why observer is a separate OCI client-side component that runs on a different computer from the primary and standby databases.

    So Once the observer is started, no further user interaction is required. If both the observer and designated standby database lose connectivity with the primary database for longer than the number of seconds specified by the FastStartFailoverThreshold configuration property, the observer will initiate a fast-start failover to the standby database.

    Q69.What are the high level steps for configuring Fast Start Fail Over (FSFO)?

    Ans:

    To configure FSFO in your Standby setup, broad level steps will be:

    STEP 1: Determine Which of the Available Standby Databases is the Best Target for the Failover. Means you want to choose physical over logical etc.

    STEP 2: Specify the Target Standby Database with the FastStartFailoverTarget Configuration Property. This may not be required if you have only one standby database in configuration.

    STEP 3: Determine the Protection Mode You Want . You will have to choose from either maximum performance or maximum availability. This is more of business decision and you will have to take consensus from all stakeholders on which mode will prove right for you.

    STEP 4: Set the FastStartFailoverThreshold Configuration Property. This parameter tells how long (in seconds) OBSERVER process should wait before starting failover

    STEP 5: Set Other Properties Related to Fast-Start Failover (Optional). There are some other parameters like FastStartFailoverAutoReinstate,  ObserverOverride etc which can also be applicable to meet your specific requirements.

    STEP 6: Enable Additional Fast-Start Failover Conditions (Optional). This step can give you some more options to define when you primary database is unusable example: stuck archiver, corrupt control file etc.

    STEP 7: Enable FSFO Using DGMGRL or Cloud Control. This is the main step in which you will enable to FSFO.

    STEP 8: Start the Observer. You can use Cloud Control or DGMGRL to start the observer process.

    STEP 9: Verify the Fast-Start Failover Environment. DGMGRL command “SHOW FAST_START FAILOVER” can show you easily the status of FSFO.

    Q70. What is Maximum protection mode in dataguard?

    Ans:

    MAXIMUM PROTECTION

    This mode provides maximum protection. It guarantees zero data loss. In this mode the redo/transaction data must be written to both primary redo log and standby redo log. For any reason(mostly N/W issue) if it is unable to write to standby, Then primarya will get shutdown.

    Explore Python Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download
    Oracle Data Guard Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

    Q71. What is snapshot standby database.

    Ans:

    Snapshot standby is a feature in Oracle 11g that allows doing a read-write operation on the standby database i.e we can convert the physical standby database to snapshot standby for testing purpose.  On that, we can do all types of testing (BOTH READ/WRITE) or can be used as a development database (which is an exact replication of production ). Once the testing is over we can again convert the snapshot database to physical standby. Once it is converted physical standby database, whatever changes were done to the snapshot standby will be reverted.

    Q72. What is the difference between switchover and failover:

    Ans:

    A switchover means just switching roles between the primary database and standby db.

    nswitchover, the primary database chnaged to a standby role, and the standby database changed to the primary role.This is typically done for planned maintenance of the primary db server.A failover is when the primary database fails and one of the standby databases is transitioned to take over the primary role. Failover is performed only in the event of a catastrophic failure of the primary database, and there is no possibility of recovering the primary database in a timely manner. Failover may or may not result in data loss depending on the protection mode in effect at the time of the failover.

    Q73. What is the process to apply a psu patch in dataguard setup?

    Ans:

    • Make sure lag between primary and standby is zero.
    • Cancel the recovery (MRP) on standby.
    • Shutdown standby db and listener.
    • Apply patch to binary using opatch apply command.
    • Once patch applied to binary , startup the listener and standby in mount stage or OPEN(if active dataguard).
    • Now shutdown primary db and listener.
    • Apply patch to binary using opatch apply command.
    • Once patch applied to binary , startup the listener and prim db in mount OPEN(if active dataguard).
    • Start the MRP recovery process on standby .

    Q74. What is fal_client and fal_server parameter?

    Ans:

    FAL Means – Fetch Archive log. FAL_CLIENT and FAL_SERVER parameters are used on standby database for archive gap resolution.

    FAL_SERVER and FAL_CLIENT parameters are required on standby database only .

    FAL_SERVER: Specify an Oracle Net Service Name (TNS-Alias or Connect Descriptor) that points to the Database from where the missing ArchiveLog(s) should be requested i.e the tns alias of the primary db.

    FAL_CLIENT: Specify an Oracle Net Service Name (TNS-Alias or Connect Descriptor) that points  from FAL_SERVER TO standby db. i.e the tns alias of the standby db.

    fal_server = ‘primdb’

    fal_client = ‘stdbydb’

    Q75. What are different types of dataguard and their difference.

    Ans:

    There are two types of dataguard setups:PHYSICAL and LOGICAL.

    • PHYSICAL STANDBY:

    A physical standby database is an exact, block-for-block copy of a primary database. A physical standby ismaintained as an exact copy through a process called REDO APPLY, in which redo data received from aprimary database is continuously applied to a physical standby database using the database recovery mechanisms. So it will be always in sync with primary.

    This Standby database can be opened in read only mode( knows as ACTIVE DATA GUARD), for reporting purpose. Most of the corporations use physical standby for dataguardconfiguration.

    • LOGICAL STANDBY:

    The logical standby database is kept synchronized with the primary database through SQL APPLY, which transforms the data in the redo received  from the primary database into SQL statements and then executes the SQL statements on the standby database. So it contains same logical information as that of production , but physical structure of data can be different.

    Q76. What is MAXIMUM AVAILABILITY mode in dataguard?

    Ans:

    It provides the highest level of data protection that is possible without affecting the availability of the primary database.Transactions are not allowed to commit until all redo data are written to the online redo logs and propagated to at least one synchronized secondary database. If for any reason, the primary database cannot propagate its redo stream to one secondary database, the primary will NOT shutdown and operates as it it were in maximum performance mode until issues are fixed.

    Q77.  What is MAXIMUM PERFORMANCE mode in dataguard?

    Ans:

    This is the default protection mode. With this protection mode, a transaction is committed as soon as the redo data needed to recover the transaction is written to the local (online) redo log.

    Q78. Lets sa,y, few of archive logs are missing from primary db server, before it is shipped to standby. In this case, How you will resolve the gap and keep the standby in sync with that of primary?

    Ans:

    Recover the standby database by taking an incremental backup of primary db (using scn of standby db) . 

    Q79.The support DBA , added a tempfile on primary database, but the tempfile is not reflecting on standby database despite, the standby_file_management is set to AUTO.

    Ans:

    Adding tempfiles to TEMP tablespaces in primary database, will not automatically create on standby database. Because no redo is generated, while adding tempfile. So DBA have to add the temp file manually.

    Q80. 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.

    Q81. What are differences between physical, logical, snapshot standby and ADG (or) what are different types of standby databases?

    Ans:

    • Physical standby – in mount state, MRP will apply archives
    • ADG (Active Data Guard) – 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.

    Q82. How to find out backlog of standby?

    Ans:

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

    Q83. If you didn’t have access to the standby database and you want 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;

    Q84.. How can you recover standby which far behind from primary (or) without archive logs how can we make standby sync?

    Ans:

    By using RMAN incremental backup.

    Q85. 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 user do DMLs on snapshot standby, flashback to restore point, start MRP.

    From Oracle 11g, convert physical standby to snapshot standby, let user do DMLs on snapshot standby, convert to physical standby, start MRP.

    Q86. What are the uses of standby redo log files?

    Ans:

    A standby redo log resides on the standby database site. The standby redolog file is similar to an online redo log, except that a standby redo log is used to store redo data that has been received from a another/primary database.

    Q87. What is failover/switchover (or) what is the difference between failover and 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 (i.e. in a Disaster). It is not pre-planned.

    Q88. What are the background processes involved in Data Guard?

    Ans:

    RFS, MRP, LSP

    Q89.What are the services required on the primary and standby data-base?

    Ans:

    The services required on the primary database are:

    • Log Writer Process (LGWR): Collects redo information and updates the online redo logs. It can also create local archived redo logs and transmit online redo to standby databases.
    • Archiver Process (ARCn): One or more archiver processes make copies of online redo logs either locally or remotely for standby databases.
    • Fetch Archive Log (FAL) Server: Services requests for archive redo logs from FAL clients running on multiple standby databases. Multiple FAL servers can be run on a primary database, one for each FAL request.
    • Log network server (LNS): LNS is used on the primary to initiate a connection with the standby database.

    The services required on the standby database are:

    • Fetch Archive Log (FAL) Client: Pulls archived redo log files from the primary site. Initiates transfer of archived redo logs when it detects a gap sequence.
    • Remote File Server (RFS): Receives archived and/or standby redo logs from the primary database.
    • Archiver (ARCn) Processes: Archives the standby redo logs applied by the managed recovery process (MRP).
    • Managed Recovery Process (MRP): pplies archive redo log information to the standby database.
    • It controls the automated transfer of redo data from the production database to one or more archival destinations. The redo transport services perform the following tasks.

    Q90.How to delay the application of logs to a physical standby?

    Ans:

    A standby database automatically applies redo logs when they arrive from the primary database. But in some cases, we want to create a time lag between the archiving of a redo log at the primary site, and the application of the log at the standby site.

    Modify the Log_Archive_Dest_n initialization parameter on the primary database to set a delay for the standby database.

    Example: For 60min Delay:

    ALTER SYSTEM SET LOG_ARCHIVE_DEST_2=’SERVICE=stdby_srvc DELAY=60′;

    The DELAY attribute is expressed in minutes.

    The archived redo logs are still automatically copied from the primary site to the standby site, but the logs are not immediately applied to the standby database. The logs are applied when the specified time interval expires.

    Q91.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

    Q92.What is active data guard? Does it needs additional licensing?

    Ans:

    Active dataguard means, the standby database is open with read only mode, when redo logs are getting applied in real time.

    • Below are the benefit of using active dataguard:
    • Reporting queries can be offloaded to standby database.
    • Physical block corruptions are repaired automatically either at primary or physical standby database.
    • RMAN backups can be initiated from standby , instead of primary which will reduce cpu load from primary.

    Q93.What is active dataguard duplicate?

    Ans:

    Starting from 11g we can duplicate database by two way :

    • Active DB duplicate 
    • Backup-based duplicate.

    Active DB duplicate copies the live TARGET DB over the network to the AUXILLARY destination and  then create the duplicate database. In an active duplication process, target database online image  copies and archived redo log files were copied through the auxiliary instance service name. So there is  no need of target db backup.

    Are you looking training with Right Jobs?

    Contact Us
    Get Training Quote for Free