{"id":5349,"date":"2026-01-31T19:17:21","date_gmt":"2026-01-31T13:47:21","guid":{"rendered":"https:\/\/w3buddy.com\/?p=5349"},"modified":"2026-01-31T19:19:42","modified_gmt":"2026-01-31T13:49:42","slug":"oracle-data-guard-interview-questions-complete-dba-guide","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/oracle-data-guard-interview-questions-complete-dba-guide\/","title":{"rendered":"Oracle Data Guard Interview Questions &#8211; Complete DBA Guide"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Quick Summary<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Oracle Data Guard<\/strong> is Oracle\u2019s <strong>disaster recovery (DR)<\/strong> and <strong>high availability (HA)<\/strong> solution that maintains one or more <strong>standby databases<\/strong> as synchronized copies of a <strong>primary database<\/strong>.<br>It protects databases from <strong>data loss<\/strong>, <strong>downtime<\/strong>, and <strong>site failures<\/strong>, while also enabling <strong>read-only workloads<\/strong> on standby systems.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. DATA GUARD FUNDAMENTALS<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is Oracle Data Guard?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Definition:<\/strong><br><strong>Oracle Data Guard<\/strong> is Oracle\u2019s <strong>disaster recovery solution<\/strong> that creates, manages, and maintains <strong>one or more standby databases<\/strong> to protect the <strong>primary database<\/strong> against failures.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Simple Explanation (Interview-Friendly):<\/strong><br>\ud83d\udc49 Think of Data Guard like a <strong>backup office building<\/strong>.<br>If your <strong>main office<\/strong> catches fire, employees immediately move to the <strong>backup office<\/strong> and continue working.<br>Similarly, if the <strong>primary database fails<\/strong>, Data Guard allows you to <strong>switch to the standby database<\/strong> with minimal or no downtime.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Core Purpose of Data Guard<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u2714 <strong>High Availability (HA)<\/strong> \u2013 Minimize downtime<br>\u2714 <strong>Disaster Recovery (DR)<\/strong> \u2013 Protect against site-level failures<br>\u2714 <strong>Data Protection<\/strong> \u2013 Prevent data loss<br>\u2714 <strong>Offload Operations<\/strong> \u2013 Use standby for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reporting<\/li>\n\n\n\n<li>Backups<\/li>\n\n\n\n<li>Read-only queries<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Primary vs Standby Database<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Primary Database<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Production database<\/strong><\/li>\n\n\n\n<li>Handles <strong>all read\/write transactions<\/strong><\/li>\n\n\n\n<li><strong>Generates redo data<\/strong><\/li>\n\n\n\n<li>Acts as the <strong>source of truth<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Standby Database<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Exact copy<\/strong> of the primary database<\/li>\n\n\n\n<li><strong>Receives redo data<\/strong> from the primary<\/li>\n\n\n\n<li><strong>Applies redo<\/strong> to stay synchronized<\/li>\n\n\n\n<li>Can be located in a <strong>different geographic region<\/strong><\/li>\n\n\n\n<li>Takes over when the <strong>primary fails<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Primary\u2013Standby Relationship (Flow Diagram)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>PRIMARY DATABASE (Production Site)\n        \u2193  (Redo Transport)\nSTANDBY DATABASE (DR Site)\n        \u2193  (Redo Apply)\nUp-to-date copy ready for failover\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview Tip \ud83d\udca1<\/strong><\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>One-liner you can use in interviews:<\/strong><br><strong>\u201cOracle Data Guard ensures business continuity by maintaining synchronized standby databases that can quickly take over when the primary database fails.\u201d<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. TYPES OF STANDBY DATABASES<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>A. Physical Standby Database<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Most Common and Most Preferred in Production)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Exact block-by-block copy<\/strong> of the primary database<\/li>\n\n\n\n<li>Same <strong>data files, control files, and structure<\/strong><\/li>\n\n\n\n<li>Maintained using <strong>Redo Apply<\/strong> (media recovery)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>How it works<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>Primary DB\n \u2192 Generates Redo\n \u2192 Sends Redo to Standby\n \u2192 MRP (Media Recovery Process) applies redo\n \u2192 Physical Standby stays synchronized\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Key Characteristics<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Exact physical replica<\/strong> of primary<\/li>\n\n\n\n<li>Can be opened <strong>READ ONLY<\/strong> while redo is applying (<strong>Active Data Guard<\/strong>)<\/li>\n\n\n\n<li><strong>Fastest recovery<\/strong> option<\/li>\n\n\n\n<li>Most reliable for <strong>disaster recovery<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Use Cases<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Disaster recovery<\/li>\n\n\n\n<li>High availability<\/li>\n\n\n\n<li>Patch and upgrade testing using standby<\/li>\n\n\n\n<li>Offloading backups to standby<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No data divergence (exact copy)<\/li>\n\n\n\n<li>Fastest switchover and failover<\/li>\n\n\n\n<li>Patches can be tested on standby first<\/li>\n\n\n\n<li>Backup and reporting workload can be offloaded<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Limitations<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cannot be opened <strong>READ WRITE<\/strong><\/li>\n\n\n\n<li>Requires <strong>same OS and platform<\/strong><\/li>\n\n\n\n<li>Read-only access during redo apply requires <strong>Active Data Guard license<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cA physical standby is a block-level replica of the primary database that uses redo apply and provides the fastest and safest disaster recovery option.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B. Logical Standby Database<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Logical copy<\/strong> of the primary database<\/li>\n\n\n\n<li>Same <strong>logical data<\/strong>, but <strong>structure can differ<\/strong><\/li>\n\n\n\n<li>Uses <strong>SQL Apply<\/strong> instead of redo apply<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>How it works<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>Primary DB\n \u2192 Generates Redo\n \u2192 Redo sent to Standby\n \u2192 LogMiner converts redo to SQL\n \u2192 SQL Apply executes statements\n \u2192 Logical Standby updated\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Key Characteristics<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Can be opened <strong>READ WRITE<\/strong> while applying redo<\/li>\n\n\n\n<li>Can contain <strong>additional tables, indexes, schemas<\/strong><\/li>\n\n\n\n<li>Can run on <strong>different OS<\/strong> (same platform family)<\/li>\n\n\n\n<li>More flexible but <strong>more complex<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Use Cases<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reporting database with write access<\/li>\n\n\n\n<li>Testing environment<\/li>\n\n\n\n<li>Data subsetting<\/li>\n\n\n\n<li>Rolling database upgrades<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open <strong>READ WRITE<\/strong> while receiving redo<\/li>\n\n\n\n<li>Supports additional objects like indexes and materialized views<\/li>\n\n\n\n<li>More flexibility compared to physical standby<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Limitations<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Slower than physical standby<\/li>\n\n\n\n<li>Not all data types supported (e.g., LONG, BFILE)<\/li>\n\n\n\n<li>SQL Apply adds overhead<\/li>\n\n\n\n<li>More complex administration and troubleshooting<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cA logical standby applies redo as SQL statements, allowing read-write access and schema flexibility, but with higher complexity and lower performance.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>C. Snapshot Standby Database<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <strong>temporary, fully READ WRITE copy<\/strong> of a <strong>physical standby<\/strong><\/li>\n\n\n\n<li>Primarily used for <strong>testing purposes<\/strong><\/li>\n\n\n\n<li>Can be <strong>reverted back<\/strong> to a physical standby at any time<\/li>\n\n\n\n<li><strong>All changes are discarded<\/strong> when converted back<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>How it works<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>Physical Standby\n \u2192 Convert to Snapshot Standby\n \u2192 Fully READ WRITE (Testing Phase)\n \u2192 Convert back to Physical Standby\n \u2192 All test changes discarded\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Key Characteristics<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fully <strong>updateable (READ WRITE)<\/strong><\/li>\n\n\n\n<li>Uses <strong>Flashback Database<\/strong> to revert changes<\/li>\n\n\n\n<li>Redo is <strong>received but NOT applied<\/strong> (redo is queued)<\/li>\n\n\n\n<li>When converted back, <strong>queued redo is applied<\/strong> to resynchronize<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Use Cases<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Testing patches before applying to primary<\/li>\n\n\n\n<li>Testing application changes<\/li>\n\n\n\n<li>UAT (User Acceptance Testing)<\/li>\n\n\n\n<li>Performing \u201cwhat-if\u201d scenarios safely<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Conversion Commands<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Convert Physical Standby to Snapshot Standby<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;\nALTER DATABASE OPEN;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Convert Snapshot Standby back to Physical Standby<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SHUTDOWN IMMEDIATE;\nSTARTUP MOUNT;\nALTER DATABASE CONVERT TO PHYSICAL STANDBY;\nSHUTDOWN IMMEDIATE;\nSTARTUP MOUNT;\nALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Full READ WRITE access for testing<\/li>\n\n\n\n<li>Simple and fast conversion back to physical standby<\/li>\n\n\n\n<li>No impact on primary database<\/li>\n\n\n\n<li>Ideal for patch and upgrade testing<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Limitations<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Not a disaster recovery solution (changes are discarded)<\/li>\n\n\n\n<li>Redo apply is stopped, redo gap can increase<\/li>\n\n\n\n<li><strong>Flashback Database must be enabled<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cA snapshot standby is a temporary read-write version of a physical standby used for testing, which can be safely reverted back using flashback.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Quick Comparison of Standby Types<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Feature<\/th><th>Physical Standby<\/th><th>Logical Standby<\/th><th>Snapshot Standby<\/th><\/tr><\/thead><tbody><tr><td>Copy Type<\/td><td>Block-by-block<\/td><td>Logical (SQL)<\/td><td>Temporary READ WRITE<\/td><\/tr><tr><td>Apply Method<\/td><td>Redo Apply (MRP)<\/td><td>SQL Apply<\/td><td>No apply (redo queued)<\/td><\/tr><tr><td>Read Access<\/td><td>READ ONLY (ADG)<\/td><td>READ WRITE<\/td><td>READ WRITE<\/td><\/tr><tr><td>Performance<\/td><td>Fastest<\/td><td>Slower<\/td><td>Not applicable<\/td><\/tr><tr><td>DR Solution<\/td><td>Yes<\/td><td>Yes<\/td><td>No (testing only)<\/td><\/tr><tr><td>Primary Use<\/td><td>DR, HA<\/td><td>Reporting, Upgrades<\/td><td>Testing, UAT<\/td><\/tr><tr><td>Platform<\/td><td>Same OS &amp; platform<\/td><td>Platform family<\/td><td>Same as physical<\/td><\/tr><tr><td>Data Types<\/td><td>All supported<\/td><td>Limited<\/td><td>All supported<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. DATA GUARD ARCHITECTURE<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Overall Architecture Flow<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502                PRIMARY DATABASE                     \u2502\n\u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510     \u2502\n\u2502  \u2502  LGWR    \u2502\u2500\u2500\u2500\u2192\u2502  ARCH    \u2502\u2500\u2500\u2500\u2192\u2502  Redo    \u2502     \u2502\n\u2502  \u2502          \u2502    \u2502          \u2502    \u2502  Logs    \u2502     \u2502\n\u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518     \u2502\n\u2502        \u2193 (Redo Transport Services)                  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                         \u2193\n              \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n              \u2502       NETWORK        \u2502\n              \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                         \u2193\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502                STANDBY DATABASE                     \u2502\n\u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510     \u2502\n\u2502  \u2502  RFS     \u2502\u2500\u2500\u2500\u2192\u2502  Standby \u2502\u2500\u2500\u2500\u2192\u2502  MRP\/LSP \u2502     \u2502\n\u2502  \u2502 (Receive)\u2502    \u2502  Redo    \u2502    \u2502  (Apply) \u2502     \u2502\n\u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518     \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Key Processes in Data Guard<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Processes on the Primary Database<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. LGWR (Log Writer)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Writes redo entries to <strong>online redo logs<\/strong><\/li>\n\n\n\n<li>Sends redo directly to standby in <strong>SYNC (real-time) mode<\/strong><\/li>\n\n\n\n<li>Essential for <strong>zero data loss<\/strong> configurations<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Interview Point:<\/strong><br>In SYNC mode, a commit waits until redo is written on standby.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. ARCH (Archiver)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Archives filled online redo logs<\/li>\n\n\n\n<li>Sends archived redo logs to standby in <strong>ASYNC mode<\/strong><\/li>\n\n\n\n<li>Helps resolve gaps if real-time redo shipping fails<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Interview Point:<\/strong><br>ARCH is mainly used when LGWR is not involved in redo transport.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. LNS (Log Network Server)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Network process responsible for <strong>redo transmission<\/strong><\/li>\n\n\n\n<li>Sends redo data from primary to standby<\/li>\n\n\n\n<li>One LNS process per standby destination<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Interview Point:<\/strong><br>LNS works with LGWR or ARCH depending on transport mode.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. FAL (Fetch Archive Log) Client<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Detects <strong>redo gaps<\/strong> on standby<\/li>\n\n\n\n<li>Requests missing archived logs<\/li>\n\n\n\n<li>Ensures standby stays synchronized<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Processes on the Standby Database<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. RFS (Remote File Server)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Receives redo data from primary<\/li>\n\n\n\n<li>Writes redo into:\n<ul class=\"wp-block-list\">\n<li><strong>Standby Redo Logs (SRL)<\/strong>, or<\/li>\n\n\n\n<li>Archived redo logs<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>One RFS process per primary connection<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. MRP (Managed Recovery Process)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Physical Standby Only)<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Applies redo to physical standby database<\/li>\n\n\n\n<li>Performs <strong>media recovery<\/strong><\/li>\n\n\n\n<li>Supports <strong>real-time apply<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Interview Point:<\/strong><br>MRP continuously applies redo to keep physical standby in sync.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. LSP (Logical Standby Process)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Logical Standby Only)<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Uses <strong>LogMiner<\/strong> to mine redo logs<\/li>\n\n\n\n<li>Converts redo into <strong>SQL statements<\/strong><\/li>\n\n\n\n<li>Applies SQL to logical standby database<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. FAL (Fetch Archive Log) Server<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Responds to gap requests from primary or standby<\/li>\n\n\n\n<li>Sends missing archived redo logs<\/li>\n\n\n\n<li>Works with FAL client for gap resolution<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cData Guard architecture relies on redo transport from primary to standby using LGWR or ARCH, received by RFS and applied using MRP or LSP depending on the standby type.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. REDO TRANSPORT MODES<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Redo transport mode defines <strong>how and when redo data is transmitted<\/strong> from the <strong>primary database<\/strong> to the <strong>standby database<\/strong> and how it affects <strong>data loss and performance<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>A. SYNC (Synchronous Mode)<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Used with Maximum Protection \/ Maximum Availability)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How it works<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>User commits a transaction on primary<\/li>\n\n\n\n<li><strong>LGWR<\/strong> writes redo to local online redo log<\/li>\n\n\n\n<li>LGWR sends redo to standby<\/li>\n\n\n\n<li>Primary <strong>waits for standby acknowledgment<\/strong><\/li>\n\n\n\n<li>Commit completes only after acknowledgment<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Configuration Example<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER SYSTEM SET log_archive_dest_2=\n'SERVICE=standby SYNC AFFIRM NET_TIMEOUT=30';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Characteristics<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Zero data loss guaranteed<\/strong><\/li>\n\n\n\n<li>Primary waits for standby confirmation<\/li>\n\n\n\n<li>If standby is unavailable:\n<ul class=\"wp-block-list\">\n<li>Primary may <strong>hang or shut down<\/strong> (Maximum Protection)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Network latency directly impacts performance<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Use When<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Zero data loss is mandatory<\/li>\n\n\n\n<li>Standby is located nearby (low latency network)<\/li>\n\n\n\n<li><strong>RPO = 0<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cSYNC mode guarantees zero data loss by waiting for redo confirmation from standby before committing transactions.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>B. ASYNC (Asynchronous Mode)<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Maximum Performance \u2013 Most Common in Production)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How it works<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>User commits a transaction on primary<\/li>\n\n\n\n<li><strong>LGWR<\/strong> writes redo locally<\/li>\n\n\n\n<li>Commit completes immediately<\/li>\n\n\n\n<li><strong>ARCH\/LNS<\/strong> sends redo to standby in background<\/li>\n\n\n\n<li>Primary does not wait for acknowledgment<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Configuration Example<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER SYSTEM SET log_archive_dest_2=\n'SERVICE=standby ASYNC NOAFFIRM';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Characteristics<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Minimal or no performance impact<\/strong> on primary<\/li>\n\n\n\n<li>Small data loss possible (redo in transit)<\/li>\n\n\n\n<li>Primary continues even if standby is unavailable<\/li>\n\n\n\n<li>Network issues do not affect commit performance<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Use When<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Performance is critical<\/li>\n\n\n\n<li>Small data loss is acceptable (seconds or minutes)<\/li>\n\n\n\n<li>Standby is geographically distant<\/li>\n\n\n\n<li><strong>RPO &gt; 0<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cASYNC mode prioritizes performance by not waiting for standby acknowledgment, allowing minimal data loss.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>C. FASTSYNC (Fast Sync Mode)<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Introduced in 19c \u2013 Uses Far Sync)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hybrid of <strong>SYNC and ASYNC<\/strong><\/li>\n\n\n\n<li>Uses a <strong>Far Sync standby instance<\/strong><\/li>\n\n\n\n<li>Achieves <strong>zero data loss with lower latency<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How it works<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>PRIMARY (SYNC)\n      \u2193\nFAR SYNC (ASYNC)\n      \u2193\nSTANDBY\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Configuration Example<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Primary to Far Sync (SYNC)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER SYSTEM SET log_archive_dest_2=\n'SERVICE=farsync SYNC AFFIRM';\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Far Sync to Standby (ASYNC)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER SYSTEM SET log_archive_dest_2=\n'SERVICE=standby ASYNC';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Characteristics<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Far Sync is lightweight (no data files, only redo)<\/li>\n\n\n\n<li>Primary commits quickly (Far Sync is nearby)<\/li>\n\n\n\n<li><strong>Zero data loss achieved<\/strong><\/li>\n\n\n\n<li>Standby can be geographically distant<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cFast Sync uses a Far Sync instance to provide zero data loss without impacting primary performance, even with distant standbys.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Redo Transport Mode Comparison<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Mode<\/th><th>Data Loss Risk<\/th><th>Performance Impact<\/th><th>Primary Behavior if Standby Down<\/th><\/tr><\/thead><tbody><tr><td>SYNC<\/td><td>None<\/td><td>High<\/td><td>Hangs or shuts down<\/td><\/tr><tr><td>ASYNC<\/td><td>Possible (seconds)<\/td><td>Minimal<\/td><td>Continues normally<\/td><\/tr><tr><td>FASTSYNC<\/td><td>None<\/td><td>Low<\/td><td>Continues with Far Sync<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. DATA GUARD BROKER<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is Data Guard Broker?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Definition:<\/strong><br><strong>Data Guard Broker<\/strong> is a <strong>management and automation framework<\/strong> that simplifies <strong>configuration, monitoring, and administration<\/strong> of Oracle Data Guard environments.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Without Data Guard Broker (Manual Management)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Failover and switchover require <strong>multiple manual SQL commands<\/strong><\/li>\n\n\n\n<li>Monitoring is manual<\/li>\n\n\n\n<li>Configuration changes are complex<\/li>\n\n\n\n<li>Higher risk of <strong>human error<\/strong><\/li>\n\n\n\n<li>Time-consuming during outages<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>With Data Guard Broker<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SWITCHOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>single command<\/strong> performs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Role transition<\/li>\n\n\n\n<li>Redo apply coordination<\/li>\n\n\n\n<li>Service and state validation<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Benefits of Data Guard Broker<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automated switchover and failover<\/li>\n\n\n\n<li>Centralized monitoring and control<\/li>\n\n\n\n<li><strong>Fast-Start Failover (FSFO)<\/strong> support<\/li>\n\n\n\n<li>Simplified configuration management<\/li>\n\n\n\n<li>Built-in health checks and validation<\/li>\n\n\n\n<li>GUI integration with <strong>Enterprise Manager<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cData Guard Broker automates and simplifies Data Guard operations, reducing manual effort and human error during role transitions.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Key Data Guard Broker Concepts<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Broker Configuration<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <strong>named collection<\/strong> of:\n<ul class=\"wp-block-list\">\n<li>One primary database<\/li>\n\n\n\n<li>One or more standby databases<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Configuration metadata stored in <strong>binary files<\/strong><\/li>\n\n\n\n<li>Files exist on <strong>each database server<\/strong><\/li>\n\n\n\n<li>Managed using <strong>DGMGRL<\/strong> or Enterprise Manager<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Fast-Start Failover (FSFO)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enables <strong>automatic failover<\/strong> without DBA intervention<\/li>\n\n\n\n<li>Triggered when primary becomes unreachable<\/li>\n\n\n\n<li>Uses a <strong>time threshold<\/strong> (for example, 30 seconds)<\/li>\n\n\n\n<li>Prevents prolonged outages<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Failover Logic:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Primary unreachable &gt; Threshold\n \u2192 FSFO triggered\n \u2192 Standby promoted automatically\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Observer<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lightweight <strong>monitoring process<\/strong><\/li>\n\n\n\n<li>Continuously checks primary and standby health<\/li>\n\n\n\n<li>Initiates automatic failover under FSFO<\/li>\n\n\n\n<li>Must run on a <strong>separate server<\/strong><\/li>\n\n\n\n<li>Not installed on primary or standby database servers<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cFast-Start Failover uses an observer process to automatically promote a standby when the primary is unreachable beyond a configured threshold.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Data Guard Broker Commands<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Connect to Data Guard Broker<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; CONNECT sys\/password\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Show Broker Configuration<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SHOW CONFIGURATION;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Show Database Details<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SHOW DATABASE primary_db;\nDGMGRL&gt; SHOW DATABASE standby_db;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Perform Switchover<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SWITCHOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Perform Failover<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; FAILOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Enable Fast-Start Failover<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; ENABLE FAST_START FAILOVER;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Start Observer<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; START OBSERVER;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Redo Lag<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SHOW DATABASE standby_db 'ApplyLag';\nDGMGRL&gt; SHOW DATABASE standby_db 'TransportLag';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview Tip<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Broker commands abstract complex internal steps into a single validated operation, making them safer during outages.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>6. SWITCHOVER vs FAILOVER<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Switchover (Planned Role Reversal)<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Planned role reversal<\/li>\n\n\n\n<li>Primary becomes standby<\/li>\n\n\n\n<li>Standby becomes primary<\/li>\n\n\n\n<li><strong>Zero data loss<\/strong><\/li>\n\n\n\n<li>Fully reversible<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>When to Use<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Planned maintenance on primary<\/li>\n\n\n\n<li>Testing disaster recovery procedures<\/li>\n\n\n\n<li>Data center migration<\/li>\n\n\n\n<li>Patch or upgrade testing<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Switchover Process<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Verify standby is fully synchronized<\/li>\n\n\n\n<li>Convert primary to standby role<\/li>\n\n\n\n<li>Convert standby to primary role<\/li>\n\n\n\n<li>Redirect applications to new primary<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Command (Using Broker)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SWITCHOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Characteristics<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No data loss<\/li>\n\n\n\n<li>Graceful role transition<\/li>\n\n\n\n<li>Easy to switch back<\/li>\n\n\n\n<li>Brief application downtime (seconds to minutes)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cSwitchover is a planned, zero\u2013data-loss role reversal used for maintenance or testing.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Failover (Unplanned Emergency)<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Unplanned emergency operation<\/li>\n\n\n\n<li>Primary database is unavailable<\/li>\n\n\n\n<li>Standby is promoted to primary<\/li>\n\n\n\n<li>Possible data loss (depends on redo mode)<\/li>\n\n\n\n<li>Not easily reversible<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>When to Use<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Primary database crash<\/li>\n\n\n\n<li>Primary site disaster<\/li>\n\n\n\n<li>Complete system failure<\/li>\n\n\n\n<li>Network isolation of primary<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Failover Process<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Confirm primary is truly down<\/li>\n\n\n\n<li>Promote standby to primary<\/li>\n\n\n\n<li>Redirect applications<\/li>\n\n\n\n<li>Rebuild old primary later as new standby<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Command (Using Broker)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; FAILOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Characteristics<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Used only in emergencies<\/li>\n\n\n\n<li>Possible data loss (redo in transit)<\/li>\n\n\n\n<li>Old primary must be rebuilt<\/li>\n\n\n\n<li>More complex recovery process<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cFailover is an emergency operation that promotes a standby when the primary is lost, potentially with some data loss.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Switchover vs Failover Comparison<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Aspect<\/th><th>Switchover<\/th><th>Failover<\/th><\/tr><\/thead><tbody><tr><td>Type<\/td><td>Planned<\/td><td>Unplanned<\/td><\/tr><tr><td>Data Loss<\/td><td>None<\/td><td>Possible<\/td><\/tr><tr><td>Reversible<\/td><td>Yes (easy)<\/td><td>Difficult<\/td><\/tr><tr><td>Downtime<\/td><td>Seconds to minutes<\/td><td>Minutes to hours<\/td><\/tr><tr><td>Use Case<\/td><td>Maintenance, Testing<\/td><td>Disaster, Emergency<\/td><\/tr><tr><td>Primary State<\/td><td>Available<\/td><td>Failed \/ Unreachable<\/td><\/tr><tr><td>Post-Operation<\/td><td>Roles swapped<\/td><td>Old primary rebuilt<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>7. MONITORING DATA GUARD<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Effective monitoring ensures the <strong>standby database is synchronized<\/strong>, <strong>redo is flowing<\/strong>, and <strong>recovery processes are healthy<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Key Dynamic Performance Views<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Monitoring on Primary Database<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Archive Destinations<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT dest_id, status, destination, error\nFROM v$archive_dest\nWHERE status != 'INACTIVE';\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verifies redo destinations<\/li>\n\n\n\n<li>Quickly identifies transport errors<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Log Transport Status<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT dest_id, status, type,\n       database_mode, recovery_mode\nFROM v$archive_dest_status;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Confirms whether redo transport is working<\/li>\n\n\n\n<li>Shows transport and recovery modes<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Archive Gap<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Detects missing archived logs on standby<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Monitoring on Standby Database<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Database Role and Open Mode<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role, open_mode\nFROM v$database;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Confirms standby role<\/li>\n\n\n\n<li>Validates READ ONLY or MOUNT mode<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Apply and Transport Lag<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT name, value, unit, time_computed\nFROM v$dataguard_stats\nWHERE name IN ('apply lag', 'transport lag');\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Most important health indicators<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check MRP Status (Physical Standby)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT process, status, thread#, sequence#, block#\nFROM v$managed_standby\nWHERE process = 'MRP0';\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Confirms redo is actively being applied<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Archive Gap<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensures no redo gaps exist<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Last Applied Archived Log<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT sequence#, first_time, next_time, applied\nFROM v$archived_log\nWHERE applied = 'YES'\nORDER BY sequence# DESC;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verifies how current the standby is<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Important Data Guard Metrics<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Transport Lag<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Time difference between redo generated on primary and <strong>received<\/strong> on standby<\/li>\n\n\n\n<li>Expected value: <strong>seconds<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Apply Lag<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Time difference between redo received and <strong>applied<\/strong> on standby<\/li>\n\n\n\n<li>Expected value: <strong>seconds to minutes<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Archive Gap<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Missing archived redo log sequence<\/li>\n\n\n\n<li>Must be resolved <strong>immediately<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Single Command to Check Overall Lag<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT name, value, datum_time, time_computed\nFROM v$dataguard_stats;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Health Interpretation (Interview Focus)<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Good Health<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apply lag      : 0 seconds\ntransport lag  : 0 seconds\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Problem Scenario<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apply lag      : 2 hours     \u2192 MRP slow or stopped\ntransport lag  : 30 minutes \u2192 Network or transport issue\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cTransport lag shows redo delivery delay, while apply lag shows recovery delay; both should normally be near zero in a healthy Data Guard setup.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>8. COMMON ISSUES AND TROUBLESHOOTING<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This section covers <strong>frequently asked interview scenarios<\/strong> and <strong>real-world Data Guard issues<\/strong> with clear <strong>symptoms, causes, and solutions<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Issue 1: Archive Gap<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Symptoms<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Query returns <strong>missing redo sequence numbers<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Common Causes<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Network interruption<\/li>\n\n\n\n<li>Standby database down during log switch<\/li>\n\n\n\n<li>Archive destination full on primary or standby<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solutions<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Manual Resolution<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE REGISTER PHYSICAL LOGFILE '\/path\/to\/archive.arc';\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Copy missing archived logs from primary to standby<\/li>\n\n\n\n<li>Register them manually<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Automatic Resolution<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure <strong>FAL client and FAL server<\/strong> are properly configured<\/li>\n\n\n\n<li>FAL automatically requests missing logs<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cAn archive gap means redo logs are missing on standby and must be resolved immediately to resume recovery.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Issue 2: MRP Not Running<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Symptoms<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT process\nFROM v$managed_standby\nWHERE process = 'MRP0';\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No rows returned<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Common Causes<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MRP stopped manually<\/li>\n\n\n\n<li>Error during redo apply<\/li>\n\n\n\n<li>Standby database not in correct state (MOUNT \/ READ ONLY)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solutions<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Start Managed Recovery<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Start Real-Time Apply<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE\nUSING CURRENT LOGFILE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cIf MRP is not running, redo apply stops and the standby falls behind the primary.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Issue 3: High Apply Lag<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Symptoms<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT value\nFROM v$dataguard_stats\nWHERE name = 'apply lag';\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lag shows <strong>minutes or hours<\/strong> instead of seconds<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Common Causes<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MRP is slow or stalled<\/li>\n\n\n\n<li>Heavy DML activity on primary<\/li>\n\n\n\n<li>Insufficient CPU, I\/O, or memory on standby<\/li>\n\n\n\n<li>Delayed apply configured intentionally<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solutions<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check Recovery Progress<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$recovery_progress;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Enable Parallel Recovery<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE\nPARALLEL 4 DISCONNECT;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Additional Checks<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Review standby <strong>alert log<\/strong><\/li>\n\n\n\n<li>Check system resource utilization<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cHigh apply lag usually indicates recovery slowness or resource constraints on the standby.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Issue 4: Standby Redo Logs Missing<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Symptoms<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Real-time apply not working<\/li>\n\n\n\n<li>Apply lag increasing<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Standby Redo Logs (SRL) not configured<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Add Standby Redo Logs<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 11 ('\/path\/srl_11.log') SIZE 512M;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 12 ('\/path\/srl_12.log') SIZE 512M;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 13 ('\/path\/srl_13.log') SIZE 512M;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 14 ('\/path\/srl_14.log') SIZE 512M;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Sizing Rule<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Same size as primary redo logs<\/li>\n\n\n\n<li><strong>(Number of online redo log groups + 1) per thread<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cStandby redo logs are mandatory for real-time apply and should always be configured in Data Guard.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Issue 5: Switchover Fails<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Symptoms<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SWITCHOVER TO standby_db;\nORA-16525: database not ready for switchover\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Common Causes<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Standby not fully synchronized<\/li>\n\n\n\n<li>Archive gap exists<\/li>\n\n\n\n<li>Standby not in correct state<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solutions<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check Switchover Status<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role, switchover_status\nFROM v$database;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected Values<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Primary: <code>TO STANDBY<\/code> or <code>SESSIONS ACTIVE<\/code><\/li>\n\n\n\n<li>Standby: <code>TO PRIMARY<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Resolve Archive Gaps<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ensure MRP Is Running<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cA switchover fails if the standby is not synchronized or redo apply is not active.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>9. INTERVIEW QUESTIONS<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q1: What is Oracle Data Guard?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br><strong>Oracle Data Guard<\/strong> is a <strong>disaster recovery and high availability solution<\/strong> that maintains one or more <strong>standby databases<\/strong> as synchronized copies of a <strong>primary database<\/strong>.<br>It protects against <strong>data loss and downtime<\/strong> by shipping and applying <strong>redo data<\/strong> from primary to standby.<br>If the primary database fails, a standby can <strong>take over quickly<\/strong> with minimal downtime and minimal or zero data loss.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q2: Difference between Physical and Logical Standby?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Physical Standby<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Block-by-block exact copy of the primary<\/li>\n\n\n\n<li>Uses <strong>Redo Apply<\/strong> (MRP \u2013 media recovery)<\/li>\n\n\n\n<li>Cannot be opened <strong>READ WRITE<\/strong><\/li>\n\n\n\n<li>Fastest and most commonly used<\/li>\n\n\n\n<li>Best choice for disaster recovery<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Logical Standby<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Logical copy of primary database<\/li>\n\n\n\n<li>Uses <strong>SQL Apply<\/strong> (redo converted to SQL)<\/li>\n\n\n\n<li>Can be opened <strong>READ WRITE<\/strong><\/li>\n\n\n\n<li>More flexible but slower<\/li>\n\n\n\n<li>Commonly used for reporting while receiving redo<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q3: What is the difference between SYNC and ASYNC redo transport?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>SYNC (Synchronous)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Primary waits for standby acknowledgment before commit<\/li>\n\n\n\n<li>Guarantees <strong>zero data loss (RPO = 0)<\/strong><\/li>\n\n\n\n<li>Has performance impact on primary<\/li>\n\n\n\n<li>Primary may hang if standby is unavailable<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ASYNC (Asynchronous)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Primary does not wait for standby<\/li>\n\n\n\n<li>Commit completes immediately<\/li>\n\n\n\n<li>Minimal performance impact<\/li>\n\n\n\n<li>Possible data loss if primary fails while redo is in transit<\/li>\n\n\n\n<li>Most common mode in production<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Selection depends on:<\/strong><br>Distance between sites, network latency, and RPO requirements.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q4: Explain Switchover vs Failover.<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Switchover<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Planned role reversal<\/li>\n\n\n\n<li>Zero data loss<\/li>\n\n\n\n<li>Primary becomes standby and standby becomes primary<\/li>\n\n\n\n<li>Fully reversible<\/li>\n\n\n\n<li>Used for maintenance and testing<\/li>\n\n\n\n<li>Downtime: seconds to a few minutes<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Failover<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Unplanned emergency operation<\/li>\n\n\n\n<li>Primary is unavailable<\/li>\n\n\n\n<li>Standby is promoted to primary<\/li>\n\n\n\n<li>Possible data loss (depends on redo mode)<\/li>\n\n\n\n<li>Old primary must be rebuilt<\/li>\n\n\n\n<li>Used during disasters<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q5: What is Data Guard Broker?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br><strong>Data Guard Broker<\/strong> is a <strong>management and automation framework<\/strong> that simplifies Data Guard administration. It provides:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automated switchover and failover using a single command<\/li>\n\n\n\n<li><strong>Fast-Start Failover<\/strong> (automatic failover without DBA intervention)<\/li>\n\n\n\n<li>Centralized monitoring and configuration<\/li>\n\n\n\n<li>Built-in health checks and validation<\/li>\n\n\n\n<li>Integration with <strong>Enterprise Manager<\/strong><\/li>\n\n\n\n<li>Reduced risk of human error during DR operations<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Without Broker, Data Guard operations must be performed <strong>manually<\/strong> using multiple SQL commands.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>9. INTERVIEW QUESTIONS (Continued)<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q6: What is Fast-Start Failover (FSFO)?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br><strong>Fast-Start Failover (FSFO)<\/strong> is an <strong>automatic failover feature of Data Guard Broker<\/strong> that performs a failover <strong>without DBA intervention<\/strong> when the primary database becomes unavailable.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Key Components<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Observer<\/strong> \u2013 Monitors health of primary and standby<\/li>\n\n\n\n<li><strong>Threshold<\/strong> \u2013 Time to wait before failover (for example, 30 seconds)<\/li>\n\n\n\n<li><strong>Failover Target<\/strong> \u2013 Pre-configured standby database<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>How FSFO Works<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Observer detects that the primary is unreachable<\/li>\n\n\n\n<li>Observer waits for the configured threshold<\/li>\n\n\n\n<li>Automatic failover to the standby occurs<\/li>\n\n\n\n<li>Applications reconnect to the new primary<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Requirements<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Data Guard Broker configured<\/li>\n\n\n\n<li>Observer process running<\/li>\n\n\n\n<li>FSFO enabled<\/li>\n\n\n\n<li>Flashback enabled (for reinstating old primary)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cFSFO enables automatic, zero-touch failover using an observer when the primary is unavailable beyond a configured threshold.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q7: How do you check apply lag on standby?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Method 1: Using V$DATAGUARD_STATS<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT name, value, unit, time_computed\nFROM v$dataguard_stats\nWHERE name IN ('apply lag', 'transport lag');\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Method 2: Using V$ARCHIVED_LOG<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT ARCH.thread#, ARCH.sequence#, ARCH.first_time,\n       APPL.sequence#, APPL.first_time,\n       (ARCH.sequence# - APPL.sequence#) gap\nFROM (SELECT thread#, MAX(sequence#) sequence#, MAX(first_time) first_time\n      FROM v$archived_log\n      WHERE archived = 'YES'\n      GROUP BY thread#) ARCH,\n     (SELECT thread#, MAX(sequence#) sequence#, MAX(first_time) first_time\n      FROM v$archived_log\n      WHERE applied = 'YES'\n      GROUP BY thread#) APPL\nWHERE ARCH.thread# = APPL.thread#;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Method 3: Check MRP Progress<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT process, status, thread#, sequence#\nFROM v$managed_standby\nWHERE process LIKE 'MRP%';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Health Interpretation<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Good:<\/strong> Apply lag = 0 seconds, Transport lag = 0\u20132 seconds<\/li>\n\n\n\n<li><strong>Problem:<\/strong> Apply lag &gt; 5 minutes requires investigation<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q8: What is an archive gap and how do you resolve it?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br>An <strong>archive gap<\/strong> occurs when the standby database is <strong>missing one or more archived redo log files<\/strong> in sequence.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Check for Archive Gap<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Common Causes<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Network interruption<\/li>\n\n\n\n<li>Standby database was down<\/li>\n\n\n\n<li>Archive destination full on primary<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Resolution<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Automatic (Recommended \u2013 FAL Configured)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>FAL client on standby requests missing logs<\/li>\n\n\n\n<li>FAL server on primary sends the logs<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Manual Resolution<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>scp \/arch\/1_234_123456.arc standby:\/arch\/\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE REGISTER PHYSICAL LOGFILE '\/arch\/1_234_123456.arc';\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MRP automatically applies the registered logs<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Prevention<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reliable network<\/li>\n\n\n\n<li>Adequate archive destination space<\/li>\n\n\n\n<li>Proper FAL configuration<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q9: How do you perform a manual switchover?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Using Data Guard Broker (Recommended)<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; CONNECT sys\/password\nDGMGRL&gt; SHOW CONFIGURATION;\nDGMGRL&gt; SWITCHOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Manual Switchover (Without Broker)<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: On Primary<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role, switchover_status FROM v$database;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Status should be <code>TO STANDBY<\/code><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;\nSHUTDOWN IMMEDIATE;\nSTARTUP MOUNT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: On Standby<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role, switchover_status FROM v$database;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Status should be <code>TO PRIMARY<\/code> or <code>SESSIONS ACTIVE<\/code><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;\nSHUTDOWN IMMEDIATE;\nSTARTUP;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: On Old Primary (Now Standby)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SHUTDOWN IMMEDIATE;\nSTARTUP MOUNT;\nALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4: Verification<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role, open_mode FROM v$database;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q10: What are Standby Redo Logs (SRL) and why are they needed?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br><strong>Standby Redo Logs (SRL)<\/strong> are <strong>online redo logs on the standby database<\/strong> that receive redo directly from the primary\u2019s <strong>LGWR<\/strong> in real time.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Purpose<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable <strong>real-time apply<\/strong><\/li>\n\n\n\n<li>Reduce apply lag to near zero<\/li>\n\n\n\n<li>Required for <strong>zero data loss<\/strong> modes<\/li>\n\n\n\n<li>Mandatory for <strong>Fast-Start Failover<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Redo Flow Comparison<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Without SRL<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Primary LGWR \u2192 Archive \u2192 Network \u2192 Standby Archive \u2192 MRP\n(Lag = minutes)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>With SRL<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Primary LGWR \u2192 Network \u2192 Standby SRL \u2192 MRP\n(Lag = seconds)\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Configuration<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Same size as primary redo logs<\/li>\n\n\n\n<li><strong>(Number of primary redo log groups + 1) per thread<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1\nGROUP 11 ('\/u01\/standby\/srl_11.log') SIZE 512M;\n\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1\nGROUP 12 ('\/u01\/standby\/srl_12.log') SIZE 512M;\n\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1\nGROUP 13 ('\/u01\/standby\/srl_13.log') SIZE 512M;\n\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1\nGROUP 14 ('\/u01\/standby\/srl_14.log') SIZE 512M;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Verification<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT group#, thread#, bytes\/1024\/1024 mb\nFROM v$standby_log;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Best Practice<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Always configure Standby Redo Logs on physical standbys, even if not using real-time apply initially.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q11: What is Active Data Guard?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br><strong>Active Data Guard<\/strong> is a <strong>licensed Oracle feature<\/strong> that allows a <strong>physical standby database<\/strong> to be opened <strong>READ ONLY<\/strong> while <strong>continuously applying redo<\/strong> from the primary database.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Without Active Data Guard<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Physical standby must be <strong>MOUNTED<\/strong> to apply redo<\/li>\n\n\n\n<li>Standby cannot be queried while redo is applying<\/li>\n\n\n\n<li>No read-only workload possible<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>With Active Data Guard<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Standby is <strong>OPEN READ ONLY<\/strong><\/li>\n\n\n\n<li><strong>MRP applies redo in real time<\/strong><\/li>\n\n\n\n<li>Users can run queries and reports<\/li>\n\n\n\n<li>Read-only workload is offloaded from primary<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Use Cases<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reporting and analytics on standby<\/li>\n\n\n\n<li>Running backups from standby<\/li>\n\n\n\n<li>Testing queries on production-like data<\/li>\n\n\n\n<li>DR testing without impacting production<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Enable Active Data Guard (on Standby)<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SHUTDOWN IMMEDIATE;\nSTARTUP;\nALTER DATABASE OPEN READ ONLY;\nALTER DATABASE RECOVER MANAGED STANDBY DATABASE\nUSING CURRENT LOGFILE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Verification<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role, open_mode\nFROM v$database;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>DATABASE_ROLE<\/code> = PHYSICAL STANDBY<\/li>\n\n\n\n<li><code>OPEN_MODE<\/code> = READ ONLY WITH APPLY<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Licensing<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Requires a <strong>separate Active Data Guard license<\/strong><\/li>\n\n\n\n<li>In addition to Oracle <strong>Enterprise Edition<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cActive Data Guard allows real-time redo apply on an open read-only physical standby, enabling reporting without impacting the primary.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q12: How do you monitor Data Guard lag?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Check Transport Lag<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT name, value\nFROM v$dataguard_stats\nWHERE name = 'transport lag';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Check Apply Lag<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT name, value\nFROM v$dataguard_stats\nWHERE name = 'apply lag';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Detailed Gap Analysis<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT thread#,\n       MAX(sequence#) FILTER (WHERE archived = 'YES') archived_seq,\n       MAX(sequence#) FILTER (WHERE applied = 'YES') applied_seq,\n       MAX(sequence#) FILTER (WHERE archived = 'YES') -\n       MAX(sequence#) FILTER (WHERE applied = 'YES') gap\nFROM v$archived_log\nGROUP BY thread#;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Check MRP Performance<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$recovery_progress;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Using Data Guard Broker<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SHOW DATABASE standby_db 'ApplyLag';\nDGMGRL&gt; SHOW DATABASE standby_db 'TransportLag';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Alert Thresholds<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Transport lag &gt; <strong>30 seconds<\/strong> \u2192 Network issue<\/li>\n\n\n\n<li>Apply lag &gt; <strong>5 minutes<\/strong> \u2192 MRP slow or stopped<\/li>\n\n\n\n<li>Gap &gt; <strong>10 archives<\/strong> \u2192 Critical, investigate immediately<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q13: What happens if the primary crashes before sending all redo to standby?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>ASYNC Mode (Most Common)<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Redo in transit is lost<\/li>\n\n\n\n<li>Data loss equals redo not yet shipped<\/li>\n\n\n\n<li>Typically seconds to minutes<\/li>\n\n\n\n<li><strong>RPO &gt; 0<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>SYNC Mode<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No redo is lost<\/li>\n\n\n\n<li>Primary waits for standby acknowledgment<\/li>\n\n\n\n<li>Zero data loss guaranteed<\/li>\n\n\n\n<li><strong>RPO = 0<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>After Failover<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>Redo lost (ASYNC)\n \u2192 Failover to standby\n \u2192 Old primary rebuilt\n \u2192 Operations resume with data gap\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Mitigation Strategies<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use SYNC mode for critical systems<\/li>\n\n\n\n<li>Use <strong>Far Sync<\/strong> for distant standbys<\/li>\n\n\n\n<li>Monitor apply and transport lag closely<\/li>\n\n\n\n<li>Regularly test DR procedures<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Strong Interview Closing Line<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cRedo transport mode directly determines data loss behavior during failures, making SYNC, ASYNC, and Far Sync key design decisions in Data Guard.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q14: Explain the Data Guard protection modes.<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br><strong>Data Guard protection modes<\/strong> define the <strong>level of data protection versus availability and performance<\/strong> by controlling how redo is transported from the primary to the standby database.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. Maximum Protection<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Zero Data Loss, Primary Stops if Standby Is Unavailable)<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PROTECTION;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key Characteristics<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Uses <strong>SYNC<\/strong> redo transport<\/li>\n\n\n\n<li><strong>Primary shuts down<\/strong> if no standby is available<\/li>\n\n\n\n<li>Guarantees <strong>absolute zero data loss<\/strong><\/li>\n\n\n\n<li>Requires at least one standby with <strong>Standby Redo Logs<\/strong><\/li>\n\n\n\n<li>Highest data protection, lowest availability<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use Case<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Extremely critical systems where <strong>data loss is unacceptable under any circumstance<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. Maximum Availability<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Zero Data Loss with Continued Availability)<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key Characteristics<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Uses <strong>SYNC<\/strong> redo transport during normal operation<\/li>\n\n\n\n<li>Automatically switches to <strong>ASYNC<\/strong> if standby becomes unavailable<\/li>\n\n\n\n<li>Zero data loss while operating in SYNC mode<\/li>\n\n\n\n<li>Possible data loss only if failover occurs during ASYNC period<\/li>\n\n\n\n<li>Best balance between protection and availability<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use Case<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Mission-critical systems requiring <strong>zero data loss<\/strong> without sacrificing uptime<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. Maximum Performance<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Best Performance, Possible Data Loss \u2013 Default Mode)<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key Characteristics<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Uses <strong>ASYNC<\/strong> redo transport<\/li>\n\n\n\n<li>No performance impact on primary<\/li>\n\n\n\n<li>Primary continues regardless of standby status<\/li>\n\n\n\n<li>Possible data loss during failover<\/li>\n\n\n\n<li>Most widely used mode in production<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use Case<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Systems where <strong>performance is more important than zero data loss<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Protection Mode Comparison<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Mode<\/th><th>Redo Transport<\/th><th>Data Loss<\/th><th>Primary if Standby Down<\/th><th>Typical Use<\/th><\/tr><\/thead><tbody><tr><td>Maximum Protection<\/td><td>SYNC<\/td><td>None<\/td><td>Shuts down<\/td><td>Absolute DR<\/td><\/tr><tr><td>Maximum Availability<\/td><td>SYNC \u2192 ASYNC<\/td><td>None (normally)<\/td><td>Continues (degrades)<\/td><td>Critical systems<\/td><\/tr><tr><td>Maximum Performance<\/td><td>ASYNC<\/td><td>Possible<\/td><td>Continues<\/td><td>Most production systems<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Check Current Protection Mode<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT protection_mode, protection_level\nFROM v$database;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cMaximum Protection prioritizes zero data loss, Maximum Availability balances protection and uptime, and Maximum Performance prioritizes performance with acceptable data loss.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q15: What is a Far Sync instance?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br>A <strong>Far Sync instance<\/strong> is a <strong>lightweight remote Oracle instance<\/strong> (introduced in <strong>Oracle 12c<\/strong>) that <strong>receives redo from the primary database and forwards it to distant standby databases<\/strong>.<br>It enables <strong>zero data loss<\/strong> without impacting primary database performance, even when the standby is geographically far away.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Problem It Solves<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Primary in <strong>Mumbai<\/strong>, standby in <strong>London<\/strong> (high network latency)<\/li>\n\n\n\n<li><strong>SYNC<\/strong> mode is too slow due to long-distance acknowledgment<\/li>\n\n\n\n<li><strong>ASYNC<\/strong> mode risks data loss<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Solution Architecture<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>PRIMARY (Mumbai)\n     \u2193  SYNC (low latency)\nFAR SYNC (Nearby location)\n     \u2193  ASYNC (long distance)\nSTANDBY (London)\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Key Benefits<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Zero data loss (SYNC transport to nearby Far Sync)<\/li>\n\n\n\n<li>No noticeable performance impact on primary<\/li>\n\n\n\n<li>Supports geographically distant standby databases<\/li>\n\n\n\n<li>Enables long-distance replication safely<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>What a Far Sync Instance Contains<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Control file<\/li>\n\n\n\n<li>Standby redo logs<\/li>\n\n\n\n<li>Archived redo logs<\/li>\n\n\n\n<li><strong>No datafiles<\/strong><\/li>\n\n\n\n<li>Requires minimal CPU, memory, and storage<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Use Cases<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Long-distance disaster recovery<\/li>\n\n\n\n<li>Zero data loss with acceptable performance<\/li>\n\n\n\n<li>Multi-region DR architectures<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Configuration Example<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Primary to Far Sync (SYNC)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>LOG_ARCHIVE_DEST_2='SERVICE=farsync SYNC AFFIRM'\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Far Sync to Standby (ASYNC)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>LOG_ARCHIVE_DEST_2='SERVICE=standby ASYNC'\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cFar Sync enables zero data loss by synchronously shipping redo to a nearby instance and asynchronously forwarding it to distant standbys.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q16: How do you rebuild a failed primary as a new standby?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br>After a failover, the <strong>old primary must be converted into a standby<\/strong> for the new primary. There are three common methods, depending on availability of flashback and backups.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Method 1: Using Flashback Database<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Fastest and Recommended)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Prerequisite<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Flashback Database must have been enabled on the old primary <strong>before the failure<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Steps<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>STARTUP MOUNT;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Flashback to pre-failover state<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FLASHBACK DATABASE TO BEFORE SCN &lt;failover_scn&gt;;\n-- or\nFLASHBACK DATABASE TO TIMESTAMP &lt;time_before_failover&gt;;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Convert to Physical Standby<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE CONVERT TO PHYSICAL STANDBY;\nSHUTDOWN IMMEDIATE;\nSTARTUP MOUNT;\nALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Verification<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role FROM v$database;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>PHYSICAL STANDBY<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Method 2: Using RMAN Restore<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(When Flashback Is Not Available)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Steps<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Take backup of new primary<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RMAN&gt; BACKUP DATABASE PLUS ARCHIVELOG;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Restore on old primary<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RMAN&gt; STARTUP FORCE NOMOUNT;\nRMAN&gt; RESTORE CONTROLFILE FROM '&lt;backup_location&gt;';\nRMAN&gt; ALTER DATABASE MOUNT;\nRMAN&gt; RESTORE DATABASE;\nRMAN&gt; RECOVER DATABASE NOREDO;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Convert to Physical Standby<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE CONVERT TO PHYSICAL STANDBY;\nSHUTDOWN IMMEDIATE;\nSTARTUP MOUNT;\nALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Method 3: Rebuild from Scratch<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Last Resort)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Steps<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create standby using <strong>RMAN DUPLICATE<\/strong><\/li>\n\n\n\n<li>Reconfigure Data Guard from beginning<\/li>\n\n\n\n<li>Start managed recovery<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Best Practice<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Always enable Flashback Database on the primary to allow fast and safe reinstatement after failover.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE FLASHBACK ON;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Final Interview Power Line<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cFar Sync solves long-distance zero data loss, and Flashback Database makes reinstating a failed primary fast and reliable.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q17: What are the prerequisites for Data Guard setup?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br>Before configuring Oracle Data Guard, several <strong>software, database, network, and configuration prerequisites<\/strong> must be met.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. Software and Licensing<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Oracle <strong>Enterprise Edition<\/strong> on both primary and standby<\/li>\n\n\n\n<li>Same Oracle version (or one release apart for rolling upgrades)<\/li>\n\n\n\n<li>Same OS platform or compatible platform family (for example, Linux x64 \u2192 Linux x64)<\/li>\n\n\n\n<li><strong>Active Data Guard license<\/strong> required for READ ONLY standby with redo apply<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. Primary Database Configuration<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>ARCHIVELOG Mode (Mandatory)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ARCHIVE LOG LIST;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Must show: <code>Database log mode: Archive Mode<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Force Logging (Strongly Recommended)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE FORCE LOGGING;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Prevents nologging operations from breaking standby consistency<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Standby Redo Logs<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Required for real-time apply<\/li>\n\n\n\n<li><strong>(Number of online redo log groups + 1) per thread<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE ADD STANDBY LOGFILE GROUP X SIZE 512M;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Archive Destinations<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER SYSTEM SET log_archive_dest_1=\n'LOCATION=\/arch1\/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES)';\n\nALTER SYSTEM SET log_archive_dest_2=\n'SERVICE=standby ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. Network Configuration<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>TNS Entries (on both servers)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>PRIMARY =\n  (DESCRIPTION =\n    (ADDRESS = (PROTOCOL = TCP)(HOST = primary-host)(PORT = 1521))\n    (CONNECT_DATA = (SERVICE_NAME = ORCL))\n  )\n\nSTANDBY =\n  (DESCRIPTION =\n    (ADDRESS = (PROTOCOL = TCP)(HOST = standby-host)(PORT = 1521))\n    (CONNECT_DATA = (SERVICE_NAME = ORCL_STBY))\n  )\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Static Listener Registration (Standby)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Required to connect when the database is in <strong>MOUNT<\/strong> state.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SID_LIST_LISTENER =\n  (SID_LIST =\n    (SID_DESC =\n      (GLOBAL_DBNAME = ORCL_STBY)\n      (ORACLE_HOME = \/u01\/app\/oracle\/product\/19.0.0\/dbhome_1)\n      (SID_NAME = ORCL)\n    )\n  )\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. Password File<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Password files must be <strong>identical<\/strong> on primary and standby<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>scp $ORACLE_HOME\/dbs\/orapwORCL standby:$ORACLE_HOME\/dbs\/\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. Initialization Parameters<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>On Primary<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DB_NAME=ORCL\nDB_UNIQUE_NAME=ORCL_PRIMARY\n\nLOG_ARCHIVE_CONFIG='DG_CONFIG=(ORCL_PRIMARY,ORCL_STANDBY)'\nLOG_ARCHIVE_DEST_1='LOCATION=\/arch1\/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ORCL_PRIMARY'\nLOG_ARCHIVE_DEST_2='SERVICE=standby ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCL_STANDBY'\nLOG_ARCHIVE_DEST_STATE_1=ENABLE\nLOG_ARCHIVE_DEST_STATE_2=ENABLE\n\nDB_FILE_NAME_CONVERT='\/ORCL_PRIMARY\/','\/ORCL_STANDBY\/'\nLOG_FILE_NAME_CONVERT='\/ORCL_PRIMARY\/','\/ORCL_STANDBY\/'\n\nSTANDBY_FILE_MANAGEMENT=AUTO\n\nFAL_SERVER=ORCL_STANDBY\nFAL_CLIENT=ORCL_PRIMARY\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>On Standby<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DB_NAME=ORCL\nDB_UNIQUE_NAME=ORCL_STANDBY\n\nLOG_ARCHIVE_CONFIG='DG_CONFIG=(ORCL_PRIMARY,ORCL_STANDBY)'\nLOG_ARCHIVE_DEST_1='LOCATION=\/arch1\/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ORCL_STANDBY'\nLOG_ARCHIVE_DEST_2='SERVICE=primary ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCL_PRIMARY'\n\nDB_FILE_NAME_CONVERT='\/ORCL_PRIMARY\/','\/ORCL_STANDBY\/'\nLOG_FILE_NAME_CONVERT='\/ORCL_PRIMARY\/','\/ORCL_STANDBY\/'\n\nSTANDBY_FILE_MANAGEMENT=AUTO\n\nFAL_SERVER=ORCL_PRIMARY\nFAL_CLIENT=ORCL_STANDBY\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>6. Storage Requirements<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Disk space equivalent to primary database<\/li>\n\n\n\n<li>Archive log space at least <strong>2\u00d7 daily redo generation<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>7. Resource Requirements<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CPU and memory comparable to primary (especially for Active Data Guard)<\/li>\n\n\n\n<li>Network bandwidth sufficient for redo generation rate<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cData Guard requires ARCHIVELOG mode, proper redo transport configuration, network connectivity, and synchronized initialization parameters.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Q18: How do you create a physical standby database from scratch?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Answer:<\/strong><br>A physical standby is typically created using <strong>RMAN DUPLICATE<\/strong> from the primary database.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>High-Level Steps<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Prepare the primary database<\/li>\n\n\n\n<li>Create standby using RMAN DUPLICATE<\/li>\n\n\n\n<li>Configure Data Guard parameters<\/li>\n\n\n\n<li>Start Managed Recovery Process (MRP)<\/li>\n\n\n\n<li>Verify synchronization<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 1: Prepare Primary Database<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE FORCE LOGGING;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 11 SIZE 512M;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 12 SIZE 512M;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 13 SIZE 512M;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 14 SIZE 512M;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER SYSTEM SET log_archive_config='DG_CONFIG=(ORCL_PRIMARY,ORCL_STANDBY)';\nALTER SYSTEM SET log_archive_dest_2=\n'SERVICE=standby ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)\n DB_UNIQUE_NAME=ORCL_STANDBY';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 2: Create Standby Using RMAN<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>export ORACLE_SID=ORCL\nrman TARGET sys\/password@primary AUXILIARY \/\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>RUN {\n  ALLOCATE CHANNEL ch1 DEVICE TYPE DISK;\n  ALLOCATE AUXILIARY CHANNEL stby DEVICE TYPE DISK;\n  DUPLICATE TARGET DATABASE\n    FOR STANDBY\n    FROM ACTIVE DATABASE\n    DORECOVER\n    SPFILE\n      SET DB_UNIQUE_NAME='ORCL_STANDBY'\n      SET FAL_SERVER='ORCL_PRIMARY'\n      SET FAL_CLIENT='ORCL_STANDBY'\n      SET LOG_ARCHIVE_DEST_2='SERVICE=primary ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)\n                              DB_UNIQUE_NAME=ORCL_PRIMARY'\n      SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(ORCL_PRIMARY,ORCL_STANDBY)'\n      SET STANDBY_FILE_MANAGEMENT='AUTO'\n    NOFILENAMECHECK;\n}\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 3: Add Standby Redo Logs on Standby<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 11 SIZE 512M;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 12 SIZE 512M;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 13 SIZE 512M;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 14 SIZE 512M;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 4: Start Managed Recovery<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE\nUSING CURRENT LOGFILE DISCONNECT FROM SESSION;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 5: Verify Standby Health<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role, open_mode FROM v$database;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT process, status\nFROM v$managed_standby\nWHERE process = 'MRP0';\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT name, value\nFROM v$dataguard_stats\nWHERE name IN ('apply lag', 'transport lag');\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 6: Configure Data Guard Broker (Optional)<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; CREATE CONFIGURATION 'DG_CONFIG'\n  AS PRIMARY DATABASE IS 'ORCL_PRIMARY'\n  CONNECT IDENTIFIER IS primary;\n\nDGMGRL&gt; ADD DATABASE 'ORCL_STANDBY'\n  AS CONNECT IDENTIFIER IS standby\n  MAINTAINED AS PHYSICAL;\n\nDGMGRL&gt; ENABLE CONFIGURATION;\nDGMGRL&gt; SHOW CONFIGURATION;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cA physical standby is created using RMAN DUPLICATE, followed by redo apply using MRP to keep it synchronized with the primary.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q19: Common Data Guard Errors and Solutions<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This question is frequently asked to assess <strong>real-world troubleshooting experience<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Error 1: ORA-16191<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Primary log shipping client not logged on standby<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Network connectivity issue<\/li>\n\n\n\n<li>Incorrect or missing TNS configuration<\/li>\n\n\n\n<li>Listener not reachable on standby<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Test connectivity from primary<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tnsping standby\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Verify listener on standby<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsnrctl status\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check static listener registration<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure <code>GLOBAL_DBNAME<\/code> and <code>SID_NAME<\/code> are correctly defined in <code>listener.ora<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Test direct connection<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sqlplus sys\/password@standby as sysdba\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview Tip<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This error almost always points to a network or listener configuration problem.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Error 2: ORA-16014<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Log sequence# not archived, no available destinations<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All archive destinations failed<\/li>\n\n\n\n<li>Standby unreachable<\/li>\n\n\n\n<li>Local archive destination is full<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check archive destination status<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT dest_id, status, error\nFROM v$archive_dest;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>If archive destination is full<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER SYSTEM SET log_archive_dest_state_2=DEFER;\n-- Free disk space\nALTER SYSTEM SET log_archive_dest_state_2=ENABLE;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>If network issue<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER SYSTEM SET log_archive_dest_state_2=DEFER;\n-- Fix network issue\nALTER SYSTEM SET log_archive_dest_state_2=ENABLE;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview Tip<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deferring the destination prevents primary database hangs while issues are fixed.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Error 3: ORA-16766<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Redo Apply is stopped<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MRP stopped manually<\/li>\n\n\n\n<li>Error occurred during redo apply<\/li>\n\n\n\n<li>Standby database not in correct state<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check error details<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT message\nFROM v$dataguard_status\nWHERE severity = 'Error';\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Restart MRP<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Start real-time apply<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE\nUSING CURRENT LOGFILE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview Tip<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Always check the alert log and v$dataguard_status before restarting MRP.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Error 4: ORA-00308<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cannot open archived log<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Archived redo log missing<\/li>\n\n\n\n<li>File corrupted<\/li>\n\n\n\n<li>Incorrect file path<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check for archive gap<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Manually resolve<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE REGISTER PHYSICAL LOGFILE '\/path\/to\/archive.arc';\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Automatic resolution<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure <strong>FAL client\/server<\/strong> parameters are configured correctly<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview Tip<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This error often accompanies archive gaps and missing redo files.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Error 5: ORA-16198<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Timeout: cannot get status from instance<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Data Guard Broker cannot communicate with database<\/li>\n\n\n\n<li>Listener or database is down<\/li>\n\n\n\n<li>Broker configuration files inaccessible<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check listener<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsnrctl status\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check database process<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ps -ef | grep pmon\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Verify broker files<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -l dr*.dat\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Restart Broker<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; DISABLE CONFIGURATION;\nDGMGRL&gt; ENABLE CONFIGURATION;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cMost Data Guard errors are caused by network issues, missing redo, or stopped recovery processes.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>10. BEST PRACTICES<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">These best practices reflect <strong>real production environments<\/strong> and are frequently discussed in <strong>Oracle DBA interviews<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Always Enable Flashback on Primary<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE FLASHBACK ON;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enables fast reinstatement of old primary after failover<\/li>\n\n\n\n<li>Simplifies recovery from logical or user errors<\/li>\n\n\n\n<li>Strongly recommended for all Data Guard setups<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Configure Standby Redo Logs<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Mandatory for <strong>real-time apply<\/strong><\/li>\n\n\n\n<li>Formula: <strong>(Number of online redo log groups + 1) per thread<\/strong><\/li>\n\n\n\n<li>Same size as primary online redo logs<\/li>\n\n\n\n<li>Required for zero data loss and FSFO<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Use Data Guard Broker<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Simplifies Data Guard management<\/li>\n\n\n\n<li>Reduces manual errors during switchover\/failover<\/li>\n\n\n\n<li>Enables <strong>Fast-Start Failover<\/strong><\/li>\n\n\n\n<li>Provides centralized monitoring and validation<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Monitor Data Guard Regularly<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Daily Checks<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT name, value\nFROM v$dataguard_stats\nWHERE name IN ('apply lag', 'transport lag');\n\nSELECT * FROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Weekly Checks<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT sequence#, applied\nFROM v$archived_log\nORDER BY sequence# DESC\nFETCH FIRST 100 ROWS ONLY;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Test DR Procedures Periodically<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Perform <strong>switchover<\/strong> quarterly or monthly<\/li>\n\n\n\n<li>Test <strong>failover<\/strong> at least annually<\/li>\n\n\n\n<li>Document all procedures<\/li>\n\n\n\n<li>Train team members to avoid panic during real outages<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Archive Log Management<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Set Retention Policy<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RMAN&gt; CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Regular Cleanup<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RMAN&gt; DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Prevents archive destination from filling up<\/li>\n\n\n\n<li>Avoids ORA-16014 errors<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7. Network Configuration<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use bonded or redundant network interfaces<\/li>\n\n\n\n<li>Prefer a dedicated network for Data Guard traffic<\/li>\n\n\n\n<li>Continuously monitor network latency and packet loss<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8. Resource Allocation<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Standby should have <strong>comparable CPU and memory<\/strong> as primary<\/li>\n\n\n\n<li>Critical for <strong>Active Data Guard<\/strong> workloads<\/li>\n\n\n\n<li>Prevents apply lag during heavy redo generation<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>9. Choose the Right Protection Mode<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Maximum Performance<\/strong> \u2013 Default and most common<\/li>\n\n\n\n<li><strong>Maximum Availability<\/strong> \u2013 Critical systems requiring zero data loss<\/li>\n\n\n\n<li><strong>Maximum Protection<\/strong> \u2013 Only when primary shutdown is acceptable<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>10. Regular Archive Gap Checks<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Automated Monitoring<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT COUNT(*)\nFROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Any value greater than zero requires immediate action<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Interview Closing One-Liner<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cA well-designed Data Guard environment combines proper redo configuration, continuous monitoring, regular testing, and automation using Broker.\u201d<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>11. QUICK REFERENCE COMMANDS<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Database Role and Open Mode<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role, open_mode FROM v$database;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Switchover Status<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT database_role, switchover_status FROM v$database;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Start Managed Recovery (MRP)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>With Real-Time Apply<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE\nUSING CURRENT LOGFILE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Stop Managed Recovery<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check MRP Status<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT process, status, thread#, sequence#\nFROM v$managed_standby\nWHERE process = 'MRP0';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Apply and Transport Lag<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT name, value, unit\nFROM v$dataguard_stats\nWHERE name IN ('apply lag', 'transport lag');\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Archive Destinations<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT dest_id, status, destination, error\nFROM v$archive_dest\nWHERE status != 'INACTIVE';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Archive Gaps<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$archive_gap;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Open Standby READ ONLY (Active Data Guard)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE OPEN READ ONLY;\nALTER DATABASE RECOVER MANAGED STANDBY DATABASE\nUSING CURRENT LOGFILE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Convert to Snapshot Standby<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;\nALTER DATABASE CONVERT TO SNAPSHOT STANDBY;\nALTER DATABASE OPEN;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Convert Snapshot Back to Physical Standby<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SHUTDOWN IMMEDIATE;\nSTARTUP MOUNT;\nALTER DATABASE CONVERT TO PHYSICAL STANDBY;\nSHUTDOWN IMMEDIATE;\nSTARTUP MOUNT;\nALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Data Guard Broker \u2013 Common Commands<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Show Configuration<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SHOW CONFIGURATION;\nDGMGRL&gt; SHOW DATABASE primary_db;\nDGMGRL&gt; SHOW DATABASE standby_db;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Switchover<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SWITCHOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Failover<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; FAILOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Enable Fast-Start Failover<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; ENABLE FAST_START FAILOVER;\nDGMGRL&gt; START OBSERVER;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>12. FINAL TIPS FOR INTERVIEW<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What Interviewers Focus On<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. Core Concepts (WHY, not just HOW)<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Why <strong>physical vs logical standby<\/strong><\/li>\n\n\n\n<li>Why <strong>SYNC vs ASYNC<\/strong><\/li>\n\n\n\n<li>Why <strong>Standby Redo Logs are mandatory<\/strong><\/li>\n\n\n\n<li>Why <strong>Broker simplifies operations<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. Troubleshooting Ability<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Expect questions like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u201cStandby is lagging by 2 hours \u2014 what do you check first?\u201d<\/li>\n\n\n\n<li>\u201cPrimary crashed \u2014 how do you proceed?\u201d<\/li>\n\n\n\n<li>\u201cArchive gap detected \u2014 how do you resolve it?\u201d<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. Best Practices<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Always mention:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Flashback Database<\/strong> for reinstatement<\/li>\n\n\n\n<li><strong>Data Guard Broker<\/strong> for automation<\/li>\n\n\n\n<li><strong>Regular monitoring and testing<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4. Hands-On Experience<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Explain what <strong>you have actually done<\/strong><\/li>\n\n\n\n<li>Mention DR drills you participated in<\/li>\n\n\n\n<li>Talk about issues faced and how you resolved them<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Interview Flow<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>Basic       \u2192 Physical vs Logical Standby\nIntermediate\u2192 Monitoring lag and health\nAdvanced    \u2192 Failover and recovery process\nScenario    \u2192 Primary crashed with lag on standby\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Prepare These Scenarios Thoroughly<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Switchover for Maintenance<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pre-checks<\/li>\n\n\n\n<li>Commands<\/li>\n\n\n\n<li>Validation<\/li>\n\n\n\n<li>Rollback plan<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Failover After Disaster<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Emergency response<\/li>\n\n\n\n<li>Data loss handling<\/li>\n\n\n\n<li>Rebuilding old primary<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. High Apply Lag<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Diagnosis (MRP, resources, network)<\/li>\n\n\n\n<li>Resolution (parallel apply, tuning)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Archive Gap Resolution<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Detection<\/li>\n\n\n\n<li>Manual copy and register<\/li>\n\n\n\n<li>FAL-based resolution<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Network Failure<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Impact on redo transport<\/li>\n\n\n\n<li>Monitoring indicators<\/li>\n\n\n\n<li>Recovery steps<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Final Interview Power Line<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cOracle Data Guard is not just about setup\u2014it\u2019s about monitoring, testing, and being ready to recover confidently during failures.\u201d<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quick Summary Oracle Data Guard is Oracle\u2019s disaster recovery (DR) and high availability (HA) solution that maintains one or more standby databases as synchronized copies of a primary database.It protects databases from data loss, downtime, and site failures, while also enabling read-only workloads on standby systems. 1. DATA GUARD FUNDAMENTALS What is Oracle Data Guard? [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5353,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1225],"tags":[],"class_list":["post-5349","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/5349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=5349"}],"version-history":[{"count":4,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/5349\/revisions"}],"predecessor-version":[{"id":5354,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/5349\/revisions\/5354"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media\/5353"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=5349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=5349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=5349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}