How to copy data files in ASM to the Operating System

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.