Oracle data files migrated to bare devices

Source: Internet
Author: User

This article mainly describes how to migrate data files in the file system form of an Oracle tablespace to an LV bare device.

Pre-conditions

1. Oracle is operating normally.

2. The LV file has been programmed with the LVM command. such as/dev/vgoracle/lvdatatbs.

3. Stop Oracle Monitoring.

Operation Steps

1. View the path and status of the data file corresponding to the current Datatbs table space.

Select tablespace_name,file_name,online_status from dba_data_files where Tablespace_name='  Datatbs'

2. Close the database and start the database to Mount state

sql> shutdown Immediate; SQLMount;

3. Use the Rman command to assign a file system data file to a bare device

Method One:

$ rman target/ nocatalogrman'/home/oracle/oradata/ora11g/datatbs.dbf'  /dev/vgoracle/lvdatatbs'

Method Two:

$ Rman Target/nocatalog Cmdfile=copy_datafile.cmd

Copy_datafile.cmd content is as follows:

Run {  allocate channel T1 type disk;   ' /home/oracle/oradata/ora11g/datatbs.dbf ' ' /dev/vgoracle/lvdatatbs ' ;}

Description: You can use this method if you are manipulating multiple data files. Just add the Copy datafile command.

4, the switch table space corresponding data file for the bare device.

file ' /home/oracle/oradata/ora11g/datatbs.dbf ' ' /dev/vgoracle/lvdatatbs ';

5. Open the Database

sql> ALTER DATABASE open;

6. Delete the replaced DATATBS.DBF data file.

Oracle data files migrated to bare devices

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.