---------- Forwarded message ----------
From:
K Raj Tilak <kraj...@yahoo.com>
Date: Fri, May 9, 2014 at 11:34 AM
Subject: 11g Manually creating for Rac database
To:
pavi.sha...@gmail.com,
jaff...@gmail.com,
selva...@gmail.com,
nagara...@gmail.com,
santynik...@gmail.com,
prakas...@gmail.com,
d.vi...@gmail.com,
apkka...@gmail.com
Hi Team,
11g Manually creating for Rac database.
Create a pfile.
$cd $ORACLE_HOME/dbs
vi initsam.ora
control_files='/shared_data/sam/control01.ctl'
compatible='11.1.0.6.0'
db_create_file_dest='/shared_data/sam/'
db_name='sam'
sga_target = 1600M
undo_management='AUTO'
undo_tablespace='UND1'
create a create script in /shared_data/sam/create.sql
create database sam
datafile size 400m autoextend on
sysaux datafile size 450m autoextend on
default temporary tablespace temp tempfile size 200m autoextend on
undo tablespace und1 datafile size 300m autoextend on
logfile
group 1 size 40m,
group 2 size 40m,
group 3 size 40m
/
$ export ORACLE_SID=sam
$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Sat May 19 12:37:47 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1046224896 bytes
Fixed Size 1304532 bytes
Variable Size 255854636 bytes
Database Buffers 784334848 bytes
Redo Buffers 4730880 bytes
SQL> @/shared_data/sam/create.sql
Database created.
SQL> CREATE UNDO TABLESPACE UND2 DATAFILE SIZE 200M;
Tablespace created.
SQL> ALTER DATABASE ADD LOGFILE THREAD 2
2 GROUP 4 SIZE 50M;
Database altered.
SQL> ALTER DATABASE ADD LOGFILE THREAD 2
2 GROUP 5 SIZE 50M,
3 GROUP 6 SIZE 50M;
Database altered.
SQL> shut immediate
copy the pfile and rename it and add the lines.
$ cd /u01/app/oracle/product/11.1.0/db_1/dbs/
$ cp initsam.ora initsam1.ora
$ vi initsam1.ora
control_files='/shared_data/sam/control01.ctl'
compatible='11.1.0.6.0'
db_create_file_dest='/shared_data/sam/'
db_name='sam'
sga_target = 1600M
undo_management='AUTO'
undo_tablespace='UND1'
--> Add the following lines.
cluster_database_instances=2
cluster_database=true
sam1.instance_number=1
sam2.instance_number=2
sam2.thread=2
sam1.thread=1
undo_management='AUTO'
sam1.undo_tablespace='UND1'
sam2.undo_tablespace='UND2'
sam1.instance_name = sam1
sam2.instance_name = sam2
save & exit
$ export ORACLE_SID=sam1
$ sqlplus / as sysdba
sql> startup
sql> alter database enable public thread 2;
sql> SELECT INSTANCE_NAME FROM gv$instance;
sam1
Copy the pfile to rac2
$ scp initsam.ora oracle@rac2:/u01/app/oracle/product/11.1.0/db_1/dbs/initsam2.ora
In rac2 start the instance
[oracle@rac2 ~]$ export ORACLE_SID=sam2
[oracle@rac2 ~]$ sqlplus / as sysdba
SQL> startup
SQL> select instance_name from gv$instance;
INSTANCE_NAME
----------------
sam2
sam1
When you start the second database then only instance displayed two like sam1,sam2.
$ srvctl add database -d sam -o $ORACLE_HOME
$ srvclt add instance -d sam -i sam1 -n rac1
$ srvctl add instance -d sam -i sam2 -n rac2
$ srvctl start database -d sam
Run this script in any one of the node
$@?/rdbms/admin/catalog.sql
$@?/rdbms/admin/catproc.sql
$@?/rdbms/admin/catclust.sql
$@?/rdbms/admin/utlrp.sql
then add the listener,tnsname and orapwd file
Regards
Raj Tilak. K
+91-9600006747