Reclaim temporary table space ORA-03297 problem Solving

Source: Internet
Author: User

Today found temporary table space reached 15G, but the utilization rate is only 2% less, recycling

sql> ALTER DATABASE tempfile ' D:\ORACLE\ORADATA\YNRMDB\TEMP01.DBF ' resize 2048M;

ALTER DATABASE tempfile ' D:\ORACLE\ORADATA\YNRMDB\TEMP01.DBF ' resize 2048M

*

ERROR is on line 1th:

ORA-03297: file contains data that is used outside of the RESIZE value of the request

It looks like the usual method is more troublesome.

SQL>alter database tempfile 'd:\oracle\oradata\ynrmdb\temp01.dbf' drop ;
Database altered.
SQL>alter tablespace temp add tempfile
  2'd:\oracle\oradata\ynrmdb\temp01.dbf'
  3 size 2048M reuse autoextend on next 100M;
Tablespace altered.
SQL> select d.file_name, d.file_id, d.tablespace_name, d.bytes from dba_temp_files d;

file_name file_id Tablespace_name BYTES

------------------------------------ ---------- --------------- ----------

D:\ORACLE\ORADATA\YNRMDB\TEMP01. DBF 1 TEMP 2147483648

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.