{"id":703,"date":"2013-03-10T17:59:12","date_gmt":"2013-03-10T14:59:12","guid":{"rendered":"http:\/\/www.fatihacar.com\/blog\/?p=703"},"modified":"2015-11-27T14:47:31","modified_gmt":"2015-11-27T11:47:31","slug":"how-to-add-standby-logfile-in-oracle","status":"publish","type":"post","link":"http:\/\/www.fatihacar.com\/blog\/how-to-add-standby-logfile-in-oracle\/","title":{"rendered":"How to Add Standby Logfile in Oracle"},"content":{"rendered":"<p>If you want to use real-time apply Oracle Data Guard, you have to add standby logfile to standby database.<\/p>\n<p><strong>Show Logfiles Before Add<\/strong><\/p>\n<blockquote><p>\nSQL> select * from gv$logfile;<\/p>\n<p>INST_ID\tGROUP#\tSTATUS\tTYPE\tMEMBER\t                                IS_RECOVERY_DEST_FILE<br \/>\n1\t3\t\tONLINE\t+DATA\/testdb\/onlinelog\/group_3.14134123\tNO<br \/>\n1\t1\t\tONLINE\t+DATA\/testdb\/onlinelog\/group_1.35116731\tNO<br \/>\n1\t2\t\tONLINE\t+DATA\/testdb\/onlinelog\/group_2.32513245\tNO<br \/>\n1\t4\t\tONLINE\t+DATA\/testdb\/onlinelog\/group_4.12255335\tNO<br \/>\n1\t2\t\tONLINE\t+FRA\/testdb\/onlinelog\/group_2.13423425\tYES<br \/>\n1\t1\t\tONLINE\t+FRA\/testdb\/onlinelog\/group_1.53242411\tYES<br \/>\n1\t3\t\tONLINE\t+FRA\/testdb\/onlinelog\/group_3.34634123\tYES<br \/>\n1\t4\t\tONLINE\t+FRA\/testdb\/onlinelog\/group_4.32525244\tYES\n<\/p><\/blockquote>\n<p><strong>Add Standby Logfile ASM<\/strong><\/p>\n<blockquote><p>\nSQL> alter database add standby logfile &#8216;+DATA&#8217; size 52428800;\n<\/p><\/blockquote>\n<p><strong>Add Standby Logfile FileSystem<\/strong><\/p>\n<blockquote><p>\nSQL> alter database add standby logfile &#8216;\/oracle\/db\/datafile\/standby_redo01.rdo&#8217; size 52428800;\n<\/p><\/blockquote>\n<p><!--more--><br \/>\n<strong>Show Logfiles After Add<\/strong><\/p>\n<blockquote><p>\nSQL> select * from gv$logfile;<\/p>\n<p>INST_ID\tGROUP#\tSTATUS\tTYPE\tMEMBER\t                                IS_RECOVERY_DEST_FILE<br \/>\n1\t3\t\tONLINE\t+DATA\/testdb\/onlinelog\/group_3.14134123\tNO<br \/>\n1\t1\t\tONLINE\t+DATA\/testdb\/onlinelog\/group_1.35116731\tNO<br \/>\n1\t2\t\tONLINE\t+DATA\/testdb\/onlinelog\/group_2.32513245\tNO<br \/>\n1\t4\t\tONLINE\t+DATA\/testdb\/onlinelog\/group_4.12255335\tNO<br \/>\n1\t2\t\tONLINE\t+FRA\/testdb\/onlinelog\/group_2.13423425\tYES<br \/>\n1\t1\t\tONLINE\t+FRA\/testdb\/onlinelog\/group_1.53242411\tYES<br \/>\n1\t3\t\tONLINE\t+FRA\/testdb\/onlinelog\/group_3.34634123\tYES<br \/>\n1\t4\t\tONLINE\t+FRA\/testdb\/onlinelog\/group_4.32525244\tYES<br \/>\n1\t5\t\tSTANDBY\t+DATA\/testdb\/onlinelog\/group_5.42344234\tNO<br \/>\n1\t6\t\tSTANDBY\t+DATA\/testdb\/onlinelog\/group_6.90895675\tNO<br \/>\n1\t8\t\tSTANDBY\t+DATA\/testdb\/onlinelog\/group_8.45674886\tNO<br \/>\n1\t7\t\tSTANDBY\t+DATA\/testdb\/onlinelog\/group_7.87456844\tNO\n<\/p><\/blockquote>\n<p><strong>Alter Data Guard To Real-Time Apply<\/strong><\/p>\n<blockquote><p>\nSQL> alter database recover managed standby database using current logfile disconnect;\n<\/p><\/blockquote>\n<p>You can drop log file with below operation. Logfile status has to be &#8216;INACTIVE&#8217; when you drop logfile. You can look status at v$log dictionary view.<\/p>\n<p><strong>Drop Logfile<\/strong><\/p>\n<blockquote><p>\nSQL> alter database drop logfile group 8;\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>If you want to use real-time apply Oracle Data Guard, you have to add standby logfile to standby database. Show Logfiles Before Add SQL> select * from gv$logfile; INST_ID GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE 1 3 ONLINE +DATA\/testdb\/onlinelog\/group_3.14134123 NO 1 1 ONLINE +DATA\/testdb\/onlinelog\/group_1.35116731 NO 1 2 ONLINE +DATA\/testdb\/onlinelog\/group_2.32513245 NO 1 4 ONLINE +DATA\/testdb\/onlinelog\/group_4.12255335 NO 1&#8230;<\/p>\n","protected":false},"author":37,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9,20],"tags":[14,32,36],"class_list":["post-703","post","type-post","status-publish","format-standard","hentry","category-administration","category-oracle-backup-and-recovery","tag-database-administration","tag-oracle-administration","tag-oracle-data-guard"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p39NFI-bl","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/comments?post=703"}],"version-history":[{"count":15,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/703\/revisions"}],"predecessor-version":[{"id":1428,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/703\/revisions\/1428"}],"wp:attachment":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/media?parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/categories?post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/tags?post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}