RMAN duplicate using until time/backup set:

RMAN duplicate using until time/backup set:

 

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name DLFA01 are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default
CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_DLFA01.f’; # default

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP on
2> ;

new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored

RMAN> backup as compressed backupset incremental level 0 database include current controlfile plus archivelog TAG=”2011_08_17_AK”;

Starting backup at 17-AUG-11
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=47 device type=DISK
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=5 RECID=4 STAMP=759355393
input archived log thread=1 sequence=6 RECID=5 STAMP=759355404
input archived log thread=1 sequence=7 RECID=6 STAMP=759355632
input archived log thread=1 sequence=8 RECID=7 STAMP=759355696
input archived log thread=1 sequence=9 RECID=8 STAMP=759396723
channel ORA_DISK_1: starting piece 1 at 17-AUG-11
channel ORA_DISK_1: finished piece 1 at 17-AUG-11
piece handle=+FRA_QA/dlfa01/backupset/2011_08_17/annnf0_2011_08_17_ak_0.366.759396725 tag=2011_08_17_AK comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 17-AUG-11

Starting backup at 17-AUG-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/dlfa01/datafile/system.256.758748765
input datafile file number=00002 name=+DATA/dlfa01/datafile/sysaux.257.758748767
input datafile file number=00003 name=+DATA/dlfa01/datafile/undotbs1.258.758748767
input datafile file number=00004 name=+DATA/dlfa01/datafile/users.259.758748767
channel ORA_DISK_1: starting piece 1 at 17-AUG-11
channel ORA_DISK_1: finished piece 1 at 17-AUG-11
piece handle=+FRA_QA/dlfa01/backupset/2011_08_17/nnndn0_tag20110817t073208_0.365.759396729 tag=TAG20110817T073208 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:06
channel ORA_DISK_1: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 17-AUG-11
channel ORA_DISK_1: finished piece 1 at 17-AUG-11
piece handle=+FRA_QA/dlfa01/backupset/2011_08_17/ncnnn0_tag20110817t073208_0.364.759396797 tag=TAG20110817T073208 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 17-AUG-11

Starting backup at 17-AUG-11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=10 RECID=9 STAMP=759396799
channel ORA_DISK_1: starting piece 1 at 17-AUG-11
channel ORA_DISK_1: finished piece 1 at 17-AUG-11
piece handle=+FRA_QA/dlfa01/backupset/2011_08_17/annnf0_2011_08_17_ak_0.1135.759396801 tag=2011_08_17_AK comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 17-AUG-11

Starting Control File and SPFILE Autobackup at 17-AUG-11
piece handle=+FRA_QA/dlfa01/autobackup/2011_08_17/s_759396801.1136.759396803 comment=NONE
Finished Control File and SPFILE Autobackup at 17-AUG-11

RMAN> quit

$ env
_=*25457*/bin/env
CVS_RSH=ssh
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOME=/home/oracle
HOSTNAME=asm05
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
MAIL=/var/spool/mail/oracle
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_SID=CLONE01
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/u01/app/oracle/product/11.2.0/dbhome_1/bin
PWD=/u01/app/oracle/product/11.2.0/dbhome_1/dbs
SHELL=/bin/ksh
SHLVL=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT=192.168.1.202 44746 22
SSH_CONNECTION=192.168.1.202 44746 192.168.1.241 22
SSH_TTY=/dev/pts/1
TERM=vt100
USER=oracle
_AST_FEATURES=UNIVERSE – ucb
A__z=”*SHLVL
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 17 07:33:36 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> shutdown abort;
ORACLE instance shut down.
SQL> !pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs

SQL> !ls -lrt
total 28792
-rw-r–r– 1 oracle dba    2851 May 15  2009 init.ora
-rw-r—– 1 oracle dba      24 Aug  9 19:32 lkDLFA01
-rw-r—– 1 oracle dba    1536 Aug  9 19:34 orapwDLFA01
-rw-r—– 1 oracle dba      39 Aug  9 19:35 initDLFA01.ora
-rw-r—– 1 oracle dba      24 Aug  9 19:46 lkDLQA01
-rw-r—– 1 oracle dba    1536 Aug  9 19:47 orapwDLQA01
-rw-rw—- 1 oracle dba    1544 Aug  9 20:11 hc_DBUA0.dat
-rw-r—– 1 oracle dba      24 Aug  9 20:13 lkVALQA02
-rw-r—– 1 oracle dba      41 Aug  9 20:16 initVALQA02.ora
-rw-r—– 1 oracle dba 9748480 Aug 11 17:19 snapcf_DLQA01.f
-rw-r—– 1 oracle dba    1536 Aug 12 18:07 orapwCLONE01
-rw-r—– 1 oracle dba      24 Aug 13 14:59 lkCLONE01
-rw-r–r– 1 oracle dba      62 Aug 15 09:59 initDLQA01.ora
-rw-rw—- 1 oracle dba    1544 Aug 15 17:49 hc_DLQA01.dat
-rw-r—– 1 oracle dba    1536 Aug 16 15:15 orapwVALQA02
-rw-rw—- 1 oracle dba    1544 Aug 16 16:26 hc_VALQA02.dat
-rw-r—– 1 oracle dba 9846784 Aug 16 16:26 snapcf_VALQA02.f
-rw-rw—- 1 oracle dba    1544 Aug 16 20:03 hc_DLFA01.dat
-rw-r—– 1 oracle dba     931 Aug 17 07:09 initCLONE01.ora
-rw-r—– 1 oracle dba   12800 Aug 17 07:18 spfileCLONE01.ora
-rw-r—– 1 oracle dba 9748480 Aug 17 07:33 snapcf_DLFA01.f
-rw-rw—- 1 oracle dba    1544 Aug 17 07:33 hc_CLONE01.dat

SQL> startup nomount pfile=’initCLONE01.ora’
ORACLE instance started.

Total System Global Area  521936896 bytes
Fixed Size                  2214936 bytes
Variable Size             159384552 bytes
Database Buffers          356515840 bytes
Redo Buffers                3821568 bytes
SQL> create spfile from  pfile=’initCLONE01.ora’;

File created.

B COMPLETION_TIME
– ——————-
L 08/16/2011 20:07:15
D 08/16/2011 20:08:12
D 08/16/2011 20:08:14
L 08/16/2011 20:08:17
L 08/17/2011 07:32:08
D 08/17/2011 07:33:04
D 08/17/2011 07:33:17
L 08/17/2011 07:33:20
D 08/17/2011 07:33:23

9 rows selected.

SQL> l
  1* select BACKUP_TYPE, COMPLETION_TIME from V$BACKUP_SET

> rman target sys/oracle@DLFA01

Recovery Manager: Release 11.2.0.1.0 – Production on Thu Aug 25 10:53:54 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DLFA01 (DBID=3134528100)

 

RMAN> connect auxiliary /

RMAN> duplicate target database to CLONE01 nofilenamecheck UNTIL TIME “to_date(’08/17/2011 07:33′,’MM/DD/YYYY HH24:MI’)”;

Starting Duplicate Db at 17-AUG-11

using target database control file instead of recovery catalog

allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=23 device type=DISK

contents of Memory Script:
{
   sql clone “create spfile from memory”;
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area     521936896 bytes

Fixed Size                     2214936 bytes

Variable Size                163578856 bytes
Database Buffers             352321536 bytes
Redo Buffers                   3821568 bytes

contents of Memory Script:
{
   set until scn  1044124;
   sql clone “alter system set  db_name =
 ”DLFA01” comment=
 ”Modified by RMAN duplicate” scope=spfile”;
   sql clone “alter system set  db_unique_name =
 ”CLONE01” comment=
 ”Modified by RMAN duplicate” scope=spfile”;
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile;
   alter clone database mount;
}
executing Memory Script

executing command: SET until clause

sql statement: alter system set  db_name =  ”DLFA01” comment= ”Modified by RMAN duplicate” scope=spfile

sql statement: alter system set  db_unique_name =  ”CLONE01” comment= ”Modified by RMAN duplicate” scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area     521936896 bytes

Fixed Size                     2214936 bytes

Variable Size                163578856 bytes
Database Buffers             352321536 bytes
Redo Buffers                   3821568 bytes

Starting restore at 17-AUG-11
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece +FRA_QA/dlfa01/backupset/2011_08_16/ncsnn0_tag20110816t200717_0.1009.759355695
channel ORA_AUX_DISK_1: piece handle=+FRA_QA/dlfa01/backupset/2011_08_16/ncsnn0_tag20110816t200717_0.1009.759355695 tag=TAG20110816T200717
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output file name=+DATA/clone01/controlfile/control01.ctl
output file name=+FRA_QA/clone01/controlfile/control02.ctl
Finished restore at 17-AUG-11

database mounted

contents of Memory Script:
{
   set until scn  1044124;
   set newname for clone datafile  1 to new;
   set newname for clone datafile  2 to new;
   set newname for clone datafile  3 to new;
   set newname for clone datafile  4 to new;
   restore
   clone database
   ;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 17-AUG-11
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00002 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00003 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00004 to +DATA
channel ORA_AUX_DISK_1: reading from backup piece +FRA_QA/dlfa01/backupset/2011_08_17/nnndn0_tag20110817t073208_0.365.759396729
channel ORA_AUX_DISK_1: piece handle=+FRA_QA/dlfa01/backupset/2011_08_17/nnndn0_tag20110817t073208_0.365.759396729 tag=TAG20110817T073208
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:05
Finished restore at 17-AUG-11

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=5 STAMP=759397024 file name=+DATA/clone01/datafile/system.288.759396959
datafile 2 switched to datafile copy
input datafile copy RECID=6 STAMP=759397024 file name=+DATA/clone01/datafile/sysaux.287.759396959
datafile 3 switched to datafile copy
input datafile copy RECID=7 STAMP=759397024 file name=+DATA/clone01/datafile/undotbs1.295.759396959
datafile 4 switched to datafile copy
input datafile copy RECID=8 STAMP=759397025 file name=+DATA/clone01/datafile/users.296.759396959

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
   sql clone “alter system set  db_name =
 ”CLONE01” comment=
 ”Reset to original value by RMAN” scope=spfile”;
   sql clone “alter system reset  db_unique_name scope=spfile”;
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area     521936896 bytes

Fixed Size                     2214936 bytes

Variable Size                163578856 bytes
Database Buffers             352321536 bytes
Redo Buffers                   3821568 bytes

sql statement: alter system set  db_name =  ”CLONE01” comment= ”Reset to original value by RMAN” scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area     521936896 bytes

Fixed Size                     2214936 bytes

Variable Size                163578856 bytes
Database Buffers             352321536 bytes
Redo Buffers                   3821568 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE “CLONE01” RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP  1  SIZE 50 M ,
  GROUP  2  SIZE 50 M ,
  GROUP  3  SIZE 50 M
 DATAFILE
  ‘+DATA/clone01/datafile/system.288.759396959’
 CHARACTER SET WE8MSWIN1252

contents of Memory Script:
{
   set newname for clone tempfile  1 to new;
   switch clone tempfile all;
   catalog clone datafilecopy  “+DATA/clone01/datafile/sysaux.287.759396959”,
 “+DATA/clone01/datafile/undotbs1.295.759396959”,
 “+DATA/clone01/datafile/users.296.759396959”;
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to +DATA in control file

cataloged datafile copy
datafile copy file name=+DATA/clone01/datafile/sysaux.287.759396959 RECID=1 STAMP=759397045
cataloged datafile copy
datafile copy file name=+DATA/clone01/datafile/undotbs1.295.759396959 RECID=2 STAMP=759397045
cataloged datafile copy
datafile copy file name=+DATA/clone01/datafile/users.296.759396959 RECID=3 STAMP=759397045

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=759397045 file name=+DATA/clone01/datafile/sysaux.287.759396959
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=759397045 file name=+DATA/clone01/datafile/undotbs1.295.759396959
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=759397045 file name=+DATA/clone01/datafile/users.296.759396959

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 17-AUG-11

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