P. 1
Asm

Asm

|Views: 38|Likes:
Published by Vinay Kumar
asm
asm

More info:

Published by: Vinay Kumar on Mar 22, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

04/17/2014

pdf

text

original

Automatic Storage Management

Views: 1. desc v$asm_diskgroup 2. desc v$asm_disk 3. desc v$asm_client 4. desc v$asm_disk_stat Automatic Storage Management (ASM) is a feature in Oracle Database 10g/11g that provides the database administrator with a simple storage management interface that is consistent across all server and storage platforms. The ASM functionality is controlled by an ASM instance. This is not a full database instance, just the memory structures and as such is very small and lightweight. The main components of ASM are disk groups, each of which comprise of several physical disks that are controlled as a single unit. The physical disks are known as ASM disks, while the files that reside on the disks are known as ASM files. The locations and names for the files are controlled by ASM. To create a database that uses storage managed by Automatic Storage Management, we must first start the ASM instance. However, an ASM instance does not require that a database instance is running. We can achieve RAID implementation at Oracle level with the help of ASM (from Oracle 10G), with ASM we can avoid such expenses since ASM is free with Oracle 10g software. RAID: redundant array of inexpensive drive the implementation of RAID will be possible at 3 levels. 1, Hardware level 2, Operating system level 3, Oracle level It will be more expensive implementation of RAID at hardware level and it needs more knowledge of system administration for operating system level RAID implementation. There is no cost for implementation of RAID at Oracle level, and is preferable for database administrators to implement RAID at Oracle level.

ASM included[takes care of] all files C/R/D.If one disk goes down then none of other disks works. temp files. And ASM supports not only regular database but also RAC(real application cluster) database. sp file …. flashback log files. ASM Availability: Redundancy External Normal High No of failover groups 1 2 3 . rman backups. ASM is only an instance with background processes and SGA only. archives. If one disk crashes then the show doesn’t stop.

oracle $cd $mkdir asm $cd asm $mkdir udump cdump bdump Go to default location of parameter files. partprobe #to take effect of partitions immediately.repeat the 5th step three times to create four partitions.fdisk –l #to see the existing partitions.chown –R oracle:oinstall /dev/sda6 /dev/sda7 /dev/sda8 /dev/sda9 Prepare the directory structure: #su .'/dev/sda8'.ora instance_type=asm instance_name=+ASM asm_diskstring='/dev/sda6'. 5.type w and enter to save it.1. 2. 10. 8.'/dev/sda9' shared_pool_size=100M . Prepare the asm parameter.type n to create new partition. type m and enter to see the options. 4. 7. 9. 1. To create manual partitions: We need to login as root to make the manual partitions.create four manual partitions. fdisk /dev/sda 3.'/dev/sda7'. $cd $ORACLE_HOME/dbs $vi init+ASM. fdisk –l #to see existing partitions. type enter once and specify the size +1000M and enter 6.

#su . . # it will read the parameter file.background_dump_dest='/home/oracle/asm/bdump' user_dump_dest='/home/oracle/asm/udump' core_dump_dest='/home/oracle/asm/cdump' :wq $cd Enter into root account: $su – root #cd /home/oracle/oracle/product/10. >select GROUP_NUMBER. >shutdown immediate.oracle $crsctl check css # to check the status. >alter diskgroup dgrp1 add directory '+dgrp1/prod1/data'.2. #ps –ef |grep css Login into as oracle. >alter diskgroup dgrp1 add directory '+dgrp1/prod1'.'/dev/sda9'. >create diskgroup dgrp1 normal redundancy failgroup f1 disk '/dev/sda6'. >startup nomount.NAME from v$asm_diskgroup. >alter diskgroup dgrp1 add directory '+dgrp1/prod1/control'. >alter diskgroup dgrp1 mount.0/db_1/bin #sh localconfig add #cluster synchronization service.'/dev/sda7' failgroup f2 disk '/dev/sda8'. Export the ASM instance: $export ORACLE_SID=+ASM $sqlplus / as sysdba >startup nomunt.

ctl'. >exit $asmcmd # to login into the asm diskgroup.>alter diskgroup dgrp1 add directory '+dgrp1/prod1/log'.ora control_files='+dgrp1/prod1/control/control.ctl' db_name=prod1 instance_name=prod1 background_dump_dest='/home/oracle/prod1/bdump' core_dump_dest='/home/oracle/prod1/cdump' user_dump_dest='/home/oracle/prod1/udump' sga_max_size=600M sga_target=512M compatible=10.'+dgrp1/prod1/control/control1.0 undo_management=Auto undo_tablespace=undotbs :wq $cd Create directory structure: $mkdir prod1 $cd prod1 . ASMCMD>ls ASMCMD>cd dgrp1 ASMCMD>cd prod1/data ASMCMD>exit Prepare the parameter file to create the database. $cd $ORACLE_HOME/dbs $vi initprod1.2.

dbf' size 200M autoextend on sysaux datafile '+dgrp1/prod1/data/sysaux.sql >@?/rdbms/admin/catproc.log'.$mkdir udump cdump bdump arch $vi dbcreation. >@dbcreation.sql create database prod1 datafile '+dgrp1/prod1/data/system.log'.dbf' size 10M autoextend on default temporary tablespace temp tempfile '+dgrp1/prod1/data/temp.log') size 10M reuse.sql #here we should see a statement of database created >@?/rdbms/admin/catalog.ora .'+dgrp1/prod1/log/redologa2.sql >exit $cd $ORACLE_HOME/dbs $vi init+ASM.'+dgrp1/prod1/log/redolog02. group 2('+dgrp1/prod1/log/redologa1.log') size 10M. :wq $export ORACLE_SID=prod1 $sqlplus / as sysdba >startup nomount.dbf' size 10M autoextend on logfile group 1('+dgrp1/prod1/log/redolog01.sql >conn system/manager >@?/sqlplus/admin/pupbld.dbf' size 10M autoextend on undo tablespace undotbs datafile '+dgrp1/prod1/data/undotbs.dbf' size 20M autoextend on default tablespace users datafile '+dgrp1/prod1/data/userdata.

Ex: chown -R oracle:oinstall /dev/sda6 /dev/sda7 /dev/sda8 /dev/sda9 Dropping database along with disk groups: On rdbms instance: > startup mount restrict. $export ORACLE_SID=+ASM $asmcmd # to login into the asm diskgroup. ASMCMD>ls ASMCMD>cd dgrp1 ASMCMD>cd prod1/data ASMCMD>ls Before shutting down the ASM instance we must first shutdown the rdbms instance(prod1) Trouble shooting: ORA-15032: not all alterations performed ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DGRP1" Here we need to give permission to raw devices.Asm_diskgroups=dgrp1 :wq $export ORACLE_SID=prod1 $sqlplus / as sysdba >shutdown immediate >startup. >drop database. .

.On ASM prompt: >drop diskgroup dgrp1.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->