6 Replies Latest reply: Apr 18, 2013 6:08 AM by Mahir M. Quluzade RSS

    Enabling Archiving in a RAC DB

    Kavanagh
      DB, Grid version : 11.2.0.3

      I have a 3 node RAC DB which is currently in NOARCHIVELOG mode. I want to enable archiving of Redo Logs.

      LOG_ARCHIVE_FORMAT and LOG_ARCHIVE_DEST_1 parameters are already set.

      This is what I am planning to do to enable archiving .

      I'll shutdown the DB (ie. shutdown Instance 1,2 and 3) and then I'll start Instance 1 in MOUNT stage and then , I'll be issuing
      alter database archivelog;
      alter database open;
      Are the above steps correct ? My colleague suggested me to set CLUSTER_DATABASE = FALSE before the activity and revert it back to TRUE after archive enabling. But is it really required ?
        • 1. Re: Enabling Archiving in a RAC DB
          FreddieEssex
          My colleague suggested me to set CLUSTER_DATABASE = FALSE before the activity and revert it back to TRUE after archive enabling. But is it really required ?
          Yes !!

          Amendment: I'll retract that statement. That was the case for 9i and 10g. Just tested and doesn't look to be the case for 11g.

          Edited by: Freddie Essex on 17-Apr-2013 17:08
          • 2. Re: Enabling Archiving in a RAC DB
            Omega3
            You don't have to set CLUSTER_DATABASE = FALSE if you are having only one instance up when you enable archiving as you have mentioned in your plan. So, your steps are correct.

            Thanks Freddie. I didn't know that you have to set CLUSTER_DATABASE = FALSE in 10g for archive enabling.
            • 3. Re: Enabling Archiving in a RAC DB
              Mahir M. Quluzade
              Hi,

              You must use documented way.

              Steps in documentation.

              1. Connect to database from node1
              [oracle@rac1 ~]$ export ORACLE_SID=racdb1
              [oracle@rac1 ~]$ sqlplus / as sysdba
              1. Set cluster_database false
              SQL> alter system set cluster_database=false scope=spfile sid='racdb1';
              2. Stop Database all instamces
              [oracle@rac1 ~]$ srvctl stop database -d racdb
              3. Start instance 1 in mount mode via sqlplus
              [oracle@rac1 ~]$ sqlplus / as sysdba
              
              SQL> startup mount
              SQL> alter database archivelog;
              SQL> alter system set cluster_database=true scope=spfile sid='racdb1';
              SQL> shutdown immediate
              4. Start the whole database.
              [oracle@rac1 ~]$ srvctl start database -d racdb
              5. Check log mode
              [oracle@rac1 ~]$ sqlplus / as sysdba
              
              SQL> archive log list;
              Database log mode Archive Mode
              Regards
              Mahir M. Quluzade
              • 4. Re: Enabling Archiving in a RAC DB
                Hemant K Chitale
                Mahir,

                As Freddie pointed out, you don't need to set CLUSTER_DATABASE=TRUE in 11g.

                See "Archiving Mode in RAC" at http://docs.oracle.com/cd/E11882_01/rac.112/e16795/rman.htm#i491246
                "You can run the ALTER DATABASE SQL statement to change the archiving mode in Oracle RAC, because the database is mounted by the local instance but not open in any instances. _You do not need to modify parameter settings to run this statement_." (Underlining of sentence by me)

                (although it doesn't make the exact sequence of commands clear here in this document but refers to the Oracle Database Administrator's Guide http://docs.oracle.com/cd/E11882_01/server.112/e25494/archredo.htm#ADMIN008)


                Hemant K Chitale
                • 5. Re: Enabling Archiving in a RAC DB
                  Kavanagh
                  Hi Hemant,
                  Thank you for the Documentation URL

                  Hi Freddie, Omega3
                  Thanks for the correct answer

                  Hi Mahir,
                  Thanks for the example. It will come handy when I enable archiving in 10g.
                  • 6. Re: Enabling Archiving in a RAC DB
                    Mahir M. Quluzade
                    You are welcome Kavanagh!

                    Dear Hemant thanks for correction. You are right CLUSTER_DATABASE=FALSE is not need.
                    I confused versions.