oracle| Data | database Oracle Database in the use of the process, as the data increase in the database files are gradually increased, after reaching a certain size may cause hard disk space; Then we can move the database file to another large hard disk partition. Here's how and how to move the Oracle database files to the D disk in the Oracle for Windows version.
1. In Sqlplus, connect to the Oracle database where you want to move the file, and then execute the following SQL statement to view the location of the Oracle database file:
Sql> select file_name from Sys.dba_data_files;
file_name
--------------------------------------------------------------
C:\ORA8\ORADATA\ORACLE\USERS01. Dbf
C:\ORA8\ORADATA\ORACLE\DR01. Dbf
C:\ORA8\ORADATA\ORACLE\TOOLS01. Dbf
C:\ORA8\ORADATA\ORACLE\INDX01. Dbf
C:\ORA8\ORADATA\ORACLE\RBS01. Dbf
C:\ORA8\ORADATA\ORACLE\TEMP01. Dbf
C:\ORA8\ORADATA\ORACLE\SYSTEM01. Dbf
Query to 7 records.
Record the location and name of the file you want to move.
2. Below we take the document "C:\ORA8\ORADATA\ORACLE\USERS01". DBF "moves to" D:\ORADATA\USERS01. DBF "For example, to move other files, greet the same method (according to the actual situation to modify the file path and name) operation can be.
<1> first let all users stop connecting to the database and close the database. In the Command Line window, enter:
C:\SVRMGRL (carriage return)
Svrmgr>connect Internal (carriage return)
Svrmgr>shutdown Immediate (carriage return)
#等待数据库提示关闭
Svrmgr>exit
<2> Locate the file "USERS01" from the "C:\ORA8\ORADATA\ORACLE\" directory. DBF, and then copy to the directory "D:\ORADATA\" below. Repeat this step if you are moving multiple files.
<3> Enter the command window as follows:
C:\SVRMGRL (carriage return)
Svrmgr>connect Internal (carriage return)
Svrmgr>startup Mount (carriage return)
#等待数据库提示装载成功
Svrmgr>alter database Rename file ' C:\ORA8\ORADATA\ORACLE\USERS01. DBF ' to ' D:\ORADATA\USERS01. DBF ';
#提示语句已处理后, if you want to move multiple files, modify the file path and name and repeat the above statement. Open the database when you are finished.
Svrmgr>alter database open;
Svrmgr>exit
The database file was moved successfully.