Oracle Database Data File Transfer Method

Source: Internet
Author: User

OracleDatabase Data File Transfer Method

Due to insufficient space caused by video data restoration, some data files need to be transferred to other hard disks. Based on some network materials and their own practicesOracleData File Transfer Method.

1)Manually copy the data file to be transferred'D: \ oracledata \ gwtable42.dbf'To new location'E: \ oracledata \ gwtable42.dbf'.

 

2)Set the tablespace to which the data file belongs.Offline, InSqlplusRun the following command:

Sqlplus>Alter tablespace gwtable offline;

 

3)Modify the tablespace file pathAlter database rename File'Old File Path'To'New File Path';

Sqlplus> alter Database Rename File 'D: \ oracledata \ gwtable42.dbf' To 'E: \ oracledata \ gwtable42.dbf';

 

4)After executing the RENAME command,OracleIf the database file is damaged, the system prompts "you need to restore the media"

Sqlplus>Shutdown immediate ;--Close Database

Sqlplus>Startup Mount ;--Start the database in archive mode without opening the database

Sqlplus> recover datafile 'e: \ oracledata \ gwtable42.dbf ';--Media recovery

Sqlplus> alter database open;

 

5)Change the tablespaceOnline.

Sqlplus>Alter tablespace gwtable online;

 

6)View data files and tablespaces and statuses

Sqlplus> selectFile_name, tablespace_name, statusFromDba_data_files;

 

 

References:

Http://www.examda.com/oracle/zonghe/20101106/135432343-2.html

Http://liangqi1188.blog.163.com/blog/static/3991604720090991857408/

Http://www.cnblogs.com/wuhenke/archive/2011/02/15/1954814.html

 

This blog statement: I have received support from guoxin Si Nan during my technical exploration. In the future, all technical exploration achievements in my blog will be jointly owned by "no trace", "guoxin Si Nan", and "blog Park". Original works should be reprinted if necessary, please note this blog statement.

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.