Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

ORA-03297 Tips

Oracle Database Tips by Donald BurlesonDecember 8,  2015

 

Question:  When I attempt to let go of space by resizing my datafile I get ORA-03297.  How do I get around this ORA-03297 error and resize my data file?

ALTER DATABASE DATAFILE '/d001/pi2006_01.dbf' RESIZE 3000M;
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value

Answer:  First, always remember that disk has become very cheap, and you should only reclaim space in an emergency when you have mis-judged your disk space requirements.  The Oracle documentation notes the following about ORA-03297:

ORA-03297: file contains used data beyond requested RESIZE value

Cause: Some portion of the file in the region to be trimmed is currently in use by a database object

Action: Drop or move segments containing extents in this region prior to resizing the file, or choose a resize value such that only free space is in the trimmed.

Here is a sequence of steps to fix the ORA-03297 error:

1 - First, query the dba_extents view, and run oracle scripts to map out the free space in the data file.

2 - Purge the recycle bin and try again. 

3 - Try coalescing the tablespace (alter tablespace fred coalesce;)

If these do not fix the ORA-03297 error, you need to reorganize the objects in the tablespace's data file such that there is only free space into the area that you want to delete.  To reorganize the objects in the data files tablespace, you have these options:

- Try "alter tablespace" coalesce

- Reorganize objects with Data Pump export/import

- The "alter table" shrink space command

- Use "alter index" rebuild (if there are indexes in the tablespace)

- Reorganize the tablespace objects with dbms_redefinition or Create table As Select (CTAS) - This copies the table rows into a clean area, lowering the high-water-mark, and packing the rows densely.

Phillip Bracken notes these solutions on the ORA-03297 error:

"You are trying to shrink the tablespace below its high water mark. If you are running Oracle 10g and are using locally management tablespaces with Automatic Storage Management and row movement enabled on the tables, you could issue an Alter Table Shrink.

If you are not at Oracle 10g or are not using locally managed tablespaces, the only way around this is to drop or move the tables or indexes containing extents above region in the tablespace you are trying to resize it to, or try a different size that is not below the tablespace's high water mark."


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.