Thursday, January 7, 2010

Creating an Oracle ASM Instance and Database

Hi,

As i explained in my previous post the configuration of Oracle ASM on Linux. Next step is to configure Oracle ASM Instance which will manage our data and our database software.

Here we go

1. Install Base Oracle software (Configuration Software only and ORACLE_SID=ORCL)
Installation of Oracle (You can find thousands of installation guides on google) here the one i found.

After installing Base Software we will install Oracle for ASM in another Oracle Home.

2. Setup your Environment variables to different location mainly ORACLE_HOME and ORACLE_SID
e.g
$ export ORACLE_SID = +ASM
$ export ORACLE_HOME=/u01/app/product/oracle/10.2.0/ASM

3. Run Oracle Installer runInstaller script as oracle user.

4. Select Advance installation  >  Enterprise Edition  > Specify Oracle ASM Home Name and Path

5. Select Configuration option Choose Software only.

6. Run the root.sh script in other terminal login as root comeback to Installer and OK exit the Installer.

7. Run localconfig script exists in $ORACLE_HOME/bin as root user
Note: Executing this command will create the Oracle Cluster Registry (OCR) keys.
$ ./localconfig add

8. Run dbca (Database configuration assistant to create database and instance) and Choose 'Congfiure Automatic Storage Management' Enter Password for SYS (ASM Instance)




8. Create two Disk groups Named DF1 to store datafiles and FRA1 for Flash Recovery area.  Choose Redundancy External. Redundancy has 3 options
High : Trice Mirroring required more disk space.
Normal: Double Mirroring at ASM level.
External : Mirroring is OS dependent.

9. Set ORACLE_HOME and ORACLE_SID to ORCL

10. Run dbca and Follow screen shots.
 
 
 
 
 
Note: Specify the Password of ASM Instance SYS user
 
 
 
 
 

11. After completing Creation of database  edit your /etc/oratab file and mark Y


12. Set ORACLE_SID = +ASM and ORACLE_HOME to ASM Home Start the Instance using sqlplus and then change ORACLE_SID to orcl and ORACLE_HOME to orcl home and start the instance of orcl.

$ sqlplus / as sysdba
SQL> startup

Any comments, queries or suggestions welcome i hope it helps

Cheers,
Baig

4 comments:

  1. Hi Sir,

    How to create ASM in Oracle_Developer_Day.ova?
    because it's doesn't show ASM in Enterprise Manager.

    Thank you so much

    ReplyDelete
    Replies
    1. Hi,

      I believe you have to create new instance . I haven't use Oracle developer day vms for database.

      Z

      Delete
  2. Hi,

    Could you please clarify my confusions?

    $ORACLE_HOME : /u02/app/oracle/product/10.2.0/db_1
    $ASM_HOME : /u02/app/oracle/product/10.2.0/asm_1 ==> never used for me

    How can i force css to use $ASM_HOME ? or
    How do i set +ASM instance to be up and running from $ASM_HOME ?

    Can you please provide me steps, what you did exactly



    ReplyDelete
    Replies
    1. Hi,

      You need to set ORACLE_SID = +ASM and ASM_HOME to the location to start the instance. I am kind of out of touch with DBA activities please refer to the latest Oracle docs

      Here is the step 12
      Set ORACLE_SID = +ASM and ORACLE_HOME to ASM Home Start the Instance using sqlplus and then change ORACLE_SID to orcl and ORACLE_HOME to orcl home and start the instance of orcl.

      Regards,
      Zeeshan

      Delete