First install three RPM:- Linux 5.4 os
oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686(2).rpm
oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm
oracleasm-support-2.1.7-1.el4.i386.rpm
**********Create_ASM_instance_11g_STEPS************
STEP: 1 (Login as a root user)
STEP: 2 (run localconfig script)
[root@sujeet ~]# cd /11g_install/app/sonujha/ product/11.1.0/
db_1/bin/
[root@sujeet bin]# ./localconfig add
STEP: 3 (Login as Database user, run crsctl script)
[root@sujeet bin]# su sonujha
[sonujha@sujeet bin]$ pwd
/11g_install/app/sonujha/product/11.1.0/db_1/bin
[sonujha@sujeet bin]$ ./crsctl check cssd
Cluster Synchronization Services appears healthy
STEP: 4 (Create Disks)
[sonujha@sujeet ~]$ dd if=/dev/zero of=disk1 bs=1k count=1000000
[sonujha@sujeet ~]$ dd if=/dev/zero of=disk2 bs=1k count=1000000
[sonujha@sujeet ~]$ ls -l
total 2001984
drwxr-xr-x 5 sonujha oinstall 4096 Sep 27 14:22 Desktop
-rw-r--r-- 1 sonujha oinstall 1024000000 Sep 27 14:20 disk1
-rw-r--r-- 1 sonujha oinstall 1024000000 Sep 27 14:21 disk2
-rw-r--r-- 1 sonujha oinstall 6181 Sep 21 17:05 java0.log
drwxrwx--- 5 sonujha oinstall 4096 Sep 21 09:59 oraInventory
STEP: 5 (login as a root user, create loops)
[sonujha@sujeet ~]$ su -
Password:
[root@sujeet ~]# losetup /dev/loop1 /home/sonujha/disk1
[root@sujeet ~]# losetup /dev/loop2 /home/sonujha/disk2
[root@sujeet ~]# raw /dev/raw/raw1 /dev/loop1
/dev/raw/raw1: bound to major 7, minor 1
[root@sujeet ~]# raw /dev/raw/raw2 /dev/loop2
/dev/raw/raw2: bound to major 7, minor 2
STEP: 6 (login as a root user, create raws)
[root@sujeet ~]# chown -R sonujha:oinstall /dev/raw/raw1
[root@sujeet ~]# chown -R sonujha:oinstall /dev/raw/raw2
STEP: 7 (Login as Database user, create dir. Give permission)
[root@sujeet ~]# su - sonujha
[sonujha@sujeet Airtel]$ pwd
/11g_install/app/sonujha/admin/Airtel
[sonujha@sujeet Airtel]$mkdir cdump
[sonujha@sujeet Airtel]$mkdir udump
[sonujha@sujeet Airtel]$mkdir bdump
[sonujha@sujeet admin]$ chown -R sonujha:oinstall Airtel/
[sonujha@sujeet admin]$ chmod -R 777 Airtel/
[sonujha@sujeet admin]$ ll
total 24
drwxrwxrwx 2 sonujha oinstall 4096 Sep 27 15:40 adump
drwxrwxrwx 2 sonujha oinstall 4096 Sep 27 16:00 bdump
drwxrwxrwx 2 sonujha oinstall 4096 Sep 27 15:53 cdump
drwxrwxrwx 2 sonujha oinstall 4096 Sep 19 10:00 dpdump
drwxrwxrwx 2 sonujha oinstall 4096 Sep 19 10:02 pfile
drwxrwxrwx 2 sonujha oinstall 4096 Sep 27 15:53 udump
STEP: 8 (create init+asm.ora file in dbs dir.)
[sonujha@sujeet sonujha]$ cd $ORACLE_HOME
[sonujha@sujeet db_1]$ cd dbs
[sonujha@sujeet dbs]$ ls
arch1_1_762630737.dbf hc_Airtel.dat initdw.ora orapwAirtel_org
arch1_2_762630737.dbf initairtel.ora~ init.ora spfileAirtel.ora_org
arch1_6_762256814.dbf initAirtel.ora lkAIRTEL
arch1_7_762256814.dbf initAirtel.ora~ lkDEFAULT
arch1_8_762256814.dbf initAirtel.ora_org orapwAirtel
[sonujha@sujeet dbs]$ vi init+asm.ora
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
asm_diskstring='/dev/raw/raw1','/dev/raw/raw2'
background_dump_dest='/11g_install/app/sonujha/admin/Airtel/bdump'
core_dump_dest='/11g_install/app/sonujha/admin/Airtel/cdump'
db_unique_name=+asm
instance_type=asm
large_pool_size=15m
user_dump_dest='/11g_install/app/sonujha/admin/Airtel/udump'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[sonujha@sujeet dbs]$ pwd
/11g_install/app/sonujha/product/11.1.0/db_1/dbs
[sonujha@sujeet dbs]$ ls
arch1_1_762630737.dbf hc_Airtel.dat init+asm.ora orapwAirtel
arch1_2_762630737.dbf initairtel.ora~ initdw.ora orapwAirtel_org
arch1_6_762256814.dbf initAirtel.ora init.ora spfileAirtel.ora_org
arch1_7_762256814.dbf initAirtel.ora~ lkAIRTEL
arch1_8_762256814.dbf initAirtel.ora_org lkDEFAULT
STEP: 9 (create password file)
[sonujha@sujeet dbs]$ orapwd file=pwdasm password=asm
[sonujha@sujeet dbs]$ ls
arch1_1_762630737.dbf hc_Airtel.dat init+asm.ora orapwAirtel
arch1_2_762630737.dbf initairtel.ora~ initdw.ora orapwAirtel_org
arch1_6_762256814.dbf initAirtel.ora init.ora pwdasm
arch1_7_762256814.dbf initAirtel.ora~ lkAIRTEL spfileAirtel.ora_org
arch1_8_762256814.dbf initAirtel.ora_org lkDEFAULT
STEP: 10 (login asm instance,nomount state)
[sonujha@sujeet dbs]$ export ORACLE_SID=+asm
[sonujha@sujeet dbs]$ sqlplus
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Sep 27 15:07:01 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to an idle instance.
SQL> startup nomount
STEP: 11 (create diskgroup)
SQL> create diskgroup data external redundancy disk '/dev/raw/raw1'
2 disk '/dev/raw/raw2';
Diskgroup created.
STEP: 12 (create pfile and spfile)
SQL> create spfile from pfile;
File created.
SQL> create pfile from spfile;
File created.
SQL> alter system set asm_diskgroups=data scope=spfile;
System altered.
SQL> startup force;
To configure database to ASM:-
[sonujha@sujeet Airtel]$ echo $ORACLE_SID=Airtel
+asm=Airtel
[sonujha@sujeet ~]$ echo $ORACLE_SID
Airtel
[sonujha@sujeet ~]$ rman target /
RMAN> alter database mount;
RMAN> backup as copy database format '+data';
RMAN> switch database to copy;
RMAN> alter database open;
database opened
RMAN> exit
Recovery Manager complete.
[sonujha@sujeet ~]$ sqlplus
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
+DATA/orcl1/datafile/system.256.762976835
+DATA/orcl1/datafile/sysaux.257.762976875
+DATA/orcl1/datafile/undotbs1.258.762976901
+DATA/orcl1/datafile/users.260.762976907
No comments:
Post a Comment