Oracle Storage in Action: Delete physical data files, oraclestorage

Source: Internet
Author: User

Oracle Storage in Action: Delete physical data files, oraclestorage

Alter tablespace XH_DM drop datafile 'f: \ DEV \ ORACLE-DATA \ ORCL \ XH_DM_1.DBF ';

SQL> ALTER TABLESPACE XH_DM
2 drop datafile 'f: \ DEV \ ORACLE-DATA \ ORCL \ xh_dm_1.dbf ';
Alter tablespace XH_DM
*
ERROR at line 1:
ORA-03262: the file is non-empty

 

1 -- Oracle Storage deletes an invalid data file and the above invalid Table 2 -- 1. view the file ID 3 select file_id, file_name, tablespace_name from dba_data_files order by file_id; 4 5 6 -- 2.G search for the segments, tables, and partition names stored on the file by ID 7 select owner, SEGMENT_NAME, FILE_ID from dba_extents where file_id = 9; 8 9 10 -- 3. permanently delete the table. If the table content is valid, first move the table to another tablespace e.g. alter table SQL _LOG move tablespace users; 11 drop table temp_user_extent purge; 12 drop table TEMP_USER_SEGMENTS purge; 13 drop table SQL _log purge; 14 15 16 -- 4. delete the DATA file 17 alter tablespace XH_DM drop datafile 'f: \ DEV \ ORACLE-DATA \ ORCL \ xh_dm_1.dbf ';

 

Tablespace altered.

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.