Thursday, November 24, 2016

Install Oracle 11g Grid Infrastructure With Oracle Virtualbox

7:34 PM Posted by Dilli Raj Maharjan 1 comment

Create a VM on Oracle VM VirtualBox Manager.



























Type the Name, Type and Version and Click on Continue.



























Select appropriate size of RAM. I have selected 4096 MB and click on continue.



























I am using my existing virtual hard disk so I have selected "Use an existing virtual hard disk file" option and Virtual hard disk file. Those who do not have existing virtual hard disk, Please select "Create a virtual hard disk now" option and Click on Create.



























You new VM is ready. Now select VM and click on Setting to change additional settings.



























Disable audio.
















Click on Network and select host only adapter option. Click on ok to continue.






















Click on Start to start VM.



























VM has been started. Shutdown the VM for additional steps.
































Make Sure you have powered off the Virtual machine.

Add ASM disk to the VM. Make sure these drives are visible in the OS.
Click on VM -> Click on Setting -> Storage.


































Click on + sign right to the Controller: SATA 


































Click on "Choose existing disk"


































Select proper vdi file and Click on Open.




























Repeat it for all the asm disks.


Finally all the disks have been added. Now Click on OK.


































Start the VM and start creating partitions on the newly added disks.

Verify list of disks has been available with the fdisk command

fdisk -l | grep Disk | grep bytes


















Start Creating partition.

[root@OEL1 ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdb78f0d7

   Device Boot      Start         End      Blocks   Id  System

[root@OEL1 ~]# fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-261, default 261):
Using default value 261

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@OEL1 ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdb78f0d7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         261     2096451   83  Linux

We can copy the partition setting with sfdisk command
sfdisk -d /dev/sdb | sfdisk /dev/sdo






































Download following rpm files: oracleasm-support-2.1.8-1.el6.x86_64.rpm, oracleasmlib-2.0.4-1.el6.x86_64.rpm and execute yum install kmod-oracleasm to install oracleasm kernel model.


Configure ASM Kernel Module

/etc/init.d/oracleasm configure

Type following values 

Default user to own the driver interface: oracle
Default group to own the driver interface: oinstall
Start Oracle ASM library driver on boot (y/n): y
Scan for Oracle ASM disks on boot (y/n): y
















In the case the disk was already used and required cleanup execute following command to clean up the disk header to make sure the disk has not been already marked.


dd if=/dev/zero of=/dev/sdb1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdc1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdd1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sde1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdf1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdg1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdh1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdi1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdj1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdk1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdl1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdm1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdn1 bs=1024 count=1024
dd if=/dev/zero of=/dev/sdo1 bs=1024 count=1024






















Stamp Disk partition as the ASM Disk

/etc/init.d/oracleasm createdisk ASMDISK01 /dev/sdb1
/etc/init.d/oracleasm createdisk ASMDISK02 /dev/sdc1
/etc/init.d/oracleasm createdisk ASMDISK03 /dev/sdd1
/etc/init.d/oracleasm createdisk ASMDISK04 /dev/sde1
/etc/init.d/oracleasm createdisk ASMDISK05 /dev/sdf1
/etc/init.d/oracleasm createdisk ASMDISK06 /dev/sdg1
/etc/init.d/oracleasm createdisk ASMDISK07 /dev/sdh1
/etc/init.d/oracleasm createdisk ASMDISK08 /dev/sdi1
/etc/init.d/oracleasm createdisk ASMDISK09 /dev/sdj1
/etc/init.d/oracleasm createdisk ASMDISK10 /dev/sdk1
/etc/init.d/oracleasm createdisk ASMDISK11 /dev/sdl1
/etc/init.d/oracleasm createdisk ASMDISK12 /dev/sdm1
/etc/init.d/oracleasm createdisk ASMDISK13 /dev/sdn1
/etc/init.d/oracleasm createdisk ASMDISK14 /dev/sdo1



























View the list of the disk with following command

/etc/init.d/oracleasm listdisks

















Start grid installation.
Make sure you have exported environment variable ORACLE_HOME as the grid_home
change directory to grid software  and execute runInstaller


































Landing page after you execute ./runInstaller






























Select Skip Software Updates and Click on Next.































Select Configure Oracle Grid Infrastructure for Standalone Server and Click on Next.






























Add required Languages and click on Next.































Select Appropriate Disk Group Name, Redundancy, AU Size and candidate disks. In our case we have selected 6 disks from ASMDISK01-ASMDISK06 Click on Next to continue.






























Select Appropriate Password that meets the complexity Click on Next to continue.































Select dba for all group settings Click on Next to continue.

















Warning Message will be poped up simply click on Yes to continue.






























Select appropriate Oracle Base and Grid Software location Click on Next to continue.






























Select Inventory location and Click on Next to continue.






























Since we have low swap space it will warn for it.  Just select Ignore All and Click on Next to continue.












Warning message will be pop up simply click on Yes to continue.































Click on save response file.































Select proper location and the file name. Click on save.































Click on Install to begin installation.































Installation on progress ##########.










































Once Execute configuration script window pop up Open terminal and execute listed script as user root. Once execution is completed Click on OK.






























ASM configuration is on progress.































Installation completion window will be appeared. Click on Close to end the installation.

List the process that is related to Oracle High Availability Services and ASM background Process.
























  1. Install Oracle 11g Grid Infrastructure With Oracle Virtualbox
  2. ASM Disk Creation with asmca
  3. Install Oracle 11g R2 Software
  4. Create Oracle database with ASM Disk Group

Create Oracle database with ASM DISK Group

7:34 PM Posted by Dilli Raj Maharjan 1 comment







Set proper Oracle environment variables and execute dbca command to create new database.






























Once dbca is executed Click on Next to continue.





























Select Create a Database and Click on Next to continue.






























Select appropriate template and Click on Next to continue.






























Type Global Database name and SID value. Click on Next to continue.






























Select configure Enterprise Manager option and Click on Next to continue.






























Type Password for User Sys, System and other Admin users. Click on Next to continue.






























Select Automatic Storage Management (ASM) on Storage Type Click on Browse to select the appropriate Disk Group.























Select the Disk Group and Click on OK to continue.





























Once Disk group is select click on Next to continue.












Admin password for the ASM instance will be prompted. Type Administrative password of ASM instance and Click on OK to continue.





























Select Specify Fast Recovery Area and Click on Browse to select the disk group for the FRA.






























Once disk group for FRA is selected Click on Next to continue.





























Select Sample Schema, It will contains the hr schema and its objects. Click on Next to continue.






























Select the required memory size and Click on Next to continue.






























Type the number of processes required and Click on Next to continue.





























Select required character set and Click on Connection Mode to select required connection Mode.






























Select required connection mode and click on Next to continue.





























We can modify the location of the redo log file and controlfile. Click on Next to continue.









































Confirmation window will be displayed Click on Save as an HTML file to save the summary as the html file.


























Provide the summary file name and location an click on save to save the response file.




























Database creation will begin.




















Warning message will be displayed Click on OK to continue.

































Finally Summary will be displayed. Click on Exit to finish database creation. For password and user management Click on Password Management.


  1. Install Oracle 11g Grid Infrastructure With Oracle Virtualbox
  2. ASM Disk Creation with asmca
  3. Install Oracle 11g R2 Software
  4. Create Oracle database with ASM Disk Group