Implementation of Oracle Database File Movement

Source: Internet
Author: User

In the actual use process of the Oracle database, it will increase with the increase of the relevant data, and the related files will also increase, when it reaches a certain size, it may cause insufficient disk space; then we can move the database file to another large hard disk partition.

When using Oracle databases, Oracle database files gradually increase as data increases, which may result in insufficient hard disk space; then we can move the database file to another large hard disk partition. Next I will take the Oracle for Windows version to move the database files on drive C to drive D as an example to introduce the methods and steps for moving Oracle database files.

1. Connect to the Oracle database of the file to be moved in sqlplus, 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_NAMEC: \ 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

7 records found.

Record the location and name of the file to be moved.

2. next, we will move the file "C: \ ORA8 \ ORADATA \ ORACLE \ USERS01.DBF" to "D: \ ORADATA \ USERS01.DBF" as an example to introduce how to move other files, install the same method (modify the file path and name according to the actual situation.

<1> first, stop all users from connecting to the database and shut down the database. In the command line window, enter:

C: \ svrmgrl (Press ENTER) SVRMGR> connect internal (Press ENTER) SVRMGR> shutdown immediate (Press ENTER) Wait for the Oracle database prompt to close SVRMGR> exit

<2> find the file "USERS01.DBF" in the "C: \ ORA8 \ ORADATA \ ORACLE \" directory and copy it to the directory "D: \ ORADATA. If you move multiple files, repeat this step.

<3> enter the command window and enter the following content:

C: \ svrmgrl (Press ENTER)

SVRMGR> connect internal (Press ENTER)

SVRMGR> startup mount (Press ENTER)

Wait until the database prompts that the load is successful

 
 
  1. SVRMGR>alter database rename file 'C:\ORA8\ORADATA\ORACLE\USERS01.DBF' to 'D:\ORADATA\USERS01.DBF'; 

After the prompt that the statement has been processed, if you want to move multiple files, modify the file path and name and then run the preceding statement again. Open the database.

 
 
  1. SVRMGR>alter database open;  
  2. SVRMGR>exit  

The Oracle database file is successfully moved.

Article by: http://database.csdn.net/c_oracle/tag/1

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.