Oracle11.2.0.3.0 ASM and RAC Database Deployment using CLI

Yesterday
one of our abroad client had requirement for deploy the rac database in existing production standby site setup of 2-node oracle11g rac + asm
Initially we tried to access the server through gui but we are unable to access the gui console of linux server from india

I came around the challenges of manual asm disk and rac db creation in production environment

I’m happy to share my experience

1 Verify the newly mapped multipath raw partition from san

#verify the multipath raw partition on os level inside both db node-1 and node-2
ll /dev/mapper/*
brw-rw—- 1 root disk 253, 20 Aug 3 17:01 /dev/mapper/oradata1
brw-rw—- 1 root disk 253, 11 May 7 21:11 /dev/mapper/oradata2

#You can cross check the multiple paths of shared raw partitions of san storage inside both db node-1 and node-2
multipath -ll
oradata1 (xxx) dm-20 HITACHI,DF600F
[size=850G][features=0][hwhandler=0][rw]
_ round-robin 0 [prio=1][active]
_ 1:0:0:20 sdas 66:192 [active][ready]
_ round-robin 0 [prio=1][enabled]
_ 2:0:0:20 sdav 66:240 [active][ready]
_ round-robin 0 [prio=0][enabled]
_ 1:0:1:20 sdap 66:144 [active][ready]
_ round-robin 0 [prio=0][enabled]
_ 2:0:1:20 sday 67:32 [active][ready]

oradata2 (yyy) dm-21 HITACHI,DF600F
[size=850G][features=0][hwhandler=0][rw]
_ round-robin 0 [prio=1][active]
_ 1:0:1:21 sdaq 66:160 [active][ready]
_ round-robin 0 [prio=1][enabled]
_ 2:0:1:21 sdaz 67:48 [active][ready]
_ round-robin 0 [prio=0][enabled]
_ 1:0:0:21 sdat 66:208 [active][ready]
_ round-robin 0 [prio=0][enabled]
_ 2:0:0:21 sdaw 67:0 [active][ready]

2 Format the Multipath raw partition of oradata10 & oradata11

#execute the below command in both the db node-1
fdisk /dev/mapper/oradata$
u
n
1
2048(skip 1MB offset)
enter
p
w

3 Kpartx the Multipath raw partition oradata10 & oradata11

#execute the below command in both the db node-1 and node-2
kpartx -a /dev/mapper/oradata$

Note:-
Here $ means 0,1,2 etc..

# verify the multipath raw partitions
ll /dev/mapper/*
brw-rw—- 1 root disk 253, 20 Aug 3 17:01 /dev/mapper/oradata1
brw-rw—- 1 root disk 253, 21 Aug 3 17:01 /dev/mapper/oradata1p1
brw-rw—- 1 root disk 253, 11 May 7 21:11 /dev/mapper/oradata2
brw-rw—- 1 root disk 253, 10 May 7 21:11 /dev/mapper/oradata2p2

4 Createdisk using Multipath formatted raw partition oradata1p1 & oradata2p1

Node-1
/usr/sbin/oracleasm createdisk ORCLDATA /dev/mapper/oradata1p1
/usr/sbin/oracleasm createdisk ORCLPFRA /dev/mapper/oradata2p1

5 Verify the disks on os level

Node-1
/usr/sbin/oracleasm listdisks
ORCLDATA
ORCLFRA

Node-2
/usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Scanning system for ASM disks…
Instantiating disk “ORCLDATA”
Instantiating disk “ORCLFRA”

/usr/sbin/oracleasm listdisks
ORCLDATA
ORCLFRA

6. Create the ASM Diskgroup in ASM Instance from CLI (without GUI)

#Veridy the v$asm_disk

SQL> set colsep “|”
SQL> set linesize 32767
SQL> set pagesize 10000
SQL> COLUMN group_number   FORMAT 99999
SQL> COLUMN disk_number    FORMAT 99999
SQL> COLUMN mount_status   FORMAT 99999
SQL> COLUMN header_status  FORMAT 99999
SQL> COLUMN state          FORMAT 99999
SQL> COLUMN path           FORMAT 99999
SQL>
SQL> SELECT group_number, disk_number, mount_status, header_status, state, path FROM   v$asm_disk;

GROUP_NUMBER“|”DISK_NUMBER“|”MOUNT_S“|”HEADER_STATU“|”STATE   “|”PATH
------------“|”-----------“|”-------“|”------------“|”--------“|”--------------
           0“|”          1“|”CLOSED “|”PROVISIONED “|”NORMAL  “|”ORCL:ORCLDATA
           0“|”          2“|”CLOSED “|”PROVISIONED “|”NORMAL  “|”ORCL:ORCLFRA

#Create ASM DISK


-bash-3.2$ sqlplus / as sysasm

SQL> CREATE DISKGROUP ORCLDATA EXTERNAL REDUNDANCY
  2  DISK 'ORCL:ORCLDATA'
  3  ATTRIBUTE 'au_size'='4M',
  4  'compatible.asm' = '11.2.0.0.0',
  5  'compatible.rdbms' = '11.2.0.0.0',
  6  'compatible.advm' = '11.2.0.0.0';

Diskgroup created.

SQL> CREATE DISKGROUP ORCLFRA EXTERNAL REDUNDANCY
  2  DISK 'ORCL:ORCLFRA'
  3  ATTRIBUTE 'au_size'='4M',
  4  'compatible.asm' = '11.2.0.0.0',
  5  'compatible.rdbms' = '11.2.0.0.0',
  6  'compatible.advm' = '11.2.0.0.0';

Diskgroup created.

#Check the v$asm_disk

SQL> set colsep “|”
SQL> set linesize 32767
SQL> set pagesize 10000
SQL> COLUMN group_number   FORMAT 99999
SQL> COLUMN disk_number    FORMAT 99999
SQL> COLUMN mount_status   FORMAT 99999
SQL> COLUMN header_status  FORMAT 99999
SQL> COLUMN state          FORMAT 99999
SQL> COLUMN path           FORMAT 99999
SQL>
SQL> SELECT group_number, disk_number, mount_status, header_status, state, path FROM   v$asm_disk;

GROUP_NUMBER“|”DISK_NUMBER“|”MOUNT_S“|”HEADER_STATU“|”STATE   “|”PATH
------------“|”-----------“|”-------“|”------------“|”--------“|”--------------
           7“|”          0“|”CACHED “|”MEMBER      “|”NORMAL  “|”ORCL:PIAPDATA
           8“|”          0“|”CACHED “|”MEMBER      “|”NORMAL  “|”ORCL:PIAPFRA

#Verify v$asm_diskgroup from node-1

sqlplus / as sysasm
set colsep “|”
set linesize 32767
set pagesize 10000
COLUMN  GROUP_NUMBER              FORMAT 9999
COLUMN  NAME                      FORMAT A10
COLUMN  SECTOR_SIZE               FORMAT 9999
COLUMN  BLOCK_SIZE                FORMAT 9999
COLUMN  ALLOCATION_UNIT_SIZE      FORMAT 9999999999
COLUMN  STATE                     FORMAT A10
COLUMN  TYPE                      FORMAT A8
COLUMN  TOTAL_MB                  FORMAT 999999
COLUMN  FREE_MB                   FORMAT 999999
COLUMN  HOT_USED_MB               FORMAT 9999
COLUMN  COLD_USED_MB              FORMAT 999999
COLUMN  REQUIRED_MIRROR_FREE_MB   FORMAT 999999
COLUMN  USABLE_FILE_MB            FORMAT 999999
COLUMN  OFFLINE_DISKS             FORMAT 9999
COLUMN  COMPATIBILITY             FORMAT A25
COLUMN  DATABASE_COMPATIBILITY    FORMAT A25
COLUMN  VOTING_FILES              FORMAT A5
SELECT * FROM v$asm_diskgroup;

GROUP_NUMBER“|”NAME      “|”SECTOR_SIZE“|”BLOCK_SIZE“|”ALLOCATION_UNIT_SIZE“|”STATE     “|”TYPE    “|”TOTAL_MB“|”FREE_MB“|”HOT_USED_MB“|”COLD_USED_MB“|”REQUIRED_MIRROR_FREE_MB“|”USABLE_FILE_MB“|”OFFLINE_DISKS“|”COMPATIBILITY            “|”DATABASE_COMPATIBILITY   “|”VOTIN
------------“|”----------“|”-----------“|”----------“|”--------------------“|”----------“|”--------“|”--------“|”-------“|”-----------“|”------------“|”-----------------------“|”--------------“|”-------------“|”-------------------------“|”-------------------------“|”-----
           7“|”ORCLDATA  “|”        512“|”      4096“|”             4194304“|”MOUNTED   “|”EXTERN  “|”  870396“|” 870316“|”          0“|”          80“|”                     0“|”         870316“|”            0“|”11.2.0.0.0               “|”11.2.0.0.0               “|”N
           8“|”ORCLFRA   “|”        512“|”      4096“|”             4194304“|”MOUNTED   “|”EXTERN  “|”  870396“|” 870316“|”          0“|”          80“|”                     0“|”         870316“|”            0“|”11.2.0.0.0               “|”11.2.0.0.0               “|”N

#Verify v$asm_diskgroup from node-2

sqlplus / as sysasm
set colsep “|”
set linesize 32767
set pagesize 10000
COLUMN  GROUP_NUMBER              FORMAT 9999
COLUMN  NAME                      FORMAT A10
COLUMN  SECTOR_SIZE               FORMAT 9999
COLUMN  BLOCK_SIZE                FORMAT 9999
COLUMN  ALLOCATION_UNIT_SIZE      FORMAT 9999999999
COLUMN  STATE                     FORMAT A10
COLUMN  TYPE                      FORMAT A8
COLUMN  TOTAL_MB                  FORMAT 999999
COLUMN  FREE_MB                   FORMAT 999999
COLUMN  HOT_USED_MB               FORMAT 9999
COLUMN  COLD_USED_MB              FORMAT 999999
COLUMN  REQUIRED_MIRROR_FREE_MB   FORMAT 999999
COLUMN  USABLE_FILE_MB            FORMAT 999999
COLUMN  OFFLINE_DISKS             FORMAT 9999
COLUMN  COMPATIBILITY             FORMAT A25
COLUMN  DATABASE_COMPATIBILITY    FORMAT A25
COLUMN  VOTING_FILES              FORMAT A5
SELECT * FROM v$asm_diskgroup;

GROUP_NUMBER“|”NAME      “|”SECTOR_SIZE“|”BLOCK_SIZE“|”ALLOCATION_UNIT_SIZE“|”STATE     “|”TYPE    “|”TOTAL_MB“|”FREE_MB“|”HOT_USED_MB“|”COLD_USED_MB“|”REQUIRED_MIRROR_FREE_MB“|”USABLE_FILE_MB“|”OFFLINE_DISKS“|”COMPATIBILITY            “|”DATABASE_COMPATIBILITY   “|”VOTIN
------------“|”----------“|”-----------“|”----------“|”--------------------“|”----------“|”--------“|”--------“|”-------“|”-----------“|”------------“|”-----------------------“|”--------------“|”-------------“|”-------------------------“|”-------------------------“|”-----
           0“|”ORCLDATA  “|”          0“|”      4096“|”                   0“|”DISMOUNTED“|”        “|”       0“|”      0“|”          0“|”           0“|”                     0“|”              0“|”            0“|”0.0.0.0.0                “|”0.0.0.0.0                “|”N
           0“|”ORCLFRA   “|”          0“|”      4096“|”                   0“|”DISMOUNTED“|”        “|”       0“|”      0“|”          0“|”           0“|”                     0“|”              0“|”            0“|”0.0.0.0.0                “|”0.0.0.0.0                “|”N

#We have to manually mount the both the asm diskgorup in node-2

-bash-3.2$ sqlplus / as sysasm

SQL> alter diskgroup ORCLDATA mount;

Diskgroup altered.

#Verify the v$asm_diskgroup

GROUP_NUMBER“|”NAME      “|”SECTOR_SIZE“|”BLOCK_SIZE“|”ALLOCATION_UNIT_SIZE“|”STATE     “|”TYPE    “|”TOTAL_MB“|”FREE_MB“|”HOT_USED_MB“|”COLD_USED_MB“|”REQUIRED_MIRROR_FREE_MB“|”USABLE_FILE_MB“|”OFFLINE_DISKS“|”COMPATIBILITY            “|”DATABASE_COMPATIBILITY   “|”VOTIN
------------“|”----------“|”-----------“|”----------“|”--------------------“|”----------“|”--------“|”--------“|”-------“|”-----------“|”------------“|”-----------------------“|”--------------“|”-------------“|”-------------------------“|”-------------------------“|”-----
           7“|”ORCLDATA  “|”        512“|”      4096“|”             4194304“|”MOUNTED   “|”EXTERN  “|”  870396“|” 870272“|”          0“|”         124“|”                     0“|”         870272“|”            0“|”11.2.0.0.0               “|”11.2.0.0.0               “|”N
           0“|”ORCLPFRA   “|”          0“|”      4096“|”                   0“|”DISMOUNTED“|”        “|”       0“|”      0“|”          0“|”           0“|”                     0“|”              0“|”            0“|”0.0.0.0.0                “|”0.0.0.0.0                “|”N

8 rows selected.


SQL> alter diskgroup ORCLFRA mount;

Diskgroup altered.

#Verify the v$asm_diskgroup
GROUP_NUMBER“|”NAME      “|”SECTOR_SIZE“|”BLOCK_SIZE“|”ALLOCATION_UNIT_SIZE“|”STATE     “|”TYPE    “|”TOTAL_MB“|”FREE_MB“|”HOT_USED_MB“|”COLD_USED_MB“|”REQUIRED_MIRROR_FREE_MB“|”USABLE_FILE_MB“|”OFFLINE_DISKS“|”COMPATIBILITY            “|”DATABASE_COMPATIBILITY   “|”VOTIN
------------“|”----------“|”-----------“|”----------“|”--------------------“|”----------“|”--------“|”--------“|”-------“|”-----------“|”------------“|”-----------------------“|”--------------“|”-------------“|”-------------------------“|”-------------------------“|”-----
           7“|”ORCLDATA  “|”        512“|”      4096“|”             4194304“|”MOUNTED   “|”EXTERN  “|”  870396“|” 870272“|”          0“|”         124“|”                     0“|”         870272“|”            0“|”11.2.0.0.0               “|”11.2.0.0.0               “|”N
           8“|”ORCLFRA   “|”        512“|”      4096“|”             4194304“|”MOUNTED   “|”EXTERN  “|”  870396“|” 870272“|”          0“|”         124“|”                     0“|”         870272“|”            0“|”11.2.0.0.0               “|”11.2.0.0.0               “|”N

7. Verify the ASM Disk and ASM Instance

#Verify the cluster resources
Note:- ASM Disk is automatically register inside the clusterware

./crsctl stat res -t
more  .....
ora.ORCLDATA.dg
               ONLINE  ONLINE       node-db1
               ONLINE  ONLINE       node-db2
ora.ORCLFRA.dg
               ONLINE  ONLINE       node-db1
               ONLINE  ONLINE       node-db2

# Verify the asm diskgroups using asmcmd command from both db node-1 and node-2

export ORACLE_SID=+ASM1
export ORACLE_HOME=/u01/app/11.2.0/grid

-bash-3.2$ asmcmd
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  4194304    870396   870272                0          870272              0             N  ORCLDATA/
MOUNTED  EXTERN  N         512   4096  4194304    870396   870272                0          870272              0             N  ORCLFRA/
ASMCMD> exit

now our asm task is finished 🙂
it’s time to move further …

8. Create Manual RAC database creation from CLI(without GUI)
#Prerequisites:- create manual directories


#os
mkdir -p /u01/app/oracle/admin/orcl/adump

#asm
asmcmd
cd +ORCLDATA
mkdir orcl
cd orcl
mkdir controlfile datafiles redologs spfile

cd +ORCLFRA
mkdir orcl
cd orcl
mkdir controlfile redologs archivelogs

#Step-1 Create the Initialization Parameter file
cd $ORACLE_HOME/dbs
vi orclinit1.ora

*.control_files='+ORCLDATA/piap/controlfile/orclcontrol01.ctl','+ORCLPFRA/piap/controlfile/orclcontrol02.ctl'
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.diagnostic_dest='/u01/app/oracle/diag/orcl'
*.compatible='11.2.0.0.0'
*.db_block_size=8192
*.db_name='orcl'
*.undo_management='AUTO'
piap1.instance_name = orcl1
memory_target=4g

#Prepare create database script ORCLRACDBCreation.sql

CREATE DATABASE ORCL
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
MAXINSTANCES 8
MAXLOGHISTORY 292
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 10240
character set al32utf8
LOGFILE
GROUP 1 ('+ORCLDATA/ORCL/redologs/redo01_a.log','+ORCLFRA/ORCL/redologs/redo01_b.log') SIZE 1024M BLOCKSIZE 512,
GROUP 2 ('+ORCLDATA/ORCL/redologs/redo02_a.log','+ORCLFRA/ORCL/redologs/redo02_b.log') SIZE 1024M BLOCKSIZE 512
DATAFILE '+ORCLDATA/ORCL/datafiles/system01.dbf' SIZE 800M AUTOEXTEND ON NEXT 10240K MAXSIZE 32767M EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE +ORCLDATA/ORCL/datafiles/sysaux01.dbf' SIZE 800M AUTOEXTEND ON NEXT 10240K MAXSIZE 32767M
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '+ORCLDATA/ORCL/datafiles/temp01.dbf' SIZE 200M AUTOEXTEND ON NEXT 1048576 MAXSIZE 32767M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576
UNDO TABLESPACE UNDOTBS1 DATAFILE '+ORCLDATA/ORCL/datafiles/undotbs01.dbf' SIZE 200M AUTOEXTEND ON NEXT 10M MAXSIZE 1000M;

#Step-2 Create the Single Instance Database
Start the Instance and Create the Database


export ORACLE_SID=orcl1
sqlplus / as sysdba
SQL> STARTUP NOMOUNT PFILE='$ORACLE_HOME/dbs/initorcl1.ora';

ORACLE instance started.

Total System Global Area 264241152 bytes
Fixed Size 1218868 bytes
Variable Size 88082124 bytes
Database Buffers 171966464 bytes
Redo Buffers 2973696 bytes

SQL>@ORCLRACDBCreation.sql

Database Created.

#You should create a user tablespace and make it the database default tablespace to avoid objects “accidentally” stored
in SYSTEM or SYSAUX.

CREATE TABLESPACE USERS DATAFILE '+ORCLDATA/orcl/datafiles/users01.dbf' SIZE 100M AUTOEXTEND ON NEXT 1024K MAXSIZE 32767M;
ALTER DATABASE DEFAULT TABLESPACE USERS;

#Step-3 Convert your single instance to a RAC database

#create UNDOTBS2 for instance2

CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE '+ORCLDATA/orcl/datafiles/undotbs02.dbf' SIZE 200M AUTOEXTEND ON NEXT 10M MAXSIZE 1000M;

#create redo group for thread 2

 ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 3 ('+ORCLDATA/orcl/redologs/redo03_a.log','+ORCLFRA/orcl/redologs/redo03_b.log') SIZE 1024M BLOCKSIZE 512;
 ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4 ('+ORCLDATA/orcl/redologs/redo04_a.log','+ORCLFRA/orcl/redologs/redo04_b.log') SIZE 1024M BLOCKSIZE 512;

Edit initorcl1.ora and add the cluster parameters:
vi $ORACLE_HOME/dbs/initorcl1.ora

*.cluster_database_instances=2
*.cluster_database=true
orcl1.instance_number=1
orcl2.instance_number=2
orcl2.thread=2
orcl1.thread=1
*.undo_management=’AUTO’
orcl1.undo_tablespace=’UNDOTBS1′
orcl2.undo_tablespace=’UNDOTBS2′
orcl1.instance_name = orcl1
orcl1.instance_name = orcl2

#Copy the Parameter file to second rac node
scp initorcl1.ora oracle@node-db2:$ORACLE_HOME/dbs/initorcl2.ora

Note:
Issue a “shutdown immediate” now, then start the instance. It should come up ok, you’ll find additional information in the alert.log about RAC specifics.
The important bit is the message stating that the database is mounted in shared mode (CLUSTER_DATABASE=TRUE).


#Shutdown and Start Node-1 instance "orcl1"
[oracle@node-db1 ~]$
SQL>SHUT IMMEDIATE
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP PFILE='$ORACLE_HOME/dbs/initorcl1.ora'
ORACLE instance started.
Total System Global Area 264241152 bytes
Fixed Size 1218868 bytes
Variable Size 88082124 bytes
Database Buffers 171966464 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database open.

SQL> SELECT NAME FROM V$CONTROLFILE;
NAME
--------------------------------------------------------------------------------
+ORCLDATA/orcl/controlfile/orclcontrol01.ctl
+ORCLFRA/orcl/controlfile/orclcontrol02.ctl

SQL> SHOW PARAMETER CLUSTER_DATABASE;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2

SQL> ALTER DATABASE ENABLE PUBLIC THREAD 2;

Database altered.

SQL> SELECT INSTANCE_NAME FROM gv$instance;

INSTANCE_NAME
----------------
orcl1

#Shutdown and Start Node-2 instance "orcl2"

export ORACLE_SID=orcl2

sqlplus '/as sysdba'

SQL> startup PFILE='$ORACLE_HOME/dbs/initorcl2.ora
ORACLE instance started.
Total System Global Area 264241152 bytes
Fixed Size 1218868 bytes
Variable Size 88082124 bytes
Database Buffers 171966464 bytes
Redo Buffers 2973696 bytes
Database mounted
Database open

SQL> select instance_name from gv$instance;

INSTANCE_NAME
----------------
orcl1
orcl2

#I don’t recmmend running RAC with pfiles, that never has been a good idea. Rather, I’d create the spfile in ASM:

SQL> create spfile='+ORADATA/orcl/spfile/spfileorcl.ora' from pfile;

File created.

rac node1
$vi $ORACLE_HOME/dbs/initorcl1.ora
SPFILE=’+ORCLDATA/orcl/spfile/spfileorcl.ora’

rac node2
$vi $ORACLE_HOME/dbs/initorcl2.ora
SPFILE=’+ORCLDATA/orcl/spfile/spfileorcl.ora’

#Step-4 Configure the listener and tnsnames

#Change the database listener parameter
ALTER SYSTEM SET local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=node-db1-vip)(PORT=1521))))' scope=both sid='orcl1';
ALTER SYSTEM SET local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=node-db2-vip)(PORT=1521))))' scope=both sid='orcl2';
ALTER SYSTEM SET remote_listener='prd-dubiotec-db-scan:1521' scope=both sid='*';

#Add the below entries in tnsnames.ora file in both db node-1 and node-2
cd $ORACLE_HOME/dbs
vi tnsnames.ora

orcl =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = node-db-scan)(PORT = 1521))
    (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = orcl)
   )
 )

orcl1 =
(DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = node-db1-vip)(PORT = 1521))
     (CONNECT_DATA =
       (SERVER = DEDICATED)
       (SERVICE_NAME = orcl)
       (INSTANCE_NAME = orcl1)
     )
 )

orcl2 =
(DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = node-db2-vip)(PORT = 1521))
   (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    (INSTANCE_NAME = orcl2)
   )
 )

#Step-5 Create the Password file

rac node-1

orapwd file=/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl1 password=oracle entries=5

rac node-2
orapwd file=/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl2 password=oracle entries=5

#Step-6 Run Data Dictionary Scripts:

@$ORACLE_HOME/rdbms/admin/catalog.sql
@$ORACLE_HOME/rdbms/admin/catproc.sql
@$ORACLE_HOME/rdbms/admin/catclust.sql
@$ORACLE_HOME/rdbms/admin/utlrp.sql
@$ORACLE_HOME/rdbms/admin/catbundle.sql psu apply;

#Step-7 Register the database and its instances with Clusterware as oracle

export ORACLE_HOME=/u02/app/oracle/product/11.1.0/db_1
bash-3.2$ echo $ORACLE_HOME

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
srvctl add database -d orcl -o $ORACLE_HOME
srvctl add instance -d orcl -i orcl1 -n node-db1
srvctl add instance -d orcl -i orcl2 -n node-db2

srvctl status database -d orcl

srvctl modify database -d orcl -p  '+ORCLDATA/orcl/spfile/spfileorcl.ora'

9. Post database Configuration


ALTER SYSTEM set sec_case_sensitive_logon=FALSE scope=both sid='*';

ALTER SYSTEM SET open_cursors=10000 scope=both sid='*';

ALTER SYSTEM SET processes=2500 scope=spfile sid='*';

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

ALTER SYSTEM SET session_cached_cursors=100 scope=spfile sid='*';

alter system set memory_target=8G scope=spfile sid='*';

alter system set log_archive_format='log%d_%t_%s_%r.arc' scope=spfile sid='*';

exec dbms_scheduler.disable('ORACLE_OCM.MGMT_CONFIG_JOB');
exec dbms_scheduler.disable('ORACLE_OCM.MGMT_STATS_CONFIG_JOB');

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s