{"id":191,"date":"2011-10-15T18:19:51","date_gmt":"2011-10-15T15:19:51","guid":{"rendered":"http:\/\/fatihacar.com\/blog\/?p=191"},"modified":"2013-02-14T11:42:20","modified_gmt":"2013-02-14T08:42:20","slug":"archivelog-mode-open-in-oracle","status":"publish","type":"post","link":"https:\/\/www.fatihacar.com\/blog\/archivelog-mode-open-in-oracle\/","title":{"rendered":"Archivelog Mode Open and Close in Oracle"},"content":{"rendered":"<p>Most of the High Availability features of Oracle require you to enable ARCHIVELOG mode for your database. When you enable this mode redo logs will be archived instead of overwritten. The archivelogs are stored in a seperate place usually can backed up regularly by your standard filesystem backup system. Archive logs are utilized by RMAN, Data Guard, Flashback and many others.<\/p>\n<p>You can set archilogs file format and destination. <\/p>\n<p><strong>Change archivelog file format and destination<\/strong><\/p>\n<blockquote><p>\nSQL> alter system set log_archive_format=&#8217;testdb_%t_%s_%r.arc&#8217; scope=spfile sid=&#8217;*&#8217;;<br \/>\nSQL> alter system set log_archive_dest_1=&#8217;LOCATION=+FRA&#8217; scope=both sid=&#8217;*&#8217;;\n<\/p><\/blockquote>\n<p>If you use Oracle RAC edition, you have to shutdown all instance. After you can change archivelog mode on one instance.<\/p>\n<p>You can use below commands for shutdown and startup database. If you are using RAC system below commands very useful.<\/p>\n<p><strong>Oracle Database Shutdown and Startup With srvctl command<\/strong><\/p>\n<blockquote><p>\n[oracle@testnode1~]# srvctl stop database -d testdb<br \/>\n[oracle@testnode1~]# srvctl start database -d testdb\n<\/p><\/blockquote>\n<p><strong>Enable Archivelog Mode<\/strong><\/p>\n<blockquote><p><strong>for show current mode<\/strong><br \/>\nSQL>select log_mode from v$database;<\/p>\n<p><strong>Note :<\/strong> If result is noarchivelog, the database is not archivelog mode.<\/p>\n<p>SQL>shutdown immediate;<br \/>\nSQL>startup mount;<br \/>\nSQL>alter database archivelog;<br \/>\nSQL>alter database open;<\/p>\n<p><strong>Note :<\/strong> Finally, Our database was enabled archivelog mode.<\/p><\/blockquote>\n<p><strong>Disable Archivelog Mode<\/strong><\/p>\n<blockquote><p>\nSQL>shutdown immediate;<br \/>\nSQL>startup mount;<br \/>\nSQL>alter database noarchivelog;<br \/>\nSQL>alter database open;\n<\/p><\/blockquote>\n<p><strong>Write Archivelogs Now<\/strong><\/p>\n<blockquote><p>SQL> alter system switch logfile;<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/fatihacar.com\/blog\/resimler\/archivelogmode.gif\" alt=\"\" title=\"Archive Log Mode Picture\" width=\"477\" height=\"445\" class=\"aligncenter size-full wp-image-194\" srcset=\"https:\/\/www.fatihacar.com\/blog\/resimler\/archivelogmode.gif 477w, https:\/\/www.fatihacar.com\/blog\/resimler\/archivelogmode-300x279.gif 300w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most of the High Availability features of Oracle require you to enable ARCHIVELOG mode for your database. When you enable this mode redo logs will be archived instead of overwritten. The archivelogs are stored in a seperate place usually can backed up regularly by your standard filesystem backup system. Archive logs are utilized by RMAN,&#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,90],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-administration","category-oracle-backup-and-recovery","tag-database-administration","tag-oracle"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p39NFI-35","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/comments?post=191"}],"version-history":[{"count":14,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"predecessor-version":[{"id":687,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/191\/revisions\/687"}],"wp:attachment":[{"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/tags?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}