
{"id":7242,"date":"2021-06-15T21:07:23","date_gmt":"2021-06-15T21:07:23","guid":{"rendered":"https:\/\/rax-stg-wp-aws.com\/blogs\/recover-a-physical-standby-database-by-using-an-incremental-backup\/"},"modified":"2026-11-03T19:28:17","modified_gmt":"2026-11-03T19:28:17","slug":"recover-a-physical-standby-database-by-using-an-incremental-backup","status":"publish","type":"blogs","link":"https:\/\/www.rackspace.com\/es\/blogs\/recover-a-physical-standby-database-by-using-an-incremental-backup\/","title":{"rendered":"Recover a physical standby database by using an incremental backup"},"content":{"rendered":"<p><strong>Introduction<\/strong><\/p>\n<p>A standby database is a consistent copy of the production database, which helps in production disasters, data loss, or corruption.<\/p>\n<p>The following reasons might account for a lag between a primary and a standby site:<\/p>\n<ol>\n<li>Network bandwidth issues between primary and standby databases.<\/li>\n<li>Unavailability of the standby database.<\/li>\n<li>Accidental deletion of archive redo data on the primary database.<\/li>\n<\/ol>\n<p>You can sync primary and standby environments by copying and applying archive logs from the primary site, but this process is very time-consuming.<\/p>\n<p>Another option is to recover the standby site using incremental RMAN backup of the primary site. You can also use this method when you have missing archived logs on the primary that the system never applied to the standby database.<\/p>\n<p><strong>Steps to recover a physical standby database by using an incremental RMAN backup<\/strong><\/p>\n<p>To set up this scenario, I manually removed some of the archive logs from the primary site to simulate corrupt logs or missing logs.&nbsp;<\/p>\n<p><strong>Step 1: Check the sync status of the primary and standby site<\/strong><\/p>\n<p>You need to take a quick look at the sync status between the primary (prod) and standby (stby).<\/p>\n<p>\nPrimary site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture1_49.png\" alt=\"standby db pic 1\" \/><\/p>\n<p>Standby site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture2_39.png\" alt=\"standby db pic 2\" \/><\/p>\n<p><strong>Step 2: Simulate a gap between the primary and standby&nbsp;<\/strong><br \/>\nYou need to log on to the primary database and alter <strong>LOG_ARCHIVE_DEST_STATE_2&nbsp;<\/strong>to <em>DEFER<\/em>. Then do the same manual log switches to generate some archive logs, thus creating a gap between primary and standby:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture3_40.png\" alt=\"standby db pic 3\" \/><\/p>\n<p>Now, if you take a look at the <strong>CURRENT_SCN<\/strong>&nbsp;between primary and standby, the standby isn&#8217;t catching up because you have manually disabled the sync.&nbsp;<\/p>\n<p>Primary site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture4_33.png\" alt=\"standby db pic 4\" \/><\/p>\n<p>Standby site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture5_30.png\" alt=\"standby db pic 5\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>If you now re-enable <strong>LOG_ARCHIVE_DEST_STATE_2<\/strong>, the standby automatically catches up. But you should not go for that option right away. To create a gap simulation, you need to delete the archive logs manually from the primary site.<\/p>\n<p>Ensure that in both sites, you do not have archive logs later than 232 and 218 for threads 1 and 2, respectively.<\/p>\n<p>Now, you need to re-enable <strong>LOG_ARCHIVE_DEST_STATE_2<\/strong>&nbsp;(set to <em>ENABLE<\/em>):<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture6_20.png\" alt=\"standby db pic 6\" \/><\/p>\n<p>As expected, the standby cannot continue applying the logs because some of the logs are missing from the primary site.<\/p>\n<p>Finally, cancel the recovery and shut down the standby instance:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture7_20.png\" alt=\"standby db pic 7\" \/><\/p>\n<p><strong>Step 3: Incremental backup&nbsp;<\/strong><\/p>\n<p>Log on to the primary and take an incremental backup from the last SCN applied at the standby:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture8a.png\" alt=\"standby db pic 8a\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture8b.png\" alt=\"standby db pic 8 b \" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture8c.png\" alt=\"standby pic 8 c\" \/><\/p>\n<p><strong>Step 4: Back up the standby control file&nbsp;<\/strong><\/p>\n<p>Now, back up the control file on the standby site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture9_16.png\" alt=\"standby db pic 9\" \/><\/p>\n<p><strong>&nbsp;Step 5: Ship the backups across to the standby site<\/strong><\/p>\n<p>Transfer the incremental backup that you just took to the standby site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture10_15.png\" alt=\"standby db pic 10\" \/><\/p>\n<p><strong>Step 6: Restore the standby control file<\/strong><\/p>\n<p>Restore the control file on the standby site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture11_16.png\" alt=\"standby pic 11\" \/><\/p>\n<p><strong>Note<\/strong>: Ensure that you manually remove the old control files before executing the preceding commands to confirm that you are using the control files.&nbsp;<\/p>\n<p>Log on as a grid user and remove the old control files:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture12a.png\" alt=\"standby db 12 a \" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture12b.png\" alt=\"standby db 12 b \" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture12c.png\" alt=\"standby db 12 c \" \/><\/p>\n<p><strong>Step 7: Catalog the backup pieces&nbsp;<\/strong><\/p>\n<p>Now, catalog the backup process:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture13a.png\" alt=\"standby db 13 a \" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture13b.png\" alt=\"standby db pic 13 b \" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture13c.png\" alt=\"standby db 13 c pic\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture13d.png\" alt=\"standby db 13 d \" \/><\/p>\n<p><strong>&nbsp;Step 8: Catalog existing data files<\/strong><\/p>\n<p>Also, catalog your existing data files:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture14_11.png\" alt=\"standby db pic 14\" \/><\/p>\n<p><strong>Step 9: Switch the existing data files&nbsp;<\/strong><\/p>\n<p>Switch all existing data files to their image copies<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture15_8.png\" alt=\"standby db pic 15\" \/><\/p>\n<p><strong>Step 10: Recover the database&nbsp;<\/strong><\/p>\n<p>Now, recover your database:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture16a.png\" alt=\"standby db 16a\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture16b.png\" alt=\"standby db pic 16 b\" \/><\/p>\n<p>&nbsp;This step concludes the standby refresh. Just a few more steps to go!<\/p>\n<p><strong>Step 11: Check the sync status<\/strong><\/p>\n<p>Take a quick look at the sequences across both sites. Notice that the standby &nbsp;caught up with the primary:<\/p>\n<p>Primary site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture17_9.png\" alt=\"db standby pic 17\" \/><\/p>\n<p>&nbsp;Standby site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture18_5.png\" alt=\"standby db pic 18\" \/><\/p>\n<p><strong>Step-12: Start Media Recovery&nbsp;<\/strong><\/p>\n<p>Start media recovery on the standby site:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26329-body-Picture19_4.png\" alt=\"standby db pic 19\" \/><\/p>\n<p><strong>Conclusion&nbsp;<\/strong><\/p>\n<p>With the help of the preceding steps, you can recover the standby site. Using an incremental backup of your production environment saves a considerable amount of time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recover a physical standby database by using an incremental backup<\/p>\n","protected":false},"author":2,"featured_media":7244,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"content-type":"","nid":"26329","content_type":"blog","created_by":"10130","authored_on":"2023-11-30T22:07:23+00:00","field_article_industries":"","tag_category":"Technical","field_blog_author_text":"By Rackspace Technical Staff","seo_description":"Recover standby site using incremental RMAN backup. Address data loss or corruption with an efficient method.\r\n","field_featured_image":"","insights_image":"\/wp-content\/uploads\/2026\/blog_technical_images\/26329-insights_image-database-technical-blog-2-insights.jpg","field_partners":"","rxt_platforms":"Oracle","product":"","publisheddate":"2021-06-15T21:07:23","rxt_solutions":"Databases, Data Management","opengraph_tag":"","x_tag":"","teaser_flag":"Technical Blog","seo_titile":"Recover Standby DB using Incremental Backup | Rackspace","field_topics":"","field_slug":"recover-a-physical-standby-database-by-using-an-incremental-backup","copied_media_ids":null,"referenced_media_ids":null,"footnotes":""},"categories":[178],"tags":[204],"class_list":["post-7242","blogs","type-blogs","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-technical"],"_links":{"self":[{"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/blogs\/7242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/blogs"}],"about":[{"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/types\/blogs"}],"author":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/comments?post=7242"}],"version-history":[{"count":2,"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/blogs\/7242\/revisions"}],"predecessor-version":[{"id":9243,"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/blogs\/7242\/revisions\/9243"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/media\/7244"}],"wp:attachment":[{"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/media?parent=7242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/categories?post=7242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rackspace.com\/es\/wp-json\/wp\/v2\/tags?post=7242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}