{"id":42,"date":"2011-07-05T12:30:53","date_gmt":"2011-07-05T12:30:53","guid":{"rendered":"http:\/\/selectsysdatefromdual.gnusystems.net\/?p=42"},"modified":"2011-07-08T15:31:45","modified_gmt":"2011-07-08T15:31:45","slug":"convert-11gr2-rac-database-to-archivelog-mode","status":"publish","type":"post","link":"https:\/\/selectsysdatefromdual.gnusystems.net\/?p=42","title":{"rendered":"Convert 11gR2 RAC database to archivelog mode"},"content":{"rendered":"<p>This guide is intended for Oracle medium\/low level administrators to have a reference for converting a non archive log Oracle 11gR2 RAC database into archive log mode.<\/p>\n<p>To do this, first of all we connect to the machine as the \u201coracle\u201d user and login the database as sysdba, then check the current mode of the database:<br \/>\n&nbsp;<\/p>\n<pre>egfh@andromeda-ascendant:~$ ssh oracle@192.168.69.141\r\noracle@192.168.69.141's password:\r\nLast login: Mon Jul  4 21:33:29 2011 from 192.168.69.187\r\n[oracle@rac1 ~]$ sqlplus '\/as sysdba' \r\n\r\nSQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 5 11:11:49 2011 \r\n\r\nCopyright (c) 1982, 2009, Oracle.  All rights reserved. \r\n\r\nConnected to:\r\nOracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production\r\nWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,\r\nData Mining and Real Application Testing options \r\n\r\nSQL&gt; archive log list\r\nDatabase log mode\t       No Archive Mode\r\nAutomatic archival\t       Disabled\r\nArchive destination\t       \/u01\/app\/oracle\/product\/11.2.0\/db_1\/dbs\/arch\r\nOldest online log sequence     26\r\nCurrent log sequence\t       27\r\nSQL&gt; exit\r\nDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production\r\nWith the Partitioning, Real Application Clusters, OLAP, Data Mining\r\nand Real Application Testing options<\/pre>\n<p>Then, we create the desired ASM archive log destination:<br \/>\n&nbsp;<br \/>\n[Note] We don&#8217;t really need to do this if we define on the next step just the diskgroup name (by default \u201c+DATA\u201d) on the SPFILE parameter \u201clog_archive_dest_1\u201d, but it&#8217;s very handy to know and control the location of the archive logs destination, specially if we want to play with it a bit afterwards as for creating a \u201cShell Scripted standby Oracle database\u201d.[\/Note]<br \/>\n&nbsp;<\/p>\n<pre>[oracle@rac1 ~]$ export ORACLE_HOME=\/u01\/app\/11.2.0\/grid\r\n[oracle@rac1 ~]$ export ORACLE_SID='+ASM1';\r\n[oracle@rac1 ~]$ asmcmd\r\nASMCMD&gt; cd DATA\/\r\nASMCMD&gt; ls\r\nORATEST\/\r\nRACORA\/\r\nrac-scan\/\r\nASMCMD&gt; cd RACORA\r\nASMCMD&gt; ls\r\nCONTROLFILE\/\r\nDATAFILE\/\r\nONLINELOG\/\r\nPARAMETERFILE\/\r\nTEMPFILE\/\r\nspfileRACORA.ora\r\nASMCMD&gt; mkdir ARCHIVELOG\r\nASMCMD&gt; cd ARCHIVELOG\r\nASMCMD&gt; pwd\r\n+DATA\/RACORA\/ARCHIVELOG\r\nASMCMD&gt; exit<\/pre>\n<p>Remember to change again the ORACLE_HOME and ORACLE_SID environment variables:<br \/>\n&nbsp;<\/p>\n<pre>[oracle@rac1 ~]$ export ORACLE_HOME=$ORACLE_BASE\/product\/11.2.0\/db_1\r\n[oracle@rac1 ~]$ export ORACLE_SID=RACORA1<\/pre>\n<p>Now, we stop the cluster database:<br \/>\n&nbsp;<\/p>\n<pre>[oracle@rac1 ~]$ srvctl stop database -d RACORA<\/pre>\n<p>We check that the other node\/s are not running the database&#8217;s instance:<br \/>\n&nbsp;<\/p>\n<pre>[oracle@rac1 ~]$ ps -ef|grep pmon\r\noracle    3666     1  0 10:47 ?        00:00:00 asm_pmon_+ASM1\r\noracle   13336 20632  0 12:02 pts\/0    00:00:00 grep pmon\r\n[oracle@rac1 ~]$ ssh rac2 ps -ef|grep pmon\r\noracle    3665     1  0 10:47 ?        00:00:00 asm_pmon_+ASM2<\/pre>\n<p>We start in nomount mode one single instance of the RAC:<br \/>\n&nbsp;<\/p>\n<pre>[oracle@rac1 ~]$ sqlplus '\/as sysdba'\r\nSQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 5 12:03:14 2011 \r\n\r\nCopyright (c) 1982, 2009, Oracle.  All rights reserved. \r\n\r\nConnected to an idle instance. \r\n\r\nSQL&gt; startup nomount;\r\nORACLE instance started. \r\n\r\nTotal System Global Area  521936896 bytes\r\nFixed Size\t\t    2214936 bytes\r\nVariable Size\t\t  318768104 bytes\r\nDatabase Buffers\t  197132288 bytes\r\nRedo Buffers\t\t    3821568 bytes<\/pre>\n<p>After that, we change the spfile parameters log_archive_start and log_archive_dest_1:<br \/>\n&nbsp;<\/p>\n<pre>SQL&gt; alter system set log_archive_start=TRUE SCOPE=SPFILE; \r\n\r\nSystem altered. \r\n\r\nSQL&gt; alter system set log_archive_dest_1='location=+DATA\/RACORA\/ARCHIVELOG' SCOPE=SPFILE; \r\n\r\nSystem altered.<\/pre>\n<p>Now we mount the database instance:<br \/>\n&nbsp;<\/p>\n<pre>SQL&gt; alter database mount; \r\n\r\nDatabase altered.<\/pre>\n<p>And finally, we set the database to archive log mode:<br \/>\n&nbsp;<\/p>\n<pre>SQL&gt; alter database archivelog;\r\nDatabase altered.<\/pre>\n<p>We can perform some checks after that&#8230;<br \/>\n&nbsp;<\/p>\n<pre>SQL&gt; archive log list\r\nDatabase log mode\t       Archive Mode\r\nAutomatic archival\t       Enabled\r\nArchive destination\t       +DATA\/racora\/archivelog\r\nOldest online log sequence     26\r\nNext log sequence to archive   27\r\nCurrent log sequence\t       27\r\nSQL&gt; alter system switch logfile; \r\n\r\nSystem altered. \r\n\r\nSQL&gt; archive log list\r\nDatabase log mode\t       Archive Mode\r\nAutomatic archival\t       Enabled\r\nArchive destination\t       +DATA\/racora\/archivelog\r\nOldest online log sequence     27\r\nNext log sequence to archive   28\r\nCurrent log sequence\t       28 \r\n\r\nSQL&gt; Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production\r\nWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,\r\nData Mining and Real Application Testing options\r\n[oracle@rac1 ~]$ export ORACLE_SID=RACORA1\r\n[oracle@rac1 ~]$ export ORACLE_HOME=\/u01\/app\/11.2.0\/grid\r\n[oracle@rac1 ~]$ export ORACLE_SID='+ASM1';\r\n[oracle@rac1 ~]$ asmcmd\r\nASMCMD&gt; cd DATA\/RACORA\/ARCHIVELOG\r\nASMCMD&gt; ls\r\n1_27_729858920.dbf\r\n2011_07_05\/<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide is intended for Oracle medium\/low level administrators to have a reference for converting a non archive log Oracle 11gR2 RAC database into archive log mode. To do this, first of all we connect to the machine as the \u201coracle\u201d user and login the database as sysdba, then check the current mode of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=\/wp\/v2\/posts\/42"}],"collection":[{"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":15,"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":98,"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions\/98"}],"wp:attachment":[{"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/selectsysdatefromdual.gnusystems.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}