This content has been marked as final. Show 4 replies
I normally prefer to go with RMAN than the ASMCMD cp command. Suppose the datafiles are OMF and you use RMAN to copy:
1. offline the datafileHere, RMAN assigns automatically a unique name for the new datafile (OMF) and you only have to specify the new diskgroup name while using the COPY command which makes things easier. But say if you are using ASMCMD, then you cannot just specify the new diskgroup name for the CP command, which means that a unique name cannot be obtained automatically.
2. RMAN>copy datafile <offline-datafile-on-old-DG> to +NEW-DG;
3. At database level, rename the old datafile to the new name reported from the above command
4. Switch the new datafile to copy
5. Recover the new datafile
The below command does not work out.
asmcmd>cp OLD_DG/datafile/abc.123 NEW_DGYou need to specify the destination name as well something like below:
asmcmd>cp OLD_DG/datafile/abc.123 NEW_DG/abc.dbfHere you are getting a normal file and not OMF, though ASM internally creates a link for the file "+NEW_DG/abc.dbf" pointing to an OMF. ASMCMD makes you a bit more confusive.
Refer this http://surachartopun.com/2009/10/moving-datafile-in-asm-by-asmcmdcp.html
I would use rman to perform it as it is simple
or you can follow note "How to move ASM database files from one diskgroup to another ? [ID 330103.1]"
backup as copy database format <new diskgroup> switch database to copy;
Hope it helps
I second the rman copy method. You can begin to do the move prior to your actual downtime (the morning of??) and then switch datafile and recover datafile during the outage time.. This works like a charm. It also good to use when you need to move datafiles from one filesystem to another or filesystem to ASM or ASM to filesystem.
I would prefer rman copy. Let's assume you need to move 20 datafiles.It will be so soggy doing it via cp command. But with rman you can concurently copy datafiles.