Tuesday 25 February 2014

Oracle RAC RMAN Backup and Restore

Tried to prepare full documents to restore DB from PROD TO DEV


Make Copy of PROD DB in DEV == DB In RAC+ASM+RMAN


USING RMAN COLD BACK


Take a cold backup of RMAN as Under (we made a copy of DB with Netsnap to second location to use the cold backup and reduce network)


RMAN> connect target *
2> run
3> {
4> shutdown immediate;
5> startup mount;
6> allocate channel d01 type disk;
7> allocate channel d02 type disk;
8> allocate channel d03 type disk;
9> allocate channel d04 type disk;
10> allocate channel d05 type disk;
11> allocate channel d06 type disk;
12> backup database format '/d2/orabackup/RMAN/XXXPRD_%U'
13> include current controlfile;
14> }


ISSUE MORE CHANNELS TO COMPPLETE FAST AS ITS ON LOCAL DISK AND MAKE SURE WE HAVE SPACE AVAILABLE BEFORE FIRE


After its completion, ASK SA or you can do the FTP TO DEV DB Server all the RMAN backup Piece and start the PROD DB


Some IMPORTANT Point== Make sure you keep the RMAN backup Piece under same location where we took the back, or create same directory structure in DEV box


Shutdown the DEV Instances in RAC as under and before shutdown take backup of controlfile and also create a init file as you might be using spfile under ASM


srvctl stop instance -d xxxdev -i xxxdev01


srvctl stop instance -d xxxdev -i xxxdev02


Or


USE the Normal shutdown commands for both instances.


ASM Commands to removed the directory structure and also add the DISkGROUPS in ASM INSTANCE as UNDER


CHECK THE CURRENT structure in ASM sqlplus


SELECT name, type, total_mb, free_mb, required_mirror_free_mb,
usable_file_mb FROM V$ASM_DISKGROUP;



SELECT
name group_name
, sector_size sector_size
, block_size block_size
, allocation_unit_size allocation_unit_size
, state state
, type type
, total_mb total_mb
, (total_mb - free_mb) used_mb
,free_mb free_mb
, ROUND((1- (free_mb / total_mb))*100, 2) pct_used
FROM
v$asm_diskgroup
ORDER BY
name
/


===


Then CREATE THE DISKGROUP AS PER REQUIREMENT, under is the example


SQL> CREATE DISKGROUP xxxCTRL External REDUNDANCY DISK
'/orcl_san_links/asm/orcl_asm_rdw_ctrl1' size 10200M; 2


Diskgroup created.


SQL> CREATE DISKGROUP xxxREDO External REDUNDANCY DISK
'/orcl_san_links/asm/orcl_asm_rdw_redo1' size 10200M,
'/orcl_san_links/asm/orcl_asm_rdw_redo2' size 10200M; 2 3


Diskgroup created.


SQL> SELECT name from V$ASM_DISKgroup;


NAME
----------------------------------------
AAAADATA
xxxDATA
xxxARCH
xxxCTRL
xxxREDO



YOU CAN ADD THE DISK TO EXISTING GROUP AS UNDER


SQL> ALTER DISKGROUP xxxDATA ADD DISK '/dev/rdsk/c6t60A98000486E5850564A597964434473d0s0' NAME xxxDATA_0003;


Diskgroup altered.


OR
If you want to remove anything existing or created wrong then removed it as under


SQL> drop diskgroup xxxARCH including contents;


Diskgroup dropped.
---------------------------------------


CREATE DISKGROUP xxxARCH External REDUNDANCY DISK
'/orcl_san_links/asm/orcl_asm_rdw_arlogs1' SIZE 51100M,
'/orcl_san_links/asm/orcl_asm_rdw_arlogs2' SIZE 51100M,
'/orcl_san_links/asm/orcl_asm_rdw_arlogs3' SIZE 51100M,
'/orcl_san_links/asm/orcl_asm_rdw_arlogs4' SIZE 51100M;



Check the structure under ASM now, and remove the other physical files under ASM or create new Directories


mandy:/export/home/oracle $ asmcmd
ASMCMD> ls -lrt
State Type Rebal Name
cMOUNTED EXTERN N xxxREDO/
d MOUNTED EXTERN N xxxDATA/
MOUNTED EXTERN N xxxCTRL/
MOUNTED EXTERN N xxxARCH/
MOUNTED EXTERN N XXXDATA/


go the the Particular directory to remove the files under ASM


just use the simple unix command rm


create the new directory structure under ASM, like mkdir and sub directory (this is what you are keeping in initfile)



Also make the necessary changes under ASM initfile, if you are not using the spfile for ASM instance.


SHUTDOWN THE ASM instance and make necessary changes in init file on BOTH NODES (pointing to parameter diskgroups)
RESTART the ASM instance on both nodes and check the new file diskgroups mounted or not, if not then investigate more.





CURRENT SITUATION


1. YOU have RMAN COLD BACKUP PIECE ON DEV BOX
2. YOU HAD ADDED THE NEW DISKGROUPS UNDER ASM
3. TOOK BACKUP OF CONTROLFILE AND CREATED INIT FILE FROM EXISTING DEV DB
4. SHUTDOWN BOTH THE INSTANCES under RAC
5. REMOVED THE EXISTING PHYSICAL FILES UNDER ASM to CLEAR THE DB.


HERE IS THE NEW INIT FILE NOW to RESTORE THE DB, PLEASE NOTE WE ARE NOT CHANGING THE DB NAME AT THIS POINT, KEEPING PROD NAME in INIT, ALSO COMMENTING CLUSTER P*



***///


xxxdev02.__db_cache_size=872415232
xxxdev01.__db_cache_size=570425344
xxxdev01.__java_pool_size=16777216
xxxdev02.__java_pool_size=16777216
xxxdev01.__large_pool_size=33554432
xxxdev02.__large_pool_size=33554432
xxxdev01.__oracle_base='/opt/oracle/base'#ORACLE_BASE set from environment
xxxdev02.__oracle_base='/opt/oracle/base'#ORACLE_BASE set from environment
xxxdev01.__pga_aggregate_target=3875536896
xxxdev02.__pga_aggregate_target=3875536896
xxxdev01.__sga_target=1610612736
xxxdev02.__sga_target=1610612736
xxxdev01.__shared_io_pool_size=0
xxxdev02.__shared_io_pool_size=0
xxxdev02.__shared_pool_size=654311424
xxxdev01.__shared_pool_size=956301312
xxxdev02.__streams_pool_size=16777216
xxxdev01.__streams_pool_size=16777216
*.audit_file_dest='/opt/oracle/base/admin/xxxdev/adump'
*.audit_trail='db'
#*.cluster_database_instances=2
#*.cluster_database=true
*.compatible='11.1.0.0.0'
*.control_files='+xxxCTRL/xxxDEV/CONTROLFILE/current.256.713444083','+xxxCTRL/xxxDEV/CONTROLFILE/current.257.713444083','+xxxCTRL/xxxDEV/CON
TROLFILE/current.258.713444083'
*.db_block_size=8192
*.db_create_file_dest='+xxxDATA'
*.db_domain='citco.com'
*.db_name='xxxprd'
*.db_recovery_file_dest_size=104857600
*.db_recovery_file_dest='+xxxDATA'
*.diagnostic_dest='/opt/oracle/base'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=xxxdev0XDB)'
#xxxprd02.instance_number=2
#xxxprd01.instance_number=1
#xxxdev02.local_listener='LISTENER_xxxDEV02'
#xxxdev01.local_listener='LISTENER_xxxDEV01'
*.log_archive_dest_1='location=+xxxARCH/xxxDEV/ARCHIVELOG'
*.log_archive_format='xxxprd_%t_%s_%r.arc'
*.open_cursors=300
*.pga_aggregate_target=3865051136
*.processes=400
*.remote_listener=''
*.remote_login_passwordfile='exclusive'
*.sessions=445
*.sga_target=1610612736
xxxdev02.thread=2
xxxdev01.thread=1
*.undo_management='AUTO'
*.undo_retention=600
xxxprd02.undo_tablespace='UNDOTBS2'
xxxprd01.undo_tablespace='UNDOTBS1'



***///


TIME TO KICK RESTORE NOW


PLEASE NOTE, WE DON"T HAVE EVEN THE CONTROLFILE AT THIS POINT, we are DOING FIRST CONTROLFILE RESTORE


TRY TO START THE INSTANCE ON ONE NODE WITH NEW PFILE AS ABOVE in nomount stage, as we are restoring controlfile now as under then go to RMAN NOW


mandy:/d2/oraback/RDW/RMAN $ rman


Recovery Manager: Release 11.1.0.6.0 - Production on Thu Jan 13 13:20:40 2011


Copyright (c) 1982, 2007, Oracle. All rights reserved.


RMAN> connect target /


connected to target database: xxxDEV (not mounted)


RMAN> restore controlfile from '/d2/oraback/RDW/RMAN/control_qtluhq83_1_1';


Starting restore at 13-JAN-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=418 instance=xxxdev01 device type=DISK


channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
output file name=+xxxCTRL/xxxdev/controlfile/current.256.740323291
output file name=+xxxCTRL/xxxdev/controlfile/current.257.740323291
output file name=+xxxCTRL/xxxdev/controlfile/current.258.740323291
Finished restore at 13-JAN-11


RMAN> exit



SQL> alter database mount;


Database altered.



NOW WE CAN LIST THE BACKUP in RMAN EVEN, to see the last backup, if you want to use until SCN, but in hour case not required as we have COLD BACKUP.


NOW KICK THE RMAN RESTORE OF DATABASE, MAKE SURE you HAVE THE RMAN PIECE UNDER SAME DIRECTORY STRUCTURE at time of backup, AS CONTROLFILE IS LOOKING SAME LOCATION


RMAN>run
{
allocated channel d01 type disk;
allocated channel d02 type disk;
allocated channel d03 type disk;
allocated channel d04 type disk;
allocated channel d05 type disk;
allocated channel d06 type disk;
allocated channel d07 type disk;
allocated channel d08 type disk;
allocated channel d09 type disk;
restore database;
}


RESTORE COMPLETED IN almost 5 hours, without any issue


NOW TIME TO OPEN THE DATABASE NOW.


SQL> select open_mode from v$database;


OPEN_MODE
----------
MOUNTED


SQL> Alter database open resetlogs;



Database altered.


SQL> SQL>
SQL>
SQL> select open_mode from v$database;


OPEN_MODE
----------
READ WRITE


SQL> select name from v$database;


NAME
----------------------------------------
xxxPRD


SQL>
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +xxxARCH/xxxdev/archivelog
Oldest online log sequence 3
Next log sequence to archive 6
Current log sequence 6

Redo log script

Redo log script to see how many in day.


 select to_char(first_time, 'DD-MON-YYYY'),
count(*)
from v$loghist
where first_time > '01-JAN-2010' /* or any other date that may be relevant */
Group by to_char(first_time, 'DD-MON-YYYY')
Order by count(*) asc;

==============================
==============================

select inst_id, to_char(completion_time, 'DD HH24') day_hour, count(*)
from gv$archived_log
where completion_time > sysdate - 7
group by inst_id, to_char(completion_time, 'DD HH24')
order by inst_id, to_char(completion_time, 'DD HH24')
/

Rename Database 11GR2

RENAME DATABASE 11gR2

Shutdown the database
Start in Mount and see all the steps


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup mount
ORACLE instance started.


Total System Global Area 1.2831E+10 bytes
Fixed Size 2170304 bytes
Variable Size  2248147520  bytes
Database Buffers 1.0536E+10 bytes
Redo Buffers 44793856 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs]
[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] nid TARGET=system/XXXXX DBNAME=MANDYTEST1 SETNAME=Y


DBNEWID: Release 11.2.0.2.0 - Production on Thu Sep 29 13:27:29 2011


Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.


Connected to database MANPREET01 (DBID=3591888462)


Connected to server version 11.2.0


Control Files in database:
/d1/oradata/mandydb01/control01.ctl
/d1/oradata/mandydb01/control02.ctl
/d1/oradata/mandydb01/control03.ctl


Change database name of database MANPREET01 to MANDYTEST1? (Y/[N]) => Y


Proceeding with operation
Changing database name from MANPREET01 to MANDYTEST1
Control File /d1/oradata/mandydb01/control01.ctl - modified
Control File /d1/oradata/mandydb01/control02.ctl - modified
Control File /d1/oradata/mandydb01/control03.ctl - modified
Datafile /d1/oradata/mandydb01/system01.db - wrote new name
Datafile /d1/oradata/mandydb01/undotbs1.db - wrote new name
Datafile /d1/oradata/mandydb01/sysaux01.db - wrote new name
Control File /d1/oradata/mandydb01/control01.ctl - wrote new name
Control File /d1/oradata/mandydb01/control02.ctl - wrote new name
Control File /d1/oradata/mandydb01/control03.ctl - wrote new name
Instance shut down


Database name changed to MANDYTEST1.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID - Completed succesfully.



[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] vi initmandydb01.ora
"initmandydb01.ora" 49 lines, 2038 characters
'
*.db_name='MANDYTEST1'


[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] ls -lrt


-rw-r--r-- 1 oracle oinstall 2038 Sep 29 13:29 initmandydb01.ora


[oracle@can0sudb01a:mandydb01:/opt/oracle02/product/11.2.0/dbs] sqlplus "/as sysdba"


SQL*Plus: Release 11.2.0.2.0 Production on Thu Sep 29 13:30:11 2011


Copyright (c) 1982, 2010, Oracle. All rights reserved.


Connected to an idle instance.


SQL> startup
ORACLE instance started.


Total System Global Area 1.2831E+10 bytes
Fixed Size 2170304 bytes
Variable Size  2248147520  bytes
Database Buffers 1.0536E+10 bytes
Redo Buffers 44793856 bytes
Database mounted.
Database opened.
SQL>
SQL> SELECT name FROM v$database;


NAME
---------
MANDYTEST1


SQL> SHOW parameter db_name


NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
db_name string
MANDYTEST1

Hot Backup Script



For Data Guard on Small DB builds we can use the under mentioned Script also, which will help us to save time, and also we can use it for Hot backup as Old Fashion in case RMAN has some issues. or don't want to use it.


set echo on
spool hotbackup_script.log


ALTER TABLESPACE CHECK_LIST BEGIN BACKUP;
! cp /d1/oradata/manpreet01_data/manpreet/checklist_data01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE CHECK_LIST END BACKUP;


ALTER TABLESPACE REPORT_DATA BEGIN BACKUP;
! cp /d1/oradata/manpreet01_data/manpreet/compliancereport_data01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE REPORT_DATA END BACKUP;


ALTER TABLESPACE MENT_DATA BEGIN BACKUP;
! cp /d1/oradata/manpreet01_data/manpreet/payment_data01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE MENT_DATA END BACKUP;



ALTER TABLESPACE MNL_DATA BEGIN BACKUP;
!cp /d1/oradata/manpreet01_data/manpreet/pnleod01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE MNL_DATA END BACKUP;


ALTER TABLESPACE METRICS BEGIN BACKUP;
! cp /d1/oradata/manpreet01_data/manpreet/servicemetrics01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE METRICS END BACKUP;


ALTER TABLESPACE SYSAUX BEGIN BACKUP;
! cp /d1/oradata/manpreet01_data/manpreet/sysaux01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE SYSAUX END BACKUP;


ALTER TABLESPACE SYSTEM BEGIN BACKUP;
!cp /d1/oradata/manpreet01_data/manpreet/system01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE SYSTEM END BACKUP;


ALTER TABLESPACE TOOLS BEGIN BACKUP;
! cp /d1/oradata/manpreet01_data/manpreet/tools01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE TOOLS END BACKUP;


ALTER TABLESPACE UNDOTBS1 BEGIN BACKUP;
!cp /d1/oradata/manpreet01_data/manpreet/undotbs01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE UNDOTBS1 END BACKUP;


ALTER TABLESPACE USERS BEGIN BACKUP;
! cp /d1/oradata/manpreet01_data/manpreet/users01.dbf /d1/oradata/manpreet01_orabak/hotbk
ALTER TABLESPACE USERS END BACKUP;


ALTER SYSTEM SWITCH LOGFILE;
ALTER SYSTEM SWITCH LOGFILE;
ALTER SYSTEM SWITCH LOGFILE;
alter database create standby controlfile as '/d1/oradata/manpreet01_orabak/hotbk/control01.ctl';
spool off
exit;

Grant read only access to user

GRANT Read only (select) for Other users on second Schema

SPOOL select_privs.sql
select 'grant select on abc.'||table_name|| '  to readonly;' from dba_tables where owner='ABC';

select 'grant select on abc.'||view_name||  '  to readonly;' from dba_views where owner='ABC';
spool off

Modify the script and run it
@select_privs.sql

OR

SELECT 'GRANT ALL ON '||table_name||' TO XYZ;'
FROM   ALL_TABLES
WHERE  OWNER = 'ABC';

OR

You could put a package in each schema that you need to issue the grant from which will go through
all call each GRANT statement via an EXECUTE IMMEDIATE.


e.g.

   PROCEDURE GRANT_TABLES
   IS
   BEGIN

      FOR tab IN (SELECT table_name
                  FROM   all_tables
                  WHERE  owner = ABC) LOOP
         EXECUTE IMMEDIATE 'GRANT SELECT, INSERT, UPDATE, DELETE ON '||tab.table_name||' TO XYZ';
      END LOOP;
   END;


or you can do it as under

BEGIN
  FOR x IN (SELECT owner || '.' || table_name ownertab
            FROM   all_tables
            WHERE  owner IN ('XYZ'))
  LOOP
    EXECUTE IMMEDIATE 'GRANT SELECT ON ' || x.ownertab || ' TO abc_read_only';
  END LOOP;
END;
/

Saturday 22 February 2014

Cold Backup script with RMAN


Taking the backup of the database when db is down. But if we are using RMAN for backup we need to keep the database in mount state.

Copy the following contents to a file with name COLD_BACKUP_RMAN.rc

=============================================
run {
   shutdown immediate;
   startup mount;
   allocate channel dup1 device type disk;
   allocate channel dup2 device type disk;
   backup database;
   release channel dup1;
   release channel dup2;
   alter database open;
  }
=============================================

Now set the DB environment using your regular method then run the following command.

$ rman target / @COLD_BACKUP_RMAN.rc

ORA-00439

 ORA-00439: feature not enabled: Flashback Database
Error Description:
-------------------

While trying to enable flashback feature the error comes.

SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-00439: feature not enabled: Flashback Database


Error Explanation:
--------------------


Some feature is is not enabled in oracle database standard edition or Oracle database Standard Edition One. The most common feature is Real Application Clusters, Online index maintenance, Online table organization, Online table redefinition, Block-level media recovery,Parallel backup and recovery,Point-in-time tablespace recovery ,RMAN Backup Encryption, Unused Block Compression, Oracle Flashback Table, Oracle Flashback Database, Oracle Flashback Transaction Query, Restore Points.

So flashback database is disabled in standard edition or in standard one edition. To be able to flashback on you have to use enterprise edition.

You can check from,
Version:
---------
1)SQL> SELECT * FROM V$VERSION;
To know the options enabled in your database,

2)SQL> SELECT * FROM V$OPTION;

Pfile vs SPfile

Pfile vs SPfile [ID 249664.1]

                              Pfile vs SPfile


Until Oracle 8i DBAs have been using a text file called the pfile (parameter file) to store the database initialization parameters.

The pfile is read at instance startup time to get specific instance characteristics. Any changes made the pfile would only take effect when the database is restarted.

However, parameters that were dynamically alterable could be changed using the appropriate ALTER SYSTEM or ALTER SESSION statement, which would take effect immediately.

As of Oracle9i, new feature called the spfile (server parameter file). The spfile is a binary file that contains the same information as the old pfile.

The spfile is a server-side initialization parameter file; parameters stored in this file are persistent across database startups.

This makes all the changes made to the instance using the ALTER SYSTEM statement persistent. Oracle requires that you start an instance for the first time using the pfile and then create the spfile.

The server parameter file (also called SPFILE) is in a single location where all the necessary parameters are defined and stored. The defined parameter values are applicable for all the instances in the cluster.

The SPFILE permits dynamic changes without requiring you to bring down the instance.

You can still use the client side parameter file to manage parameter settings in Real Application Clusters; however, administrative convenience is sacrificed and the advantage of dynamic change is lost.

By default, if you do not specify PFILE in your STARTUP command, Oracle will use a server parameter file.


SERVER PARAMETER FILE ( SPFILE )
================================

A server parameter file is basically a repository for initialization parameters.

Initialization parameters stored in a SPFILE are persistent, meaning any parameter changes made while an instance is running can persist across instance shutdown and startup.

In this way, all the initialization parameters manually updated by ALTER SYSTEM SET commands become persistent.

It also provides a basis for the Oracle database server to self-tune.

Another advantage, particularly for multi-instance RAC systems, is that a single copy of the parameter file can be used by all instances. Even though a single file is used to specify parameters, it has different format styles to support both the common values for all instances, as well as the specific values for an individual instance.

A server parameter file is initially built from the traditional text initialization parameter file, using the create SPFILE statement. It is a binary file that cannot be browsed or edited with a text editor.

Oracle provides other interfaces for viewing and modifying parameter settings. At system startup, the default behavior of the STARTUP command is to read a SPFILE to obtain initialization parameter settings. If the STARTUP command doesn't have a PFILE clause, it reads the SPFILE from a location
specified by the operating system.

If you choose to use the traditional text initialization parameter file, you must specify the PFILE clause when issuing the STARTUP command.


SETTING THE SERVER PARAMETER FILE VALUES
=========================================

Use the SID designator to set instance-specific parameter values in the server parameter file.

For settings across the database, use a '*', and for a specific instance, set the prefix with SID as indicated below.

*.OPEN_CURSORS=400 # For database-wide setting
RACDB1.OPEN_CURSORS=800# For RACDB1 instance

Note that even though open_cursors is set at 400 for all instances in the first entry, the value of 800 remains in effect for the SID 'RACDB1'.

Some initialization parameters are dynamic since they can be modified using the ALTER SESSION or ALTER SYSTEM statement while an instance is running. Use the following syntax to dynamically alter
initialization parameters:

ALTER SESSION SET parameter_name = value
ALTER SYSTEM SET parameter_name = value [DEFERRED]

Use the SET clause of the ALTER SYSTEM statement to set or change initialization parameter values. Additionally, the SCOPE clause specifies the scope of a change as described below:

SCOPE = SPFILE

(For both static and dynamic parameters, changes are recorded in the spfile, to be given effect in the next restart.)

SCOPE = MEMORY

(For dynamic parameters, changes are applied in memory only. No static parameter change is allowed.)

SCOPE = BOTH

For dynamic parameters, the change is applied in both the server parameter file and memory. No static parameter change is allowed.)

For dynamic parameters, we can also specify the DEFERRED keyword. When specified, the change is effective only for future sessions.

HERE ARE A FEW EXAMPLES

===========================

The following statement affects all instances. However, the values are only effective for the current instances, they are not written to binary SPFILE.

ALTER SYSTEM SET OPEN_CURSORS=500 SID='*' SCOPE=MEMORY;

The next statement resets the value for the instance 'RACDB1'.
At this point, the database-wide setting becomes effective for SID of RACDB1.

ALTER SYSTEM RESET OPEN_CURSORS SCOPE=SPFILE sid='RACDB1';

To reset a parameter to its default value throughout the cluster database, use the command:

ALTER SYSTEM RESET OPEN_CURSORS SCOPE=SPFILE sid='*';


CREATING A SERVER PARAMETER FILE

=================================

The server parameter file is initially created from a text initialization parameter file (init.ora).

It must be created prior to its use in the STARTUP command.
The create SPFILE statement is used to create a server parameter file.

The following example creates a server parameter file from an initialization parameter file.

CREATE SPFILE FROM PFILE='/u01/oracle/product/920/dbs/initRAC1.ora';

Below is another example that illustrates creating a server parameter file and supplying a name.

CREATE SPFILE='/u01/oracle/product/920/dbs/racdb_spfile.ora'
FROM PFILE='/u01/oracle/product/920/dbs/init.ora';

EXPORTING THE SERVER PARAMETER FILE
===================================

We can export the server parameter file to create a traditional text initialization parameter file.

This would be useful for:
1) Creating backups of the server parameter file.
2) For diagnostic purposes to list all of the parameter values currently used by an instance.
3) Modifying the server parameter file by first exporting it, editing the output file, and then recreating it.

The following example creates a text initialization parameter file from the server parameter file:

CREATE PFILE FROM SPFILE;

The example below creates a text initialization parameter file from a server parameter file, where the names of the files are specified:

CREATE PFILE='/u01/oracle/product/920/dbs/racdb_init.ora'
FROM SPFILE='/u01/oracle/product/dbs/racdb_spfile.ora';

Refer to 'Oracle 9i Database Reference' for all the parameters that can be changed with an ALTER SYSTEM command...


IS MY DATABASE USING SPFILE ?

=============================

Am I using spfile or pfile ?

The following query will let you know..

1) SQL> SELECT name,value FROM v$parameter WHERE name = 'spfile';

NAME VALUE
---------- --------------------------------------------------
spfile /fsys1/oracle/product/9.2.0/spfileTEST.ora


2) SQL> show parameter spfile;

The v$spparameter view
The contents of the SPFILE can be obtained from the V$SPPARAMETER view:

SQL> ALTER SYSTEM SET timed_statistics=FALSE SCOPE=SPFILE;
System altered.

SQL> SELECT name,value FROM v$parameter WHERE name='timed_statistics';

NAME VALUE
-------------------- ---------------------
timed_statistics TRUE

SQL> SELECT name,value FROM v$spparameter WHERE name='timed_statistics';

NAME VALUE
-------------------- ---------------------
timed_statistics FALSE

ORA-01652: unable to extend temp segment by 128 in tablespace TEMP

ORA-01652: unable to extend temp segment by 128 in tablespace TEMP05
 
 
ORA-01652: unable to extend temp segment by string in tablespace string
 
 

Cause: Failed to allocate an extent of the required number of blocks for a temporary segment in the tablespace indicated.
 
 

Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the tablespace indicated.
 
 
 
For resolution you can use two methods by sql commands or through TOAD.
 
 
By using sql:
 
 
First of all check the status of your tablespace by using following queries.
 
 
SELECT tablespace_name, sum(bytes) free FROM DBA_FREE_SPACE
group by tablespace_name
order by tablespace_name
SELECT tablespace_name, round(sum(BYTES)/power(2,20)) TOTAL_MB
group by TABLESPACE_NAME
order by TABLESPACE_NAME
select * from dba_tablespaces where tablespace_name='TEMP05'
select * from dba_data_files where tablespace_name ='TEMP05'
select bytes/1024/1024 from dba_free_space where tablespace_name='TEMP05'
select bytes/1024/1024 mb from dba_TEMP_files where tablespace_name like'TEMP05'
select bytes/1024/1024/1024 gb from dba_TEMP_files where tablespace_name like'TEMP05'
Now extend or add new datafile to existing tablespace accordingly.
Extend tablespace:
ALTER DATABASE DATAFILE '<path_and_file_name>'
RESIZE <n>K|M|G|T|P|E;
e.g.
ALTER DATABASE DATAFILE '/u02/oracle/oradata/TEMP05.DBF'
RESIZE 1024 M
Add new datafile to existing tablespace:
ALTER TABLESPACE <tablespace_name>
ADD DATAFILE '<path_and_file_name>' SIZE <n>K|M|G|T|P|E;
ALTER TABLESPACE TEMP05 ADD TEMPFILE '/u02/oracle/oradata/TEMP05A.DBF' SIZE 1G AUTOEXTEND OFF
Where data file name must be change from the existing data file. Suppose if your TEMP05.DBF is full you should add new datafile by new name with existing file path TEMP05A.DBF.



By Using TOAD:
Login to TOAD






Now open SCHEMA BROWESER
You can open SCHEMA BROWSER by two ways as illustrated below.




Now go to Tablespaces tab and from the list select the Tablespace name which needs to extend as illustrated below.






Now if you want to extend the existing datafile then click on “Edit Button”. Otherwise click on “ADD Button” (which is illustrated after edit).
You can see current size of “TEMP05” is 1 GB we are going to extend it to 2 GB as illustrated below.


In below picture you can see “TEMP05” is resized to 2 GB.  


If we have to add new datafile then click on “ADD Button” a small window “TEMP file definition” will appear now click on “Find/Copy” button to find the path one more small window “Select a file name” will appear click “OK” button it will bring us back to previous window “TEMP file definition” as illustrated below. 




Now change the file name and change the datafile size and set other options as per requirement and click OK.






Now you can see new datafile “TEMP05A” in the list. Now click OK. That’s it.




Sunday 16 February 2014

Mount ocfs Error while adding Node to RAC cliuster


Error While mounting ocfs on the New node :
===================================
mount -t ocfs2 /dev/sdb1 /ocfs

mount.ocfs2: Transport endpoint is not connected while mounting /dev/sdb1 on /ocfs.



 /var/log/messages shows the following errors :
=====================================

Dec 18 17:07:34 rac3 kernel: (13487,0)2net_connect_expired:1444 ERROR: no connection established with node 1 after 10 seconds, giving up and returning errors.
Dec 18 17:07:34 rac3 kernel: (13544,0):dlm_request_join:786 ERROR: status = -107
Dec 18 17:07:34 rac3 kernel: (13544,0):dlm_try_to_join_domain:934 ERROR: status = -107
Dec 18 17:07:34 rac3 kernel: (13544,0):dlm_join_domain:1186 ERROR: status = -107
Dec 18 17:07:34 rac3 kernel: (13544,0):dlm_register_domain:1379 ERROR: status = -107
Dec 18 17:07:34 rac3 kernel: (13544,0)cfs2_dlm_init:2007 ERROR: status = -107
Dec 18 17:07:34 rac3 kernel: (13544,0)cfs2_mount_volume:1062 ERROR: status = -107
Dec 18 17:07:34 rac3 kernel: ocfs2: Unmounting device (8,17) on (node 2)
Dec 18 17:07:36 rac3 kernel: o2net: no longer connected to node rac1 (num 0) at 192.168.2.131:7777
Dec 18 17:09:02 rac3 sshd(pam_unix)[13643]: session opened for user root by root(uid=0)


Solution to the problem :
================================
1) Verified that entries in /etc/ocfs2/cluster.conf were fine on the new node. All nodes should have same cluster.conf

2) As root , Stopped cluster Services on the other RAC Nodes of the Cluster

crsctl stop crs

3) Unmounted the /ocfs file system on the other rac nodes of the cluster

umount /ocfs

4) mounted the /ocfs file system on the new rac node

5)Mount the /ocfs file system on the existing cluster rac nodes

 6) Start the CRS Services on the existing RAC nodes of the cluster.

crsctl start crs

Thursday 13 February 2014

IP Bonding on Linux

IP Bonding on Linux - Step by Step



NIC channel bonding allows multiple network cards to act as one, allowing increased bandwidth and redundancy.

Let's assume we have two network interfaces ("eth0" and "eth1") and we want to bond them so they look like a single interface ("bond0").

Add the following line to the "/etc/modprobe.conf" file.
alias bond0 bonding
The files defining the regular and bonded interfaces are located in the "/etc/sysconfig/network-scripts" directory. Create a new file called "ifcfg-bond0" for the bonded interface with the following contents (adjust the network parameters as applicable).
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.0.0
NETMASK=255.255.255.0
IPADDR=192.168.0.171
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"
A description of the bonding options is available here.
Amend the existing "ifcfg-eth0" and "ifcfg-eth1" files, adding the "MASTER" and "SLAVE" parameters. The contents of these files should look like this.
#eth0
DEVICE=eth0
MASTER=bond0
SLAVE=yes
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

#eth1
DEVICE=eth1
MASTER=bond0
SLAVE=yes
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
Restart the network service.
# service network restart
Shutting down interface bond0:                             [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface bond0:                               [  OK  ]
#
The bonded interface can be displayed using the ifconfig command, which shows "bond0" running as the master and both "eth0" and "eth1" running as slaves.
# ifconfig
bond0     Link encap:Ethernet  HWaddr 00:0C:29:0A:7D:5D  
          inet addr:192.168.0.171  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe0a:7d5d/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:15 errors:0 dropped:0 overruns:0 frame:0
          TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:964 (964.0 b)  TX bytes:16956 (16.5 KiB)

eth0      Link encap:Ethernet  HWaddr 00:0C:29:0A:7D:5D  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:152 (152.0 b)  TX bytes:16860 (16.4 KiB)
          Interrupt:59 Base address:0x2024 

eth1      Link encap:Ethernet  HWaddr 00:0C:29:0A:7D:5D  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:812 (812.0 b)  TX bytes:96 (96.0 b)
          Interrupt:67 Base address:0x20a4 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1843 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1843 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2757348 (2.6 MiB)  TX bytes:2757348 (2.6 MiB)

#
Once the bond is configured it acts like any other Ethernet device. For example, you can configure alias interfaces to handle multiple IP addresses, as shown below.
Create the "ifcfg-bond0:1" and "ifcfg-bond0:2" files in the "/etc/sysconfig/network-scripts" directory with the following contents.
# ifcfg-bond0:1 file contents
DEVICE=bond0:1
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.0.0
NETMASK=255.255.255.0
IPADDR=192.168.0.172
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"

# ifcfg-bond0:2 file contents
DEVICE=bond0:2
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.0.0
NETMASK=255.255.255.0
IPADDR=192.168.0.173
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"
Notice, the device names and IP addresses differ from the original "ifcfg-bond0" file.
Restart the network service for the changes to take effect.
# service network restart
Shutting down interface bond0:                             [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface bond0:                               [  OK  ]
#
The ifconfig command shows the three IP addresses being handled by the bond.
[root@wls11g-1 network-scripts]# ifconfig
bond0     Link encap:Ethernet  HWaddr 08:00:27:FC:F5:B7  
          inet addr:192.168.0.171  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:14635 errors:0 dropped:306 overruns:0 frame:0
          TX packets:7310 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:17571270 (16.7 MiB)  TX bytes:554475 (541.4 KiB)

bond0:1   Link encap:Ethernet  HWaddr 08:00:27:FC:F5:B7  
          inet addr:192.168.0.172  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1

bond0:2   Link encap:Ethernet  HWaddr 08:00:27:FC:F5:B7  
          inet addr:192.168.0.173  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 08:00:27:FC:F5:B7  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:1835 errors:0 dropped:0 overruns:0 frame:0
          TX packets:961 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:189616 (185.1 KiB)  TX bytes:129841 (126.7 KiB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:FC:F5:B7  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:12800 errors:0 dropped:306 overruns:0 frame:0
          TX packets:6349 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17381654 begin_of_the_skype_highlighting 17381654 FREE  end_of_the_skype_highlighting (16.5 MiB)  TX bytes:424634 (414.6 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1541 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1541 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3612733 (3.4 MiB)  TX bytes:3612733 (3.4 MiB)

# 

Note:- Following Steps are optional

 
[root@sdsidb01 etc]# cat modprobe.conf
alias eth0 bnx2
alias eth1 bnx2
alias eth2 bnx2
alias eth3 bnx2
alias scsi_hostadapter cciss
alias scsi_hostadapter1 ata_piix
alias scsi_hostadapter2 qla2xxx
alias bond0 bonding # Kernel Parameters
alias bond1 bonding #Kernel Parameters
options bond0 max_bonds=2 miimon=100 mode=1
options bond1 max_bonds=2 miimon=100 mode=1
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

[root@sdsidb01 etc]#


$ modprobe bonding

Restart the network, or restart the computer.

$ service network restart # Or restart computer

When the machine boots up check the proc settings.

$ cat /proc/net/bonding/bond0

Step by Step DNS Configuration on Linux

Step by step DNS Configuration on Linux
       Step by step DNS Configuration on Linux RHEL5/OEL5

Welcome to our page. In this page we are going to discuss about Domain Name Server(DNS) configuration. Later the same DNS configuration going to use Oracle 11g Release 2 Real Application Cluster (RAC) Installations.


Step 1 : Login as root and install below listed Bind RPM's.

rpm -Uvh bind-9.3.3-7.el5.i386.rpm \
bind-chroot-9.3.3-7.el5.i386.rpm \

bind-devel-9.3.3-7.el5.i386.rpm \

bind-libbind-devel-9.3.3-7.el5.i386.rpm \

bind-libs-9.3.3-7.el5.i386.rpm \

bind-sdb-9.3.3-7.el5.i386.rpm \

system-config-bind-4.0.3-2.el5.noarch.rpm \

caching-nameserver-9.3.3-7.el5.i386.rpm \
postgresql-libs-8.1.4-1.1.i386.rpm
 
Step 2: Verify the IP address for the DNS server. Use following command to check the IP address.

[root@dnc ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:7D:60:F3
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe7d:60f3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4919 (4.8 KiB) TX bytes:5628 (5.4 KiB)
Interrupt:67 Base address:0x2024

Step 3: There are four files we have to edit. Find the below easy steps to configure the DNS server.
1. Create a named.conf file using sample named.caching-nameserver.conf file.
[root@dnc ~]# cd /var/named/chroot/etc/
[root@dnc etc]# ls
localtime named.caching-nameserver.conf named.rfc1912.zones rndc.key
[root@dnc etc]#cp named.caching-nameserver.conf named.conf

2. Edit the named.conf file based on your configuration. For example.

options {
listen-on port 53 { 192.168.1.100; };
# listen-on-v6 port 53 { ::1; };
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        // Those options should be used carefully because they disable port
        // randomization
        // query-source port 53;
        // query-source-v6 port 53;
        allow-query { any; };
        allow-query-cache { localhost; };
        };
logging {
        channel default_debug {
        file "data/named.run";
        severity dynamic;
        };
};
view localhost_resolver {
        match-clients { any; };
        match-destinations { 192.168.1.100; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};

3. Edit named.rfc1912.zones file. Sample file given below.


zone "." IN {
              type hint;
              file "named.ca";
};
zone "india.com" IN {
                 type master;
                 file "forward.zone";
                 allow-update { none; };
};
zone "localhost" IN {
                 type master;
                 file "localhost.zone";
                 allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
                 type master;
                 file "reverse.zone";
                 allow-update { none; };
};
..

4. Change the permission to the above two files.

chgrp named named.conf

5. Change the directory to below location

cd /var/named/chroot/var/named
cp localdomain.zone forward.zone
cp named.local reverse.zone
 
6. Modify the forward.zone file. example

$TTL 86400
@          IN     SOA    dnc.india.com.  root.dnc.india.com. (
                         42 ; serial (d. adams)
                         3H ; refresh
                        15M ; retry
                         1W ; expiry
                         1D ) ; minimum
          IN   NS     dnc.india.com.
dnc       IN   A      192.168.1.100
 
7. Modify the reverse.zone file

$TTL 86400
@        IN     SOA    dnc.india.com.    root.dnc.india.com. (
                       1997022700 begin_of_the_skype_highlighting 1997022700 FREE  end_of_the_skype_highlighting ; Serial
                            28800 ; Refresh
                            14400 ; Retry
                          3600000 ; Expire
                          86400 ) ; Minimum
         IN   NS   dnc.india.com.
100      IN   PTR  dnc.india.com.

 
8. Change the ownership for both the files.

chgrp named reverse.zone
chgrp named forward.zone

9. make an entry to both /etc/hosts and /etc/resolve.conf files. The samples are below.

cat /etc/hosts
192.168.1.100 dnc.india.com dnc
cat /etc/resolve.conf
search india.com
namedserver 192.168.1.100

10. Restart the named services using below statement.

service named restart

11. Verify the DNS server using below statements


[root@dnc named]# dig dnc.india.com
; «» DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 «» dnc.india.com
;; global options: printcmd
;; Got answer:
;; -»HEADER«- opcode: QUERY, status: NOERROR, id: 1483
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;dnc.india.com. IN A
;; ANSWER SECTION:
dnc.india.com. 86400 IN A 192.168.1.100
;; AUTHORITY SECTION:
india.com. 86400 IN NS dnc.india.com.
;; Query time: 1 msec
;; SERVER: 192.168.1.100#53(192.168.1.100)
;; WHEN: Mon Aug 27 23:54:49 2012
;; MSG SIZE rcvd: 61

12. To check reverse the zone


[root@dnc named]# dig -x 192.168.1.100
; «» DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 «» -x 192.168.1.100
;; global options: printcmd
;; Got answer:
;; -»HEADER«- opcode: QUERY, status: NOERROR, id: 55949
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;100.1.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
100.1.168.192.in-addr.arpa. 86400 IN PTR dnc-priv.india.com.
100.1.168.192.in-addr.arpa. 86400 IN PTR dnc.india.com.
;; AUTHORITY SECTION:
1.168.192.in-addr.arpa. 86400 IN NS dnc.india.com.
;; ADDITIONAL SECTION:
dnc.india.com. 86400 IN A 192.168.1.100
;; Query time: 1 msec
;; SERVER: 192.168.1.100#53(192.168.1.100)
;; WHEN: Mon Aug 27 23:57:27 2012
;; MSG SIZE rcvd: 124

13. To verify DNS Server using nslookup

[root@dnc named]# nslookup dnc.india.com
Server: 192.168.1.100
Address: 192.168.1.100#53

Name: dnc.india.com
Address: 192.168.1.100

DNS server working fine now. Finally we got success.

14. For Oracle 11gR2 RAC Installation adding node Information in /var/named/chroot/var/named/forward.zone file on DNS server. 


$TTL    86400
@               IN SOA  dnc.india.com. root.dnc.india.com. (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
                IN NS           dnc.india.com.
dnc             IN A            192.168.1.100
kracnode1       IN A    192.168.1.50
kracnode2       IN A    192.168.1.51
kracnode1-vip   IN A    192.168.1.60
kracnode2-vip   IN A    192.168.1.61
kracnode-scan   IN A    192.168.1.70
kracnode-scan   IN A    192.168.1.71
kracnode-scan   IN A    192.168.1.72
15.  Restart named service as a root user.


[root@dnc named]# service named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]


16. Verify the SCAN names using nslookup. 


[root@dnc named]# nslookup kracnode-scan
Server:         192.168.1.100
Address:        192.168.1.100#53

Name:   kracnode-scan.india.com
Address: 192.168.1.72
Name:   kracnode-scan.india.com
Address: 192.168.1.70
Name:   kracnode-scan.india.com
Address: 192.168.1.71


17. Add below files in /etc/resolv.conf  file on all the nodes.

search india.com
nameserver 192.168.1.100



[oracle@krac1 ]# cat /etc/resolv.conf
search india.com
nameserver 192.168.1.100
[root@krac1 bin]# nslookup kracnode-scan
Server:         192.168.1.100
Address:        192.168.1.100#53

Name:   kracnode-scan.india.com
Address: 192.168.1.71
Name:   kracnode-scan.india.com
Address: 192.168.1.72
Name:   kracnode-scan.india.com
Address: 192.168.1.70

18. DNS server ready for Oracle 11gR2 RAC setup go ahead and start RAC installation using below blog.

Install Oracle RAC 11GR2 on Linux