Use the asmcmdcp command to move datafile from the file system (move) to the asm disk group-for 11gR2, refer to the original article: HowtoMoveaDatafilefromFilesystemtoASMUsingASMCMDCPCommand. (docid1610915.1) for: OracleDatabase
Use the asmcmd cp Command to move datafile from the file system to the asm disk group. For details about 11gR2, refer to the original article: How to Move a Datafile from Filesystem to ASM Using asmcmd cp Command. (Doc ID 1610615.1) applicable to: Oracle Database-Enterprise Edition-Version 11.2.0.
Use the asmcmd cp command to move the datafile from the file system to the asm disk group-for 11gR2
Reference Original:
How to Move a Datafile from Filesystem to ASM Using asmcmd cp Command. (Doc ID 1610615.1)
Applicable:
Oracle Database-Enterprise Edition-Version 11.2.0.1 to 11.2.0.4 [Release 11.2]
Information in this document applies to any platform.
Symptoms:
Datafile is incorrectly added to the file system and should be placed in the asm disk group.
Cause:
This is not a datafile of the system tablespace.
Solution:
1. Make the datafile offline
SQL> alter system switch logfile;
System altered.
SQL> select file_name, file_id from dba_data_files;
FILE_NAME FILE_ID
---------------------
/U01/oracle/oradata/test1.dbf 6
SQL> alter database datafile 6 offline;
Database altered.
SQL> select file_name, file_id, online_status from dba_data_files where file_id = 6;
FILE_NAME FILE_ID ONLINE_STATUS
-----------------
/U01/oracle/oradata/test1.dbf 6 RECOVER
2. Run the asmcmd command to copy the file from the file system to the asm disk group.
ASMCMD> cp/u01/oracle/oradata/test1.dbf + DATA/LONDON/DATAFILE/test. dbf
Copying/u01/oracle/oradata/test1.dbf-> + DATA/LONDON/DATAFILE/test. dbf
ASMCMD> ls-lt
Type Redund Striped Time Sys Name
N test. dbf => + DATA/ASM/DATAFILE/test. dbf.286.833718815
ASMCMD> pwd
+ DATA/ASM/DATAFILE
3. Once the datafile is copied, rename the datafile.
SQL> alter database rename file '/u01/oracle/oradata/test1.dbf' to '+ DATA/LONDON/DATAFILE/test. dbf ';
Database altered.
4. recover the datafile and onlime the datafile
SQL> alter database recover datafile 6;
Database altered.
SQL> alter database datafile 6 online;
Database altered.
5. Confirm the correct file name and Path
SQL> select file_name, file_id, online_status from dba_data_files where file_id = 6;
FILE_NAME FILE_ID ONLINE_STATUS
-----------------
+ DATA/london/datafile/test. dbf 6 ONLINE