How to move a datafile from a file system to ASM
Http://blog.csdn.net/tianlesoftware/archive/2011/04/22/6342722.aspx
How to move a datafile from ASM to the file system
Http://blog.csdn.net/tianlesoftware/archive/2011/04/22/6342740.aspx
The procedure is as follows:
1. log onto the target database that is local to the ASM instance as the Sys user.
2. Create source directory within the target database.
SQL> Create or replace directory source_dir as '+ dgroup1/v10asm/datafile /';
Directory created.
(In this example + dgroup1/v10asm/datafile/is the source directory where the datafile is located and where you wish to copy the file from .)
3. Create destination directory within database.
SQL> Create or replace directory oracle_dest as '/restore ';
Directory created.
(In this example/restore is the destination directory where the datafile is to be copied .)
4. Execute the dbms_file_transfer package.
SQL>
Begin
Dbms_file_transfer.copy_file (source_directory_object =>
'Source _ dir', source_file_name => 'System. 100 ',
Destination_directory_object => 'oracle _ dest ',
Destination_file_name => 'System. dbf ');
End;
/
PL/SQL procedure successfully completed.
(In this example system.272.617284341 is the file I wish to transfer and the destination file is system. DBF)
The file has now been copied to the/Restore directory.
From Oracle
Bytes -------------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
Email: dvd.dba@gmail.com
Dba1 group: 62697716 (full); dba2 group: 62697977 (full) dba3 group: 62697850 (full)
Super DBA group: 63306533 (full); dba4 group: 83829929 dba5 group: 142216823
Chat group: 40132017 chat 2 group: 69087192
-- Add the group to describe the relationship between Oracle tablespace and data files in the remarks section. Otherwise, the application is rejected.