Oracle clean up and rebuild temporary table space

Source: Internet
Author: User
Tags create index

Normally, Oracle automatically frees up temporary segment A when it completes a sort operation that uses the temp table space, such as a SELECT statement, create INDEX, and so on. But some of us will encounter the temporary segment has not been released, the temp table space is almost full situation, even if we restart the database still does not solve the problem. This issue in the forum is also often asked by netizens, the following I sum up, give several processing methods.

Law One, restart the library

Library restart, the Smon process will complete temporary segment release, temp table space cleanup operations, but many times our library is not allowed down, so this method is missing a bit of application opportunities, but this method is still very useful.

A method given by law two and Metalink

Modify the temp table Space storage parameter, let the Smon process view the temporary segment, so as to achieve cleanup and temp table space.

Sql>alter tablespace temp Increase 1;

Sql>alter tablespace temp Increase 0;

Method Three, I commonly used a method, the specific contents are as follows:

1. Use the following statement A to see who is using the temporary paragraph

  SELECT username,

  sid,

  serial#,

  sql_address,

  machine,

  program,

  tablespace,

  segtype,

  contents

  FROM v$session se,

  v$sort_usage su

  WHERE se.saddr=su.session_addr

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.