Therenamedgtool enables you to change the name of a cloned disk group. The disk group must be dismounted on all nodes in the cluster before runningrenamedgon the disk group.
renamedgrenames a disk group using a two-step process:
The syntax is:
renamedg{-help|help=true}renamedg[phase={one|two|both} ]dgname=diskgroupnewdgname=newdiskgroup[config=configfile][asm_diskstring=discoverystring,discoverystring... ][clean={true|false} ] [check={true|false} ][confirm={true|false}] [verbose={true|false} ][keep_voting_files={true|false}]
注意:
eg:
-bash-4.1$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 24 15:33:16 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option
SQL> alter diskgroup new_datagroup2 dismount;
Diskgroup altered.
SQL>
SQL>
SQL> exit
-bash-4.1$
-bash-4.1$ renamedg -help
NOTE: No asm libraries found in the system
Parsing parameters..
phase Phase to execute,
(phase=ONE|TWO|BOTH), default BOTH
dgname Diskgroup to be renamed
newdgname New name for the diskgroup
config intermediate config file
check just check-do not perform actual operation,
(check=TRUE/FALSE), default FALSE
confirm confirm before committing changes to disks,
(confirm=TRUE/FALSE), default FALSE
clean ignore errors,
(clean=TRUE/FALSE), default TRUE
asm_diskstring ASM Diskstring (asm_diskstring='discoverystring',
'discoverystring1' ...)
verbose verbose execution,
(verbose=TRUE|FALSE), default FALSE
keep_voting_files Voting file attribute,
(keep_voting_files=TRUE|FALSE), default FALSE
-bash-4.1$ renamedg dgname=NEW_DATAGROUP2 newdgname=datagroup2 asm_diskstring='/dev/oracleasm/disks/*' verbose=true
NOTE: No asm libraries found in the system
Parsing parameters..
Parameters in effect:
Old DG name : NEW_DATAGROUP2
New DG name : DATAGROUP2
Phases :
Phase 1
Phase 2
Discovery str : /dev/oracleasm/disks/*
Clean : TRUE
Raw only : TRUE
renamedg operation: dgname=NEW_DATAGROUP2 newdgname=datagroup2 asm_diskstring=/dev/oracleasm/disks/* verbose=true
Executing phase 1
Discovering the group
Performing discovery with string:/dev/oracleasm/disks/*
Identified disk UFS:/dev/oracleasm/disks/ASMDISK5 with disk number:0 and timestamp (33001227 75905024)
Identified disk UFS:/dev/oracleasm/disks/ASMDISK6 with disk number:1 and timestamp (33001227 75905024)
Identified disk UFS:/dev/oracleasm/disks/ASMDISK7 with disk number:2 and timestamp (33001227 75905024)
Identified disk UFS:/dev/oracleasm/disks/ASMDISK8 with disk number:5 and timestamp (33001229 -598404096)
Identified disk UFS:/dev/oracleasm/disks/ASMDISK9 with disk number:3 and timestamp (33001229 -678575104)
Identified disk UFS:/dev/oracleasm/disks/ASMDISK10 with disk number:4 and timestamp (33001229 -678575104)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:/dev/oracleasm/disks/*
Identified disk UFS:/dev/oracleasm/disks/ASMDISK5 with disk number:0 and timestamp (33001227 7