How to copy the data files in ASM to the operating system environment: Red Hat 5.7 + Oracle 10.2.0.5.0 Rac + ASM if your Oracle database system uses ASM for Automatic Storage Management, you have ever wondered how to peat the data files in ASM. ASM is a black box and you cannot see the data files in it through the operating system, they cannot be copied or deleted using operating system commands. The following describes a small Method for copying data files in ASM. Everyone is familiar with the tool, that is, Rman! We all know that during cross-platform data migration, we will encounter the problem of the operating system's byte storage order. Generally, we will use the Rman convert command to convert the tablespace or data file's byte order. Similarly, the following uses the Rman convert to show you how to reproduce a data file from ASM: view the data file in asmcmd, I want to copy a data file named SEVEN.320.822828439 (note the path ):
[html] ASMCMD> pwd +seven/prod/datafile ASMCMD> ls EXAMPLE.267.819799305 SEVEN.320.822828439 SYSAUX.257.819799141 SYSTEM.256.819799141 UNDOTBS1.258.819799143 UNDOTBS2.268.819799499 USERS.259.819799143 ASMCMD>
Run the following command to convert data in Rman:
[sql] convert datafile '+seven/prod/datafile/SEVEN.320.822828439' db_file_name_convert '+seven/prod/datafile','/home/oracle';
The command is simple. For single data conversion, the db_file_name_convert keyword is required to specify the path of the data file before and after conversion. In this experiment, the data file named SEVEN.320.822828439 is used, from the original path + seven/prod/datafile, to the/home/oracle directory after conversion, and the file name remains unchanged; the output content is as follows, and the conversion is completed:
[html] Starting backup at 07-AUG-13 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile conversion input filename=+SEVEN/prod/datafile/seven.320.822828439 converted datafile=/home/oracle/seven.320.822828439 channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:05 Finished backup at 07-AUG-13
OK! After the conversion is complete, go to the/home/oracle directory to check whether the data file exists;
[html] [oracle@ora1 ~]$ ls -al seven.320.822828439 -rw-r----- 1 oracle oinstall 52436992 Aug 7 16:41 seven.320.822828439 [oracle@ora1 ~]$
As shown above: the data file SEVEN.320.822828439 is already in the/home/oracle directory. Now you can do something you want to do with the data file.