0% found this document useful (0 votes)
62 views

Asm Documantation:: RPM - Ivh Oracleasmlib-2.0.2-1.i386.rpm ./oracleasm Enable

1. The document describes the steps to configure an ASM instance and create an Oracle RAC database using ASM on two nodes. 2. It involves creating an iSCSI volume on the NAS, installing the ASM rpm, configuring the ASM disks and creating the ASM instance. 3. Then an Oracle database is created using the ASM disk groups, control files and data files are placed on ASM, and the database is configured for RAC.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Asm Documantation:: RPM - Ivh Oracleasmlib-2.0.2-1.i386.rpm ./oracleasm Enable

1. The document describes the steps to configure an ASM instance and create an Oracle RAC database using ASM on two nodes. 2. It involves creating an iSCSI volume on the NAS, installing the ASM rpm, configuring the ASM disks and creating the ASM instance. 3. Then an Oracle database is created using the ASM disk groups, control files and data files are placed on ASM, and the database is configured for RAC.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

ASM DOCUMANTATION:

1. Take a browser, connect to NAS server using following URL:


https://<NAS serverIP>:446
2. Create a volume of size 2GB of type iscsi on the NAS server.
3. Again go to Volume  Existing Volumes option and Edit our slice.
4. After Allow both nodes fallowing screen.
5. Once reboot all the nodes.
6. After the reboot, give “fdisk –l” and we can find a new device on our nodes.
7. Then make a partition using “fdisk” command.
8. After install ASM rpm on both nodes using this command:
[root@rac1 stage]# rpm -ivh oracleasmlib-2.0.2-1.i386.rpm
9. [root@rac2 init.d]# ./oracleasm enable
Writing Oracle ASM library driver configuration: [ OK ]
Scanning system for ASM disks: [ OK ]
10. [root@rac2 init.d]# ./oracleasm configure
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [y]:
Fix permissions of Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: [ OK ]
Scanning system for ASM disks: [ OK ]
11. [root@rac2 init.d]# ./oracleasm createdisk asmdisk /dev/sda1
Marking disk "/dev/sda1" as an ASM disk: [ OK ]
12. [root@rac2 init.d]# ./oracleasm listdisks
ASMDISK
13. [root@rac2 init.d]# ./oracleasm scandisks
Scanning system for ASM disks: [ OK ]
14. [root@rac1 init.d]# ./oracleasm enable
15. [root@rac1 init.d]# ./oracleasm configure
16. [root@rac1 init.d]# ./oracleasm listdisks
ASMDISK
17. [root@rac1 init.d]# ./oracleasm scandisks

Create directory structure on both nodes:

18. [root@rac1 init.d]# su – oracle


19. [oracle@rac1 ~]$ mkdir -p /prod/asm/admin/{bdump,cdump,udump,pfile}
20. [oracle@rac1 asm]$ vi admin/pfile/initasm.ora
instance_type='asm'
large_pool_size=20m
core_dump_dest=/prod/asm/cdump
background_dump_dest=/prod/asm/bdump
user_dump_dest=/prod/asm/udump
asm_diskgroups='ASMDISK'
cluster_database=false
21. [oracle@rac1 ~]$ mkdir -p /oradata/asm/spfile
22. [oracle@rac1 asm]$ . asm1.env
23. [oracle@rac1 asm]$ sqlplus ‘/as sysdba’
24. SQL> create spfile='/oradata/asm/spfile/spfileasm.ora' from
pfile='/prod/asm/admin/pfile/initasm.ora';
File created.
25. SQL> startup nomount
ASM instance started

Total System Global Area 100663296 bytes


Fixed Size 1217932 bytes
Variable Size 74279540 bytes
ASM Cache 25165824 bytes
26. SQL> select path from v$asm_disk;
PATH
--------------------------------------------------
ORCL:ASMDISK
27. SQL> create diskgroup asmvol external redundancy disk 'ORCL:ASMDISK';
Diskgroup created.
28. [oracle@rac1 asm]$ asmcmd
ASMCMD> ls
ASMVOL/
29. SQL> alter system set cluster_database=true scope=spfile;
30. [oracle@rac1 asm]$ . asm1.env
31. [oracle@rac1 asm]$ sqlplus ‘/as sysdba’
32. SQL> startup
ASM instance started
Total System Global Area 100663296 bytes
Fixed Size 1217932 bytes
Variable Size 74279540 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
33. [oracle@rac2 malli]$ cd /prod/asm
34. [oracle@rac2 asm]$ vi asm.env
export ORACLE_HOME=/u01/app/oracle/product/10.2.0.1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=asm2
35. [oracle@rac2 asm]$ . asm.env
36. [oracle@rac2 asm]$ sqlplus '/as sysdba'
37. SQL> startup
ASM instance started

Total System Global Area 100663296 bytes


Fixed Size 1217932 bytes
Variable Size 74279540 bytes
ASM Cache 25165824 bytes
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
"ASMDISK"
38. SQL> alter diskgroup asmvol mount;
Diskgroup altered.

ASM DATABASE CREATION:

39. [oracle@rac2 asm]$ asmcmd


ASMCMD> ls
ASMVOL/
ASMCMD> cd ASMVOL
ASMCMD> mkdir 4bsasm
ASMCMD> cd 4bsasm
ASMCMD> mkdir oradata
40. EXIT
41. [oracle@rac2 ~]$ mkdir -p /prod/4bsasm/admin/{bdump,cdump,udump,pfile,craete}
42. [oracle@rac2 ~]$ cd /prod/4bsasm/admin/pfile
43. [oracle@rac2 pfile]$ vi init4bsasm.ora
db_name=4bsasm
global_names=true
background_dump_dest=/prod/4bsasm/admin/
bdump
core_dump_dest=/prod/4bsasm/admin/cdump
user_dump_dest=/prod/4bsasm/admin/udump
4bsasm1.thread=1
4bsasm2.thread=2
4bsasm1.undo_tablespace=undotbs1
4bsasm2.undo_tablespace=undotbs2
undo_management=auto
db_block_size=2048
4bsasm1.instance_number=1
4bsasm2.instance_number=2
shared_pool_size=150m
db_cache_size=150m
log_buffer=10000
control_files='
+ASMVOL/4bsasm/oradata/control01.ctl'
4bsasm1.instance_name=4bsasm1
4bsasm2.instance_name=4bsasm2
cluster_database=false
compatible=10.2.0
44. [oracle@rac2 admin]$ vi create/cr.sql
create database 4bsasm
datafile '+ASMVOL/4bsasm/oradata/oradata/system01.dbf' size 300m
sysaux
datafile '+ASMVOL/4bsasm/oradata/oradata/sysaux01.dbf' size 100m
undo tablespace undotbs1
datafile '+ASMVOL/4bsasm/oradata/oradata/undotbs01.dbf' size 50m
default temporary tablespace tempx
tempfile '+ASMVOL/4bsasm/oradata/oradata/tempx01.dbf' size 50m
logfile
group 1 '+ASMVOL/4bsasm/oradata/oradata/redo01.log' size 10m,
group 2 '+ASMVOL/4bsasm/oradata/oradata/redo02.log' size 10m
character set UTF8;

45. [oracle@rac2 admin]$ vi create/run.sql


@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/catclust.sql
conn system/manager
@?/sqlplus/admin/pupbld.sql
46. [oracle@rac2 4bsasm]$ vi 4bsasm.env
export ORACLE_HOME=/u01/app/oracle/product/10.2.0.1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=4bsasm2
47. [oracle@rac2 4bsasm]$ . 4bsasm.env
48. [oracle@rac2 4bsasm]$ sqlplus '/as sysdba'
49. SQL> create spfile='/oradata/asm/4bsasm/spfile/spfile4bsasm.ora' from
pfile='/prod/4bsasm/admin/pfile/init4bsasm.ora';
File created.

50. SQL> !vi /u01/app/oracle/product/10.2.0.1/dbs/init4bsasm2.ora


51. SQL> startup nomount
ORACLE instance started.

Total System Global Area 348127232 bytes


Fixed Size 1219352 bytes
Variable Size 184550632 bytes
Database Buffers 159383552 bytes
Redo Buffers 2973696 bytes
52. SQL>@/prod/4bsasm/admin/create/cr.sql
53. SQL>@/prod/4bsasm/admin/create/run.sql
54. SQL>conn /as sysdba
55. SQL> create undo tablespace undotbs2 datafile '+ASMVOL/4bsasm/oradata/undotbs02.dbf'
size 50m;
56. SQL> alter database add logfile thread 2
group 3 '+ASMVOL/4bsasm/oradata/redo03.log' size 8m,
group 4 '+ASMVOL/4bsasm/oradata/redo04.log' size 8m;
57. SQL> alter database enable public thread 2;
58. SQL> alter system set cluster_database=true scope=spfile;
59. SQL>shut
60. SQL>startup
61. [oracle@rac1 prod]$ mkdir -p 4bsasm/admin/{bdump,cdump,udump}
62. [oracle@rac1 4bsasm]$ vi 4bsasm.env
export ORACLE_HOME=/u01/app/oracle/product/10.2.0.1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=4bsasm2
63. [oracle@rac1 ~]$ vi /u01/app/oracle/product/10.2.0.1/dbs/init4bsasm2.ora
64. SQL> startup
65. SQL> select INSTANCE_NAME,HOST_NAME,STATUS from gv$instance;
INSTANCE_NAME HOST_NAME STATUS
--------------------------------------------------- ------------
4bsasm1 rac2 OPEN
4bsasm2 rac1 OPEN

You might also like