Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, krishna.

Asked: October 21, 2015 - 3:41 am UTC

Last updated: October 21, 2015 - 4:18 am UTC

Version: 11g

Viewed 1000+ times

You Asked


Question-1

Am seeing below temp segment error in my project (Development environment) frequently.

ORA-01652 unable to extend temp segment by 128 in tablespace

We used to report DBA team and I think they add some tablespace and finally solving the issue.

How can we avoid this exception in future by taking any proactive steps?

Question-2

Need your complete guidance please for following topics from basics to advanced.

(a) SQL Peformance Tuning
(b) Database Design

Regards,
Krishna

and Connor said...

Q1)

You needed some temporary storage to do something, for example, sort a large result, or load a temporary table, or do a large join etc...We exceeded the memory we were allowed, so we dumped to disk...and then we exceeded the disk we were allocated hence the error.

So the solutions are:
1- dont do such large operations to temp (ie, this might be an indicator that you might have some poorly written code)
2 - allocate more temporary space. Temporary space is not backed up, so its not going to make backups larger or slower etc.

Q2)

Check the resources section on AskTom

Architecture/Development

http://www.amazon.com/dp/1430262982/ref=cm_sw_su_dp

Design

http://www.amazon.com/dp/0071850090/ref=cm_sw_su_dp

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

There is another thing....

ERadaell, October 21, 2015 - 7:14 pm UTC

This error could occur on permanent tablespaces too (and seems to be the case).
That said, i'd advise you (and your DBAs) to use "autoextend" on datafiles and create a script to monitor this behavior (when the datafile is almost hitting the maxsize). You'll need access to dba_data_files and dba_tablespaces.

Also, you must notify the DBAs about unusual big data loads. They will create new datafiles to accomplish this load.

If that will not solve the entire problem, at least it's a good start.