Skip to content

How to move ASM spfile from one diskgroup to another diskgroup

Here , I just showed you ,How to move ASM spfile from one diskgroup to another diskgroup.

before I have currently using one diskgroup, so i need to create another diskgroup using ASMCA, I just formated disk using fdisk command.

After created new diskgroup, follow the steps

[root@localhost ~]# su - oracle
[oracle@localhost ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid
[oracle@localhost ~]$ export PATH=/u01/app/oracle/product/11.2.0/grid/bin
[oracle@localhost ~]$ export ORACLE_SID=+ASM
[oracle@localhost ~]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 16 11:46:32 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: sys/Admin123 as sysasm

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/asm/asmparameterfile/reg
istry.253.736177541
SQL> create pfile='/install/initASM.ora' from spfile;

File created.

SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/asm/asmparameterfile/reg
istry.253.736177541
SQL> create spfile='+SPTEST' from pfile='/install/initASM.ora';

File created.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
[oracle@localhost ~]$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'localhost'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'localhost'
CRS-2673: Attempting to stop 'ora.SPTEST.dg' on 'localhost'
CRS-2673: Attempting to stop 'ora.azardb.db' on 'localhost'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'localhost' succeeded
CRS-2677: Stop of 'ora.SPTEST.dg' on 'localhost' succeeded
CRS-2677: Stop of 'ora.azardb.db' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'localhost'
CRS-2677: Stop of 'ora.DATA.dg' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'localhost'
CRS-2677: Stop of 'ora.asm' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'localhost'
CRS-2677: Stop of 'ora.cssd' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'localhost'
CRS-2677: Stop of 'ora.diskmon' on 'localhost' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'localhost' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[oracle@localhost ~]$
[oracle@localhost ~]$ crsctl start has
CRS-4123: Oracle High Availability Services has been started.
[oracle@localhost ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid
[oracle@localhost ~]$ export PATH=/u01/app/oracle/product/11.2.0/grid/bin
[oracle@localhost ~]$ export ORACLE_SID=+ASM
[oracle@localhost ~]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 16 11:57:30 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: sys/Admin123 as sysasm

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option

SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +SPTEST/asm/asmparameterfile/r
egistry.253.737898615
SQL> select name,state from v$asm_diskgroup;

NAME                           STATE
------------------------------ -----------
SPTEST                         MOUNTED
DATA                           MOUNTED

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option

you can verify using asmcmd command

[oracle@localhost ~]$ asmcmd spget
+SPTEST/asm/asmparameterfile/registry.253.737898615

just remove old spfile from here

[[oracle@localhost ~]$ asmcmd rm +DATA/asm/asmparameterfile/registry.253.736177541
[oracle@localhost ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid
[oracle@localhost ~]$ export PATH=/u01/app/oracle/product/11.2.0/grid/bin
[oracle@localhost ~]$ export ORACLE_SID=+ASM
[oracle@localhost ~]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 16 12:00:08 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: sys/Admin123 as sysasm

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option

SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +SPTEST/asm/asmparameterfile/r
egistry.253.737898615
SQL>

 

One Comment Post a comment
  1. shahed #

    is this applicable for RAC also

    October 26, 2011

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: