Automatic Storage Management
storage collection of physical diskgroups and diskgroup is collection of disks
To prepare of this asm disk group required asm library software in Redhat linux .
Asm is software to manage this disk groups
Files are stored with respective disk group
Striping :whever a file created or stored in asm diskgroup these files spread across disks in disgroup this is called and this is called I/O Load balancing and at any time we can add disk and remove the disk from diskgroup with out down time .
Asm also support fault tolerance even some disks diamaged database should able to
These redundancy are 3types
Changing the owner ship of the partition
# Chown –R oracle:dba /dev/sdb*
Install Grid infrastructure s/w (GRID ASM)
Starting the instance and creating the diskgroup
Sql> select name,path from v$asm_disk;
Creating of the diskgroup
Sql> create diskgroup dg1 external redundancy disk ‘/dev/sdb1’,’/dev/sdb2’;
Sql> create diskgroup dg1 disk ‘/dev/sdb1’,’/dev/sdb2’;
Sql> create diskgroup dg1 high redundancy disk ‘/dev/sdb1’, ’/dev/sdb2’, ’/dev/sdb3’;
Sql> select name,state from v$asm_diskgroup;
Sql> create diskgroup dg1 normal redundancy
failgroup fg1 disk ‘/dev/sdb1’,’/dev/sdb2’
failgroup fg2 disk ‘/dev/sdb3’,’/dev/sdb4’;
sql> alter diskgroup dg1 mount;
sql>alter diskgroup dg1 dismount;
Sql> alter diskgroup dg1 add disk ‘/dev/sdb3’;
Sql> select name,path from v$asm_disk;
Sql> alter diskgroup dg1 drop disk DG1_0003;
Creating the tablespace with diskgroup
Sql> create tablespace hz datafile ‘+dg1/demo/datafile/hz01.dbf’ size 1g;
Utility to manage the diskgroup
DATABASE MIGRATION FROM NON-ASM TO ASM
First we have to take the backup
Rman> backup as copy database format ‘+dg1’;
Switch the database to backup
Rman> switch database to copy;
Rman> sql ‘alter database open’;
Rman> backup as copy current controlfile format ‘+dg1’;
Sql> alter system set control files=’+dg1/demo/control file/backup.267.3455’ scope=spfile;
Sql>recover database using backup controlfile until cancel;
Sql> alter database open resetlogs;
Sql> alter database add logfile group 3(‘+dg1/demo/log/redo04.log’) size 50m;
Sql> alter database add logfile group 4(‘+dg1/demo/log/redo04.log’) size 50m;
Sql>alter database drop logfile group 1;
Sql> alter database drop logfile group 2;
Sql> create spfile=’+dg1/demo/spfiledemo.ora’ from pfile;
Spfile=’+dg1/demo/spfiledemo.ora’
Comments
Post a Comment