Oracle Database mobile data files, log files, and control files

Source: Internet
Author: User

1. Shut down the database
SQL> shutdown immediate;
2. Move data files and log files to a new location
SQL> host mv/u01/olddata. dbf/u02/newdata. dbf;
SQL> host mv/u01/oldredo. log/u02/newredo. log;
3. Start the database in load mode
SQL> startup mount;
4. Change the path of data files and log files in the database.
SQL> alter database rename file '/u01/olddata. dbf' to'/u02/newdata. dbf ';
5. Shut down the database
SQL> shutdown immediate;
6. Copy Control Files
SQL> host mv/u01/oldcontrol. ctl/u02/newcontrol. ctl;
7. Modify the location of the control file in the parameter file
SQL> create pfile from spfile;
Modify the control file location in the initialization parameter file
SQL> create spfile from pfile;
8. Start the database
SQL> startup;

Note: Changing the path of the data file and Log File changes the content of the control file.

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.