Ora-01652: Unable to scale temp segments through 128 (in tablespace space)

Source: Internet
Author: User

Ora-01652: unable to extend temp segment via 128 (in tablespace space) when space = user tablespace is reported error: -- View tablespace size; SQL> SELECT TABLESPACE_NAME, SUM (BYTES)/1024/1024 mb from DBA_FREE_SPACE group by TABLESPACE_NAME; -- view the path where data files are stored in the tablespace: SQL> SELECT TABLESPACE_NAME, BYTES/1024/1024 FILE_SIZE_MB, FILE_NAME FROM DBA_DATA_FILES; -- error handling: extra table space -- alter tablespace TESTSPACE add datafile 'd: \ MYSPACE01.DBF 'size 20480 m when "space = temp" an error is reported: Temporary tablespace knowledge points Summary The role of the time tablespace: temporary tablespace is mainly used for sorting operations in the database [such as creating indexes, order by and group by, distinct, union/intersect/minus/, sort-merge, join, and analyze commands], provides temporary computing space for managing indexes, such as creating indexes, importing data to IMP, and accessing views, after the computation is completed, the system automatically cleans it up. When the temporary tablespace is insufficient, the operation speed is abnormally slow, and the temporary tablespace rapidly increases to the maximum space (the limit of expansion), and is generally not automatically cleared. If the temporary tablespace is not set to auto-scale, when the temporary tablespace is not enough, the current affairs execution will report an error where the ora-01652 cannot extend the temporary segment, and the solution is also simple: 1. Set automatic expansion of temporary data files, or 2. Increase the temporary tablespace. Temporary tablespace related operations: query the DEFAULT temporary tablespace: SQL> select * from database_properties where property_name = 'default _ TEMP_TABLESPACE '; PROPERTY_NAME------------------------------PROPERTY_VALUE--------------------------------------------------------------------------------DESCRIPTION--------------------------------------------------------------------------------DEFAULT_TEMP _ TABLESPACETEMPName of default temporary tablespace Query the temporary tablespace status: SQL> select tablespace_name, file_name, bytes/1024/1024 file_size, autoextensible from dba_temp_files; TABLESPACE_NAME------------------------------FILE_NAME export FILE_SIZE AUT ---------- --- TEMP/opt/oracle/oradata/TEST/temp01.dbf 65 YES query temporary tablespace Dynamic View: SQL> select * from v $ tempfile; FILE # CREATION_CHANGE # CREATION_TIM T S # RFILE # STATUS ---------- BYTES ---------- ------- enabled bytes blocks CREATE_BYTES BLOCK_SIZE ---------- BYTES ---------- NAME limit 1 446436 BYTES 3 1 hour WRITE 68157440 8320 20971520 8192/opt/oracle/oradata /TEST/temp01.dbf: method 1: Increase the temporary file size: SQL> Alter database tempfile '/opt/oracle/oradata/TEST/temp01.dbf' resize 100 m; Database altered. method 2: Set the temporary data file to automatic extension: SQL> alter database tempfile '/opt/oracle/oradata/TEST/temp01.dbf' autoextend on next 5 m maxsize unlimited; when the tablespace is expanded, an error is returned: SQL> alter database tempfile '/opt/oracle/oradata/TEST/temp01.dbf' resize 100 m; alter database tempfile '/opt/oracle/oradata/TEST/temp01.dbf' resize 100 m * ERROR at line 1: ORA-00376: file 201 cannot be read at this timeORA-01110: data file 201: '/opt/oracle/oradata/TEST/temp01.dbf' SQL> alter database tempfile'/opt/oracle/oradata/TEST/temp01.dbf' autoextend on next 5 m maxsize unlimited; alter database tempfile '/opt/oracle/oradata/TEST/temp01.dbf' autoextend on next 5 m maxsize unlimited * ERROR at line 1: ORA-00376: file 201 cannot be read at this timeORA-01110: data File 201: '/opt/oracle/oradata/TEST/temp01.dbf'. The reason is that the temporary tablespace does not know why it is offline. After it is changed to online, it is modified successfully. SQL> alter database tempfile '/opt/oracle/oradata/TEST/temp01.dbf' online; Database altered.

Related Article

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.