DOYENSYS Knowledge Portal

We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal

Monday, April 7, 2014

Step by Step Asm Instance And Database Creation

                                  Disk creation in vmware

Click Add Button

Click Next Button

Click Next Button

Click ide and next Button

Size 3gb
Click Next Button
Click Finish Button
Add another one disk 3g
Step:1 Partition the Disks
[root@DR ~]#fdisk -l
[root@DR ~]# fdisk /dev/hdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 6241.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-6241, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-6241, default 6241):
Using default value 6241
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
To follow the same steps to 2nd  disk to format
Step:2 RAW Device Setup
fdisk -l
vi /etc/udev/rules.d/63-oracle-raw.rules
ACTION=="add",KERNEL=="hdb1",RUN+="/bin/raw /dev/raw/raw1%N"
ACTION=="add",KERNEL=="hdd1",RUN+="/bin/raw /dev/raw/raw2%N"
step:3 Mapping the raw device
[root@DR ~]# /bin/raw /dev/raw/raw1 /dev/hdb1
/dev/raw/raw1:  bound to major 3, minor 65
[root@DR ~]# /bin/raw /dev/raw/raw2 /dev/hdd1
/dev/raw/raw2:  bound to major 22, minor 65
Step:4 Permissions
[root@DR ~]# chown -R oracle:oinstall /dev/raw/raw1
[root@DR ~]# chown -R oracle:oinstall /dev/raw/raw2
[root@DR ~]# chown 777 /dev/raw/raw2
[root@DR ~]# chown 777 /dev/raw/raw1
Step:5 To start the CSS
 cd /u01/app/oracle/product/10.2.0/db_1/bin
 ./localconfig add/delete
Step:6 ASM instance creation
su - oracle
[oracle@DR ~]$ cd $ORACLE_HOME/dbs
[oracle@DR dbs]$ ls –lrt
Creating asm instance pfile
vi init+asm25.ora
step:7 startup the asm instance
[oracle@upgrade ~]$ export ORACLE_SID=+asm25
[oracle@upgrade ~]$ sqlplus '/as sysdba'
SQL> select HEADER_STATUS,PATH,NAME from v$asm_disk;
creating diskgroup
create diskgroup sachin normal redundancy
failgroup  f1   disk  '/dev/raw/raw1'
failgroup  f2   disk  '/dev/raw/raw2';
SQL> select HEADER_STATUS,PATH,NAME from v$asm_disk;
step :1    Database creation
Creating database instance pfile
vi initproddb.ora
step:2 create directories
cd $ORACLE_BASE/admin
mkdir proddb
cd proddb
mkdir adump bdump cdump dpdump udump pfile
step:3 startup the database instance
export ORACLE_SID=proddb
sqlplus '/as sysdba'
startup nomount
step :4 create database
create database proddb
logfile group 1 ('+sachin') size 4M,
group 2 ('+sachin') size 4M
datafile '+sachin' size 300M
sysaux datafile '+DATA ';
step:4 run the scripts

1 comment:

Sridevi K said...

Sridevi Koduru (Senior Oracle Apps Trainer
LinkedIn profile -
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at | +91 - 9581017828.