Insufficient disk space to move Oracle data files online

Source: Internet
Author: User

When importing data in half, the disk space is insufficient.

This requires that the data of the database files be moved to another disk.

1. offline data files:

SQL> alter database datafile

2 'H: \ Oracle \ product \ 10.2.0 \ oradata \ lhoms \ pub \ test_space.dbf'

3 offline;

The database has been changed.

2. cut and paste data files to other disks

Set H: \ oracle \ product \ 10.2.0 \ oradata \ lhoms \ pub \ test_space.dbf

Paste it to the F: \ oradata \ directory

3. Re-specify the data file path

SQL> alter database rename file 'H: \ oracle \ product \ 10.2.0 \ oradata \ lhoms \ pub \ test_space.dbf 'to 'f: \ oradata \ test_space.dbf ';

The database has been changed.

4. Restore the data file

SQL> recover datafile 'f: \ oradata \ test_space.dbf ';

ORA-00279: Changing 3998546665081 (generated at 13:10:56 on 06/13/2011) is required for thread 1

ORA-00289: Recommended:

H: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ LHOMS \ ARCHIVELOG \ 20151106_13 \ O1_MF_1

_ 2573 _ % U_.ARC

ORA-00280: Change 3998546665081 (for thread 1) in sequence #2573

Specified log: {<RET> = suggested | filename | AUTO | CANCEL}

Auto (optional)

Applied logs.

Media recovery is completed.

5. Online Data Files

SQL> alter database datafile 'f: \ oradata \ test_space.dbf' online;

The database has been changed.

Finished!

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.