Configure Backup of a Non Shared RAC Oracle Database

Publication Date:  2015-12-09 Views:  1423 Downloads:  9
Issue Description
Generally, and particularly for Single host environment database, backing up the Oracle Database in order to recover after a faulty state requires only to enable the archive log mode. However, when the Oracle Database system is buided on RAC, backing up the Oracle database can be more tedious, and this require some specific configurations.

The backup and recovery of the database depends on many factors but, the edition in which the database is running is also important:

1.   Each nodes of the RAC database is running the Oracle Enterprise Edition.

If each node of the RAC environment runs an enterprise edition, no need to share the archive log mode. In fact, if each of the nodes has its archive log mode enabled, a data backup can be run in one node and the backup process will be performed by parallelism in the two nodes. Each of the nodes will use its own channel for the backup process.

2.   None or one of the nodes is running the Oracle Enterprise Edition.

If none or one of the RAC environment nodes runs an enterprise edition, we need to share the archive log mode between the nodes. This means, all the nodes will share the same archive log, thus only one channel will be needed for the backup/recovery process. The following points are relevant for archive log mode sharing in a RAC Environment:
Alarm Information

After normal configuration without sharing Archive log mode, the following error is displayed in the  generated .out  file where your backup script is located.

Handling Process

1. check the log whether it is shared on  RAC

Please use the following command to check the oracle

RMAN> RUN {

ALLOCATE CHANNEL ch00 TYPE DISK connect 'SYS/SYS@ipcc1';

ALLOCATE CHANNEL ch01 TYPE DISK connect 'SYS/SYS@ipcc2';

crosscheck archivelog all;

RELEASE CHANNEL ch00;

RELEASE CHANNEL ch01;

}

using target database control file instead of recovery catalog allocated channel: ch00 channel ch00: SID=772 instance=ipcc1 device type=DISK
RMAN-06908: WARNING: operation will not run in parallel on the allocated channels
RMAN-06909: WARNING: parallelism require Enterprise Edition allocated channel: ch01
channel ch01: SID=771 instance=ipcc2 device type=DISK validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_33_859386548.dbf RECID=31 STAMP=874843752 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_34_859386548.dbf RECID=34 STAMP=874843758 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_35_859386548.dbf RECID=35 STAMP=874845990 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_36_859386548.dbf RECID=38 STAMP=874845997 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_37_859386548.dbf RECID=39 STAMP=874890849 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_38_859386548.dbf RECID=42 STAMP=874890856 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_39_859386548.dbf RECID=43 STAMP=874893106 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_40_859386548.dbf RECID=45 STAMP=874893112 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_41_859386548.dbf RECID=48 STAMP=874961818 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_42_859386548.dbf RECID=49 STAMP=874961820 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_43_859386548.dbf RECID=52 STAMP=874964055 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_44_859386548.dbf RECID=53 STAMP=874964058 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_45_859386548.dbf RECID=57 STAMP=875048658 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_46_859386548.dbf RECID=58 STAMP=875048664 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_47_859386548.dbf RECID=61 STAMP=875050918 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch1_48_859386548.dbf RECID=63 STAMP=875050921 Crosschecked 16 objects validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_22_859386548.dbf RECID=32 STAMP=874842095 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_23_859386548.dbf RECID=33 STAMP=874842098 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_24_859386548.dbf RECID=36 STAMP=874844333 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_25_859386548.dbf RECID=37 STAMP=874844336 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_26_859386548.dbf RECID=40 STAMP=874889187 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_27_859386548.dbf RECID=41 STAMP=874889190 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_28_859386548.dbf RECID=44 STAMP=874891443 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_29_859386548.dbf RECID=46 STAMP=874891449 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_30_859386548.dbf RECID=47 STAMP=874960145 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_31_859386548.dbf RECID=50 STAMP=874960151 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_32_859386548.dbf RECID=51 STAMP=874962383 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_33_859386548.dbf RECID=54 STAMP=874962387 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_34_859386548.dbf RECID=55 STAMP=874962390 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_35_859386548.dbf RECID=56 STAMP=875046977 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_36_859386548.dbf RECID=59 STAMP=875046983 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_37_859386548.dbf RECID=60 STAMP=875049237 validation succeeded for archived log
archived log file name=/opt/oracle/product/11gR2/db/dbs/arch2_38_859386548.dbf RECID=62 STAMP=875049240
Crosschecked 17 objects
released channel: ch00
released channel: ch01

1.2. When checking the logs in the previous page, you can find the following:



If the version is standard,  you can modify the archive log is shared as the node query, after reduce the channel only one ,backup the oracle RAC by referring on Single Node environment backup script.



If the output is like above, you are not using the Enterprise Edition. You thus need to configure the archive log mode to the shared state.

Root Cause
Your Oracle version on one or all of RAC Nodes is not Enterprise Edition. You need to configure to share the archive log mode on all nodes.
Solution

Before you share the archive log mode in the RAC database, check it first. For this purpose:

•  run the command “ archive log list;".

•  if the log is shared ,the directory should like this “+DATADG/nquery/archivelog/”



Also run the command:  “crosscheck archivelog all;”  in rman mode and check if the output seems like this:



Recovery Manager (RMAN) is an Oracle Database client that performs backup and recovery tasks on your databases and automates administration of your backup strategies. It greatly simplifies backing up, restoring, and recovering database files.

So, How to enable the shared mode?

In the RAC database, to use RMAN to perform hot backup, you must manually switch the database to the archivelog mode by referring to the following steps. In the RAC database, you cannot enable archive mode using MOUNT EXCLUSIVE. You must disable CLUSTER_DATABASE to change the database to archive mode before you restart CLUSTER_DATABASE.

NOTE: Perform the operations only on either node of the Database. You will perform the following operations when connected to the Database as oracle user using sqlplus.

1. Disable the database instance on Node 2.

shutdown immediate

2. Change the value of cluster_database to false on Node 1.

alter system set cluster_database=false scope=spfile;

3. Change the values of log_archive_format and log_archive_dest_1 on Node 1.

alter system set log_archive_format='ora11_%r_%t_%s.log' scope=spfile;

alter system set log_archive_dest='' scope=spfile;

alter system set log_archive_dest_1='LOCATION=+DG_ORA' scope=spfile;

NOTE: Here, +DG_ORA is the path where archive logs locate. Change the path based on the site requirements.

4. Change the database status to shut down on Node 1.

NOTICE: Perform the following operations on both nodes of the database:

shutdown immediate

5. Change the database status to mounted on Node 1.

startup mount

6. Change the database log mode to ARCHIVELOG on Node 1.

alter database ARCHIVELOG;

7. Change the database status to opened on Node 1.

alter database open;

8. Change the value of cluster_database to true on Node 1.

alter system set cluster_database=true scope=spfile;

9. Restart the database for the configuration to take effect on Node 1.

shutdown immediate

startup

10. Enable the database instance on Node 2.

Startup

NOTE: To prevent service interruption, it is recommended that you restart the database after all backups are complete.

NOTICE: Perform the following operations on both nodes of the database:

shutdown immediate

startup

Now run your backup policy. I recall that the backup script is the one used for an Oracle Single Host system. Following is an example of backup script:

Suggestions
Below some key steps to login the oracle database as admin

·   Connect to the database as oracle

su - oracle

·    Access the database with sqlplus

SQL*Plus is the command line interface to the Oracle Database.  The first step is to start SQL*Plus and connect to the database.

To start SQL*Plus on a Linux command line:

•    Make sure you are a oracle user:  su – oracle

•    Type the command to connect: sqlplus  ‘/ as sysdba’

END