Thursday, August 28, 2008

One of the issues using ASM is its invisibility to the operating system and moving a file within ASM can be tricky.
Recently I needed to move a control file from one diskgroup to another and he is the solution.

--Create the new diskgroup
ASM>CREATE DISKGROUP CMP_PRE_REDO
EXTERNAL REDUNDANCY
DISK '/dev/rdsk/c6t60060480000287750753474B50354345d0s7',
'/dev/rdsk/c6t60060480000287750753474B50354441d0s7',
'/dev/rdsk/c6t60060480000287750753474B50363136d0s7',
'/dev/rdsk/c6t60060480000287750753474B50363232d0s7',
'/dev/rdsk/c6t60060480000287750753474B50354645d0s7',
'/dev/rdsk/c6t60060480000287750753474B50354632d0s7',
'/dev/rdsk/c6t60060480000287750753474B50354536d0s7',
'/dev/rdsk/c6t60060480000287750753474B50363041d0s7';



SQL>ALTER DATABASE ADD LOGFILE MEMBER '+CMP_PRE_REDO' TO GROUP 1;
ALTER DATABASE ADD LOGFILE MEMBER '+CMP_PRE_REDO' TO GROUP 2;
ALTER DATABASE ADD LOGFILE MEMBER '+CMP_PRE_REDO' TO GROUP 3;
ALTER DATABASE ADD LOGFILE MEMBER '+CMP_PRE_REDO' TO GROUP 4;
ALTER DATABASE ADD LOGFILE MEMBER '+CMP_PRE_REDO' TO GROUP 5;
ALTER DATABASE ADD LOGFILE MEMBER '+CMP_PRE_REDO' TO GROUP 6;

SQL>alter system switch logfile

ALTER DATABASE DROP LOGFILE MEMBER '+CMP_PRE_FRA/wpscs02q/onlinelog/group_1.3601.643130119'


export ORACLE_SID=CMPBT01S
restore controlfile to '+CMP_PRE_REDO' from '+CMP_PRE_DATA/CMPBT01S/CONTROLFILE/Current.689.650299077';
alter system set control_files='+cmp_pre_redo/cmpbt01s/controlfile/current.289.650374053' scope=spfile;

+cmp_pre_redo/cmpbt01s/controlfile/current.289.650374053

No comments: