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.