How to clear the lonely temporary segments in the Oralce Database

Source: Internet
Author: User
Welcome to the Oracle community forum and interact with 2 million technical staff. In many cases, the temporary segment will not be cleared as imagined, but will stay for n hours, this will cause the tablespace to run improperly and overflow. To avoid such problems, the database administrator can regularly activate and clear the lonely temporary segments. Cause: When

Welcome to the Oracle community forum and interact with 2 million technical staff> in many cases, the temporary Section will not be cleared as imagined, but will stay for n hours, this will cause the tablespace to run improperly and overflow. To avoid such problems, the database administrator can regularly activate and clear the lonely temporary segments. Cause: When

Welcome to the Oracle community forum and interact with 2 million technical staff> enter

In many cases, the temporary segment is not cleared as expected, but has been resident for n hours, which leads to improper operation overflow of the tablespace. To avoid such problems, the database administrator can regularly activate and clear temporary segments.

Cause:

When a segment is deleted, its partitions are not immediately released. After a process deletes a segment, the segment is only changed to a temporary segment of its type. If the statement fails, the Operation will roll back. The temporary segment is usually cleared and released based on the call results. However, if the segment represented by the dictionary cache row is still in use or dirty, the temporary segment clearing will not happen at this time. This usually occurs when the temporary segment is released by recursive call. Because the parent transaction is not committed, the temporary segment is not cleared immediately.

How to clear a lonely temporary segment

Clearing temporary segments and releasing their partitions is a task of the SMON process. Although smon is wakened every five minutes, it is always

Only a temporary segment is checked. Even so, only five temporary segments can be cleared at a time and the lock must be obtained within five seconds. Therefore, clearing temporary segments may take a long time.

However, if smon is awakened by other processes, it will clear the temporary segments. Smon is also awakened when a space transaction fails. Generally, the better method is to use the oradebug wakeup command to wake up.

Example:

Column pid new_value Smon
Set termout off
Select
P. pid
From
Sys. v _ $ bgprocess B,
Sys. v _ $ process p
Where
B. name = 'smon' and
P. addr = B. paddr
/
Set termout on
Oradebug wakeup & Smon
Undefine Smon

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.