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

 
 Home
 E-mail Us
 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-01659: Unable to Allocate MINEXTENTS Beyond String in Tablespace String

Expert Oracle Tips by Burleson Consulting

February 28, 2011

 

Question:  I am trying to restore to a backup instance on a backup server. When I try to recreate the tables I keep getting a ORA-01659 error message.  The tablespaces and datafiles on both servers show as the same size in OEM.

I have dropped all tables and OEM shows tablespaces are empty. Then I run a script to recreate all tables. Most of the tables don't get created because their TS is full. After the script to recreate all tables runs, the main tablespaces are full, more full than on the production machine. I have also tried:

ALTER TABLESPACE xxx COALESCE;

on each tablespace right after dropping all tables and before recreating them to reclaim free space.

Why is it full?

I?ve only dropped and created the tables, there shouldn?t be any data in them yet.  Here's the error message:

ORA-01659: unable to allocate MINEXTENTS beyond 2 in tablespace PLUS_TS

The backup instance was already there, all I did was drop the tables. Here's what I ran on prod to build a script to recreate the tables on backup server.

SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name) ||'; '
FROM USER_TABLES u;

What do you think; how can I fix this?

Answer:  To diagnose any error, you start by using the oerr utility to fully display the ORA-01659 error:

ORA-01659: unable to allocate MINEXTENTS beyond string in tablespace string

Cause: Failed to find sufficient contiguous space to allocate MINEXTENTS for the segment being created.

Action: Use ALTER TABLESPACE ADD DATAFILE to add additional space to the tablespace or retry with smaller value for MINEXTENTS, NEXT or PCTINCREASE

MINEXTENTS specifies the number of initial extents for the object. Generally, except for rollback segments, it is set to 1. If a large amount of space is required and there is not enough contiguous space for the table, setting a smaller extent size and specifying several extents may solve the problem. The values for INITIAL, NEXT, and PCTINCREASE are used when calculating the extent sizes for the number of extents requested.  Also, make sure that you define all tables with "maxextents unlimited" and set tablespaces with "autoextend on":

You need to troubleshoot the ORA-01659 error by KNOWING the fragmentation within the tablespace!  I would try these things:

  • Try setting a smaller extent size and specifying several extents for each table.
  • Check all contiguous free space in the tablespace.
  • Run a tablespace mapper script to see exactly what is in the tablespace.
  • Try removing all storage clauses from the table DDL and use the default MINEXTENTS for each tablespace
  • Try an alter tablespace xxx coalesce; command.

Regarding tablespaces and OEM, OEM is not nearly as powerful or flexible as writing your own tablespace monitoring scripts.  You need to map the tablespace and see exactly why Oracle thinks that it is full.  Start with this handy Oracle free space script.

The query to map a tablespace is complex, but you can download some great tablespace management scripts with the BC Oracle scripts collection with Oracle scripts for tuning and monitoring, a professional download of over 600 Oracle scripts.

If your goal is to always prevent these types of errors, I have monitoring scripts that will alert you when the tablespace is nearly full, and it will send you an e-mail before you get the ORA-01659 error.  These can be found in my Oracle Tuning book. 

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

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 -  2014

All rights reserved by Burleson

Oracle ? is the registered trademark of Oracle Corporation.


 

��  
 
 

 
 
 
 
oracle dba poster
 

 
 
Oracle performance tuning software 
 
Oracle Linux poster