Oracle Storage in Action: deleting physical data files

Source: Internet
Author: User

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 table2 --1. View the file ID3 Select file_id,file_name, Tablespace_name fromDba_data_filesOrder  by file_id;4 5 6 --2. G Find the segment, table, partition name stored on the file based on ID7 SelectOwner,segment_name,file_id  fromDba_extentswhere file_id=9;8 9 Ten --3. Completely delete the table, if the table content is valid, first move the table to other tablespace e.g. ALTER table Sql_log move tablespace USERS; One Drop TableTemp_user_extent purge; A Drop Tabletemp_user_segments purge; - Drop TableSql_log purge; -  the  - --4. Delete data Files - ALTERTablespace XH_DMDROPDataFile'F:\DEV\ORACLE-DATA\ORCL\XH_DM_1.DBF';

Tablespace altered.

Oracle Storage in Action: deleting physical data files

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.