Disk group rename 11G: Step by Step

Warning: This procedure tested in test environment:

 

Disk group rename 11G:

Check the status of Diskgroup:

[oracle@asm05] /home/oracle $

$ crs_stat -t    

Name           Type           Target    State     Host       

————————————————————

ora.DATA.dg    ora….up.type ONLINE    ONLINE    asm05      

ora.DATA2.dg   ora….up.type ONLINE    ONLINE    asm05      

ora.FRA.dg     ora….up.type ONLINE    ONLINE    asm05      

ora….ER.lsnr ora….er.type ONLINE    OFFLINE              

ora.asm        ora.asm.type   ONLINE    ONLINE    asm05      

ora.cssd       ora.cssd.type  ONLINE    ONLINE    asm05      

ora.diskmon    ora….on.type ONLINE    ONLINE    asm05      

ora.dlfa01.db  ora….se.type ONLINE    ONLINE    asm05      

ora.dlqa01.db  ora….se.type ONLINE    ONLINE    asm05      

ora.valqa02.db ora….se.type ONLINE    ONLINE    asm05      

[oracle@asm05] /home/oracle $

$

$ crsctl status resource ora.FRA.dg

NAME=ora.FRA.dg

TYPE=ora.diskgroup.type

TARGET=ONLINE

STATE=ONLINE on asm05

[oracle@asm05] /home/oracle $

[oracle@asm05] /home/oracle $

$ asmcmd umount FRA

ORA-15032: not all alterations performed

ORA-15027: active use of diskgroup “FRA” precludes its dismount (DBD ERROR: OCIStmtExecute)

[oracle@asm05] /home/oracle $

$ crsctl status resource ora.FRA.dg

NAME=ora.FRA.dg

TYPE=ora.diskgroup.type

TARGET=ONLINE

STATE=ONLINE on asm05

$ ps -ef |grep pmon

oracle    3447     1  0 09:56 ?        00:00:00 asm_pmon_+ASM

oracle    3568     1  0 09:59 ?        00:00:00 ora_pmon_DLQA01

oracle    3891     1  0 10:00 ?        00:00:00 ora_pmon_DLFA01

oracle    4060     1  0 10:01 ?        00:00:00 ora_pmon_VALQA02

Shutdown all instances using DG to be renamed.

$ ps -ef |grep pmon

oracle    3447     1  0 09:56 ?        00:00:00 asm_pmon_+ASM

oracle    3568     1  0 09:59 ?        00:00:00 ora_pmon_DLQA01

oracle    3891     1  0 10:00 ?        00:00:00 ora_pmon_DLFA01

oracle    4060     1  0 10:01 ?        00:00:00 ora_pmon_VALQA02

$ asmcmd umount FRA

[oracle@asm05] /home/oracle $

$ crsctl status resource ora.FRA.dg

NAME=ora.FRA.dg

TYPE=ora.diskgroup.type

TARGET=OFFLINE

STATE=OFFLINE

[oracle@asm05] /home/oracle $

$

$ asmcmd lsdg

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name

MOUNTED  EXTERN  N         512   4096  1048576     15342    11112                0           11112              0             N  DATA/

MOUNTED  EXTERN  N         512   4096  1048576     10228    10174                0           10174              0             N  DATA2/

[oracle@asm05] /home/oracle $

$ renamedg phase=both dgname=FRA newdgname=FRA_QA verbose=true

Parsing parameters..

Parameters in effect:

         Old DG name       : FRA

         New DG name          : FRA_QA

         Phases               :

                 Phase 1

                 Phase 2

         Discovery str        : (null)

         Clean              : TRUE

         Raw only           : TRUE

renamedg operation: phase=both dgname=FRA newdgname=FRA_QA verbose=true

Executing phase 1

Discovering the group

Performing discovery with string:

Identified disk ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so:ORCL:DISK4 with disk number:0 and timestamp (32956723 2083846144)

Identified disk ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so:ORCL:DISK5 with disk number:1 and timestamp (32956723 2083846144)

Identified disk ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so:ORCL:DISK6 with disk number:2 and timestamp (32956723 2083846144)

Checking for hearbeat…

Re-discovering the group

Performing discovery with string:

Identified disk ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so:ORCL:DISK4 with disk number:0 and timestamp (32956723 2083846144)

Identified disk ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so:ORCL:DISK5 with disk number:1 and timestamp (32956723 2083846144)

Identified disk ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so:ORCL:DISK6 with disk number:2 and timestamp (32956723 2083846144)

Checking if the diskgroup is mounted

Checking disk number:0

Checking disk number:1

Checking disk number:2

Checking if diskgroup is used by CSS

Generating configuration file..

Completed phase 1

Executing phase 2

Looking for ORCL:DISK4

Modifying the header

Looking for ORCL:DISK5

Modifying the header

Looking for ORCL:DISK6

Modifying the header

Completed phase 2

Terminating kgfd context 0x2aba026740a0

[oracle@asm05] /home/oracle $

Mount new DG:

$ asmcmd mount FRA_QA

$ crs_stat -t                                                

Name           Type           Target    State     Host       

————————————————————

ora.DATA.dg    ora….up.type ONLINE    ONLINE    asm05      

ora.DATA2.dg   ora….up.type ONLINE    ONLINE    asm05      

ora.FRA.dg     ora….up.type OFFLINE   OFFLINE              

ora.FRA_QA.dg  ora….up.type ONLINE    ONLINE    asm05      

ora….ER.lsnr ora….er.type ONLINE    OFFLINE               

ora.asm        ora.asm.type   ONLINE    ONLINE    asm05      

ora.cssd       ora.cssd.type  ONLINE    ONLINE    asm05      

ora.diskmon    ora….on.type ONLINE    ONLINE    asm05      

ora.dlfa01.db  ora….se.type OFFLINE   OFFLINE               

ora.dlqa01.db  ora….se.type OFFLINE   OFFLINE              

ora.valqa02.db ora….se.type OFFLINE   OFFLINE              

[oracle@asm05] /home/oracle $

$

$ asmcmd lsdg

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name

MOUNTED  EXTERN  N         512   4096  1048576     15342    11112                0           11112              0             N  DATA/

MOUNTED  EXTERN  N         512   4096  1048576     10228    10174                0           10174              0             N  DATA2/

MOUNTED  EXTERN  N         512   4096  1048576     15342    12322                0           12322              0             N  FRA_QA/

[oracle@asm05] /home/oracle $

$

Remove of DG:

$ srvctl modify database -d DLQA01 -a “DATA,FRA_QA”

[oracle@asm05] /home/oracle $

$ srvctl disable diskgroup -g FRA

[oracle@asm05] /home/oracle $

$ srvctl remove diskgroup -g FRA -f

[oracle@asm05] /home/oracle $

$ srvctl modify database -d DLQA01 -z

[oracle@asm05] /home/oracle $

$

Auto start new DG:

crsctl status resource ora.FRA_QA.dg -p |grep AUTO_START

AUTO_START=never

[oracle@asm05] /home/oracle $

$ crsctl modify resource ora.FRA_QA.dg -attr AUTO_START=always

[oracle@asm05] /home/oracle $

$ crsctl status resource ora.FRA_QA.dg -p |grep AUTO_START   

AUTO_START=always

Set new location for control file:

SQL> alter system set control_files=’+DATA/dlfa01/controlfile/current.260.758748837′,’+FRA_QA/dlfa01/controlfile/current.256.758748837′ scope=spfile;

alter system set db_recovery_file_dest=’+FRA_QA’;

SQL> show parameter control

NAME                                 TYPE        VALUE

———————————— ———– ——————————

control_file_record_keep_time        integer     7

control_files                        string      +DATA/dlfa01/controlfile/curre

                                                 nt.260.758748837, +FRA_QA/dlfa

                                                 01/controlfile/current.256.758

                                                 748837

control_management_pack_access       string      DIAGNOSTIC+TUNING

srvctl modify database -d DLFA01 -a “DATA,FRA_QA”

[oracle@asm05] /home/oracle $

sqlplus system/xxxx@DLFA01                                        

SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 15 13:31:04 2011

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options

SQL> quit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options

[oracle@asm05] /home/oracle $

$

Rebuild Online Redo logs:

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC

———- ———- ———- ———- ———- ———- —

STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME

—————- ————- ——— ———— ———

         1          1          4   52428800        512          2 YES

INACTIVE                976201 11-AUG-11      1007552 13-AUG-11

         2          1          5   52428800        512          2 NO

CURRENT                1007552 13-AUG-11   2.8147E+14

         3          1          3   52428800        512          2 YES

INACTIVE                962934 09-AUG-11       976201 11-AUG-11

Re-create online redo logs:

SQL> alter database drop logfile group 1;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE THREAD 1

  2  group 1

  3  (‘+DATA’,’+FRA_QA’) size 50M;

Database altered.

SQL>  select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME

———- ———- ———- ———- ———- ———- — —————- ————- ——— ———— ———

         1          1          0   52428800        512          2 YES UNUSED                       0                      0

         2          1          5   52428800        512          2 NO  CURRENT                1007552 13-AUG-11   2.8147E+14

         3          1          3   52428800        512          2 YES INACTIVE                962934 09-AUG-11       976201 11-AUG-11

SQL> select * from  v$logfile;

    GROUP# STATUS  TYPE

———- ——- ——-

MEMBER

——————————————————————————————————————————————————

IS_

         3         ONLINE

+DATA/dlfa01/onlinelog/group_3.263.758748847

NO

         3         ONLINE

+FRA/dlfa01/onlinelog/group_3.259.758748847

YES

    GROUP# STATUS  TYPE

———- ——- ——-

MEMBER

——————————————————————————————————————————————————

IS_

         2         ONLINE

+DATA/dlfa01/onlinelog/group_2.262.758748843

NO

         2         ONLINE

+FRA/dlfa01/onlinelog/group_2.258.758748845

    GROUP# STATUS  TYPE

———- ——- ——-

MEMBER

——————————————————————————————————————————————————

IS_

YES

         1         ONLINE

+DATA/dlfa01/onlinelog/group_1.261.759245639

NO

         1         ONLINE

    GROUP# STATUS  TYPE

———- ——- ——-

MEMBER

——————————————————————————————————————————————————

IS_

+FRA_QA/dlfa01/onlinelog/group_1.293.759245641

NO

6 rows selected.

SQL>

SQL> alter system switch logfile;

System altered.

SQL>  select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC

———- ———- ———- ———- ———- ———- —

STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME

—————- ————- ——— ———— ———

         1          1          6   52428800        512          2 NO

CURRENT                1009892 15-AUG-11   2.8147E+14

         2          1          5   52428800        512          2 NO

ACTIVE                 1007552 13-AUG-11      1009892 15-AUG-11

         3          1          3   52428800        512          2 YES

INACTIVE                962934 09-AUG-11       976201 11-AUG-11

Advertisements

Author: Abdul H Khan

Trying to be cloudy!

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s