ora-01652 Unable to extend temp segment by 128 (in Tablespace temp)

Source: Internet
Author: User
Tags create index extend file size sort
Create INDEX I_trace_hotel_1 on Trace_hotel (roomno,id_code) tablespace trace_hotel_idx nologging parallel
*
Line 1th Error:
ORA-12801: Error signal in parallel query server P005
ORA-01652: Unable to extend temp segment by 128 (in Tablespace temp)

Error during index creation


The role of temporal tablespace:

The primary purpose of the temporary tablespace is to sort operations in the database [such as creating indexes, order by and group BY, DISTINCT, union/intersect/minus/, Sort-merge and joins, analyze commands], managing indexes [ such as creating an index, IMP for data import], access to views and other operations to provide temporary computing space, when the operation is complete, the system will automatically clean up.

When the temporary table space is low, it behaves as if the operation speed is unusually slow, and the temporal table space rapidly increases to the maximum space (the extended limit), and is generally not automatically cleaned up.

If the staging table space is not set to auto-scale, the transaction execution will report an error that ora-01652 cannot extend the temporary table space when the temporary tablespace is not sufficient.

Of course, the solution is also very simple: 1, set the temporary data file automatically expand, or 2, increase the temporary table space.

Querying the temporal tablespace state:

sql> Select tablespace_name,file_name,bytes/1024/1024 file_size,autoextensible from Dba_temp_ Files

Query default temporal tablespace:

sql> select * from database_properties where property_name= ' default_temp_tablespace ';

Extend temporary tablespace:

method One, increase temporary file size:

sql> ALTER DATABASE tempfile '/U01/APP/ORACLE/ORADATA/ORCL/TEMP01.DBF ' resize100m  ;

Database altered.

Method Two, set the temporary data file to auto-expand:

sql> ALTER DATABASE tempfile '/U01/APP/ORACLE/ORADATA/ORCL/TEMP01.DBF ' autoextend on next 5m MaxSize Unlimited;

Finally found that the temporary tablespace file is 32G, reached the maximum file size, had to add files.

    ALTER tablespace TEMP     ADD 
    tempfile '/u02/oradata/vids/default_lib/temp03.dbf '  SIZE  5M
    Autoextend on   NEXT  



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.