Migration of Linux Oracle Database Files

Source: Internet
Author: User

Linux Oracle is a common system, so I learned about Linux Oracle. Here I will introduce the application of Linux Oracle System in detail and hope it will be useful to you. In the use of Linux Oracle databases, database files gradually increase with the increase of data, which may result in insufficient hard disk space after reaching a certain size;

In Linux Oracle, we can move database files to another large hard disk partition. Next, I will take the database file on drive C in the Linux Oracle for Windows version as an example to introduce the methods and steps for moving the file on the Linux Oracle database.

1. Connect to the Linux Oracle Database of the file to be moved in sqlplus, and run the following SQL statement to view the File Location of the Linux Oracle database:

 
 
  1. SQL> select file_name from sys.dba_data_files;  
  2. FILE_NAME  
  3. C:\ORA8\ORADATA\Linux Oracle\USERS01.DBF  
  4. C:\ORA8\ORADATA\Linux Oracle\DR01.DBF  
  5. C:\ORA8\ORADATA\Linux Oracle\TOOLS01.DBF  
  6. C:\ORA8\ORADATA\Linux Oracle\INDX01.DBF  
  7. C:\ORA8\ORADATA\Linux Oracle\RBS01.DBF  
  8. C:\ORA8\ORADATA\Linux Oracle\TEMP01.DBF  
  9. C:\ORA8\ORADATA\Linux Oracle\SYSTEM01.DBF 

7 records are found. The location and name of the file to be moved are recorded.

2. next, we will move the file "C: \ ORA8 \ ORADATA \ Linux Oracle \ USERS01.DBF" to "D: \ ORADATA \ USERS01.DBF" as an example to introduce how to move other files, change 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:

 
 
  1. C: \ sqlplus/nolog (Press ENTER)
  2. SQL>Connect/as sysdba (Press ENTER)
  3. SQL>Shutdown immediate (Press ENTER)
  4. # Wait for the database prompt to close
  5. SQL>Exit

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

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

 
 
  1. C: \ sqlplus/nolog (Press ENTER)
  2. SQL>Connect/as sysdba (Press ENTER)
  3. SQL>Startup mount (Press ENTER)
  4. # Wait until the database prompts that the load is successful
  5. SQL>Alter database rename file 'C: \ ORA8 \ ORADATA \ Linux Oracle \ users01.dbf' to 'd: \ ORADATA \ users01.dbf ';
  6. # After the prompt statement is processed, if you want to move multiple files, modify the file path and name and then run the preceding statement again. Open the database.
  7. SQL>Alter database open;
  8. SQL>Exit

The database file is successfully moved. The preceding steps start with a tool:

  1. Linux Oracle accesses MySQL Client software
  2. Linux Oracle can be installed on WMware virtual machines
  3. Linux Oracle 10 Gb software installation database
  4. Linux management tool installation package and add source
  5. Common commands and functions of Unix Linux operating system

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.