Saturday, July 3, 2010

Install Oracle RAC 11gR2 on Vmware with Windows 7 64-bit as host OS and Linux as guest OS (Part 7, Create RAC database with DBCA)

He is Beyond Birth



Index of all the posts of Gurpartap Singh's Blog

Logon to first node as oracle and run .oraenv and set to "crs" and run the following command and everything should be up:

oracle : rac1.rac.meditate.com : @crs : /home/oracle
$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA1.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1
ora.RECV1.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1
ora.eons ora.eons.type 0/3 0/ ONLINE ONLINE rac1
ora.gsd ora.gsd.type 0/5 0/ ONLINE ONLINE rac1
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac1
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1

oracle : rac1.rac.meditate.com : @crs : /home/oracle
$


Now on both nodes as oracle and edit /etc/oratab and enter the following line in the end.
DUMMY:/u01/app/oracle/product/11.2.0.1/dbhome_1:N


Now on node 1 execute . oraenv and set to DUMMY as :

$ . oraenv
ORACLE_SID = [crs] ? DUMMY
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0.1/dbhome_1 is /u01/app/oracle

oracle : rac1.rac.meditate.com : @DUMMY : /u01/app/oracle/product/11.2.0.1/dbhome_1
$


Now run dbca as:
$ dbca




Select "Oracle Real Application Database"




Select create database.



Select general purpose database.



Select Admin Managed,
I am naming the database as "simar"

Global Databse name : "simar.rac.meditate.com"
Sid Prefix: "simar"

Click Select all i.e. select both the nodes rac1 and rac2.




Uncheck "Configure Enterprise Manager"




Click Automatic Maintenance. and uncheck "Enable Automatic Maintenance tasks"



Click "Use the same administrative password for all accounts" and enter the password.




Click "yes"



Storage type, we will use ASM then click "Use Oracle-Managed files" in database area enter "+DATA1" and click next.




Click "Specify Flash Recovery Area" for flash recovery area enter "+RECV1", for Flash Recovery Area Size enter 3000MB. I will not enabler archiving at this point so uncheck enable archiving.



Check "Sample Schemas"



I will pick typical and memory size 0f 601 MB and click sizing:



Nothing to do here and click "Character Sets" and click "Use Unicode (AL32UTF8)".
Click connection method.







Nothing to do here ( I will use default i.e. dedicated") and click next.



Review all the settings and then click next













Click Finish.



and if you had clicked to generate the scripts, then it would create the scripts.



Click ok



and the database creation will start and the speed would vary as per the horse power of your computer. Have patience.



Click exit.




Thats it. Now the database is there :

Now on node one edit /etc/oratab and update the following entry :

simar:/u01/app/oracle/product/11.2.0.1/dbhome_1:N # line added by Agent
to
simar1:/u01/app/oracle/product/11.2.0.1/dbhome_1:N # line added by Agent
and on node 2
update it to
simar2:/u01/app/oracle/product/11.2.0.1/dbhome_1:N # line added by Agent
Now on node 1 .oraenv and change to crs

and do the following:

$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA1.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1
ora.RECV1.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1
ora.eons ora.eons.type 0/3 0/ ONLINE ONLINE rac1
ora.gsd ora.gsd.type 0/5 0/ ONLINE ONLINE rac1
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac1
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1
ora.simar.db ora....se.type 0/2 0/1 ONLINE ONLINE rac1

oracle : rac1.rac.meditate.com : @crs : /u01/app/oracle/product/11.2.0.1/dbhome_1
$
Now . oraenv and cd to simar and see both the instances are up:

oracle : rac1.rac.meditate.com : @simar1 : /u01/app/oracle/product/11.2.0.1/dbhome_1
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 1 18:30:27 2010

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> set line 300
SQL> select * from gv$instance;

INST_ID INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME STATUS PAR THREAD# ARCHIVE LOG_SWITCH_WAIT LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST BLO
---------- --------------- ---------------- ---------------------------------------------------------------- ----------------- ------------------ ------------ --- ---------- ------- --------------------------------------------- ---------- --- ----------------- ------------------ --------- ---
2 2 simar2 rac2.rac.meditate.com 11.2.0.1.0 01-JUL-10 OPEN YES 2 STOPPED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO
1 1 simar1 rac1.rac.meditate.com 11.2.0.1.0 01-JUL-10 OPEN YES 1 STOPPED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO

SQL>


Now shutdown the machines and take the backup. In the next part we will add third node to this RAC cluster and create a new instance of this database on new node.

Simply by contemplating on God, we cannot understand Him, even though we
may think hundreds of thousands of times.

Part 1 - Vmware Setup

Part 2 - Setup Base Brick Machine

Part 3 - SAN Setup

Part 4 - RAC VM Setup

Part 5 - Install Grid Infrastructure

Part 6 - Run asmca and Install RDBMS Software

Part 7 - Create RAC database with DBCA

Part 8 - Add node and instance to existing 11gR2 Cluster db

Part 9 - Delete node and inst from existing 11gR2 cluster db


2 comments:

  1. Hi Gurpartap,
    Node 1 is keep on rebooting when I tried to create RAC database(vmware on Windows 7) due to high I/O. can you pleas help me.

    ReplyDelete
  2. Sorry for the late reply. How much RAM do you have?

    ReplyDelete