ORA-1652: Unable To&nb…

本文介绍了解决在RAC配置下遇到ORA-1652错误的方法,包括两个主要案例:脚本失败及警报日志中出现错误但脚本仍成功运行的情况,并提供了详细的解决方案。

<wbr></wbr>

<wbr></wbr>

ID

<wbr></wbr>

RAC databases and ORA-1652: Unable To Extend Temp Segment By %s In Tablespace TEMP [ID 258941.1]

转到底部

<wbr></wbr>


修改时间:2012-2-7类型:PROBLEM状态:MODERATED优先级:3

注释 (0)

<wbr></wbr>

<wbr></wbr>

<wbr></wbr>

In this Document
Symptoms
Changes
Cause
Solution
References


This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 10.2.0.1 - Release: 9.2 to 10.2
Information in this document applies to any platform.
***Checked for relevance on 06-Feb-2012***

Symptoms

Scripts may fail due to ORA-1652 "unable to extend temp segment by %s in
tablespace TEMP"
although free space exists in TEMP tablespace in a RAC database configuration.
Also scripts may not fail you may find error messages (ORA-1652)
inside the alert.log of some of the instances.

Changes

Migrate to RAC configuration.
Use Default Temporary Tablespace feature.

Cause

We have 2 separate bugs here:
bug 2934117 : ORA-1652:CAN'T ACQUIRE FREE EXTENTS OWNED BY OTHER NODE
for when scripts fail and also
bug 2858082 : EVEN IF THE FREE EXTENTS ARE AVAILABLE, ORA-1652 OCCURS IN ALERT.
LOG ON RAC
when scripts do not fail but errors appear inside alert.log of RAC instances.

Solution

1st Case bug 2934117
====================
Due to bug 2934117 we should NOT use a DEFAULT TEMPORARY TABLESPACE
for RAC database configuration, otherwise scripts could fail with ORA-1652 as a RAC node
cannot acquire free extents that are owned by another RAC instance although they are free.

bug 2934117 is fixed in 9205 and all versions of Oracle 10. Therefore, the best solution is to apply the latest patch set or to upgrade to a supported version of Oracle.
Another solution is to apply the following workaround:

Workaround
------------------
step 1: Create new normal temp tablespace with minimum size (for example TEMPRAC )
step 2: Set as default temp tablespace TEMPRAC
alter database default temporary tablespace TEMPRAC;
This commands changes all database users temporary tablespace to TEMPRAC
Now previous default temporary tablespace TEMP is a normal temporary tablespace.
step 3: For all database users change back temporary tablespace to TEMP:
alter user default tempory teblespace TEMP;
step 4: shutdown immediate all instances
step 5: startup all instance

Unfortunatelly this TEMPRAC Default Temporary Tablespace cannot be dropped
completely.
We should keep it with small size.
In case new Database users are created, and temporary tablespace is not defined
at creation time, these would
have as temporary tablespace TEMPRAC, so every new user after creation we have
to specify:
alter user temporary tablespace TEMP;
-> in order to change their temporary tablespace to TEMP which is a normal
temporary tablespace.

2nd case bug 2858082
==================

The 2nd issue is caused due to the bug 2858082 "EVEN IF THE FREE EXTENTS ARE
AVAILABLE, ORA-1652 OCCURS IN ALERT.LOG ON RAC "
In this bug although scripts that need Temp tablespace space due to Sort
Operations (order by, group by, join, etc)
are successfull we may see this error message inside alert.log of RAC instances.
When a RAC instance fills its own sort pool of extents, instead of allocation
new extents it may ask for free temp extents
from the other RAC instances. During this operation the ORA-1652 may appear
inside the alert.log although the operation has succeeded.
This bug would only be solved in subsequent releases as it has been
characterised as a low priority issue from development as only dis-affect is that alert.log
may contain such messages but process do not fail.
You can ignore these error messages.

bug 2858082 is now fixed in 9207 10104 and 10201.
Therefore, the best option is to apply the latest patch set.

References

BUG:2934117 - ORA-1652:CAN'T ACQUIRE FREE EXTENTS OWNED BY OTHER NODE

<wbr></wbr>

相关内容

<wbr></wbr>

产品

错误

ORA-1652

<wbr></wbr>

返回页首

窗体底端

确定

<wbr></wbr>

确定取消

<wbr></wbr>

<think>我们被要求解释三个Oracle错误代码:ORA-02002, ORA-55917, 和 ORA-01688。根据用户提供的错误信息,这些错误是在尝试写入审计跟踪(audit trail)时发生的,特别是与表空间SYSAUX中的表AUDsys.CLI_SWP$...有关。 首先,我们逐一解释这些错误代码: 1. **ORA-02002: 写入审计跟踪时出错** ORA-02002错误通常表示在写入审计记录时发生了问题。审计跟踪是Oracle数据库用于记录数据库活动(如登录尝试、对象访问等)的机制。这个错误可能是由于底层存储问题、权限问题或空间不足导致的。 2. **ORA-55917: 表刷新I/O失败(针对日志ID和桶ID)** 这个错误比较少见,根据错误信息,它发生在刷新表(可能是内存中的临时表或审计相关的内部表)时发生了I/O错误。具体指向日志ID为1,桶ID为0。这通常意味着数据库在将数据从内存刷新到磁盘时遇到了问题,可能由磁盘空间不足、磁盘损坏或权限问题引起。 3. **ORA-01688: 无法扩展表...在表空间SYSAUX中** 这是一个非常常见的错误,表示数据库无法在表空间SYSAUX中为表`AUDsys.CLI_SWP$7657cb20$1$1`的分区`HIGH_PART`分配新的区(extent)。具体原因是表空间SYSAUX的空间不足。数据库尝试扩展8192字节(即8KB)但失败。 结合错误信息,整个问题的脉络是: - 数据库试图写入审计跟踪(触发ORA-02002)。 - 在写入过程中,需要刷新一个内部表(可能是审计相关的临时表),但刷新失败(触发ORA-55917)。 - 刷新失败的具体原因是表空间SYSAUX空间不足,无法扩展表(触发ORA-01688)。 因此,根本原因是表空间SYSAUX的空间不足。SYSAUX表空间是Oracle数据库的一个辅助系统表空间,用于存放各种辅助系统组件的数据,如审计数据(AUD$表)、自动工作负载存储库(AWR)等。当SYSAUX表空间不足时,就会导致这些操作失败。 解决方法: 1. 检查SYSAUX表空间的使用情况,确认空间是否真的不足。 2. 如果不足,可以扩展SYSAUX表空间的数据文件(增加大小或添加新的数据文件)。 3. 或者清理SYSAUX表空间中的不必要数据(如过期的审计记录、AWR快照等)。 参考引用[1]中提到了类似的问题(表空间不足)的解决方法,即通过增加数据文件来扩展表空间。虽然引用[1]是针对SYSTEM表空间,但方法同样适用于SYSAUX表空间。 具体步骤(以SYSAUX表空间为例): 1. 以sysdba身份登录数据库: ```sql sqlplus / as sysdba ``` 2. 检查SYSAUX表空间的使用情况: ```sql SELECT tablespace_name, bytes/1024/1024 AS free_space_mb FROM dba_free_space WHERE tablespace_name = 'SYSAUX'; ``` 3. 查看SYSAUX表空间的数据文件路径: ```sql SELECT file_name FROM dba_data_files WHERE tablespace_name = 'SYSAUX'; ``` 4. 扩展表空间(可以选择扩展现有数据文件或添加新数据文件): - 扩展现有数据文件(例如,将数据文件增加2G): ```sql ALTER DATABASE DATAFILE '/path/to/sysaux01.dbf' RESIZE 4G; -- 假设当前是2G,增加到4G ``` - 或者添加新数据文件(推荐,因为不会影响现有文件): ```sql ALTER TABLESPACE SYSAUX ADD DATAFILE '/path/to/sysaux02.dbf' SIZE 2G AUTOEXTEND ON NEXT 512M; ``` 5. 如果不想扩展,也可以清理SYSAUX表空间中的内容。例如,删除过期的审计记录(注意:清理操作需要谨慎,最好在备份后进行): ```sql -- 删除审计记录(示例,具体根据审计策略) DELETE FROM aud$ WHERE ...; COMMIT; ``` 或者使用Oracle提供的清理脚本(如`dbms_audit_mgmt`包)来管理审计记录。 注意:在清理或扩展表空间后,需要重新尝试审计操作。 另外,需要注意的是,错误信息中出现了多次重复的错误(如ORA-55917和ORA-01688),这表明问题可能在同一操作中多次发生,但只要解决了表空间空间不足的问题,这些错误就会消失。 最后,如果问题仍然存在,还需要检查磁盘空间是否充足,以及数据文件的自动扩展是否被禁用(如果是,则启用自动扩展或手动扩展)。 根据以上分析,生成相关问题如下: §§相关问题§§ 1. 如何监控Oracle表空间的使用情况以避免空间不足? 2. 除了扩展表空间,还有哪些方法可以释放SYSAUX表空间的空间? 3. Oracle数据库中的审计跟踪(audit trail)是如何管理的? </think>### Oracle报错代码解析 #### 1. **ORA-02002: 写入审计跟踪时出错** - **根本原因**:审计日志写入失败,通常由底层存储问题引发 - **触发场景**: - 审计表空间空间不足(如SYSAUX满) - 审计表结构损坏或权限异常 - 后台进程(如MMON)无法刷新内存审计数据到磁盘 - **关联影响**:可能导致审计功能失效,但数据库核心操作仍可继续[^1] #### 2. **ORA-55917: 表刷新I/O失败** - **核心机制**:发生在Oracle内存数据刷新到磁盘时 - **关键参数解读**: - `log ID: 1`:关联审计日志流标识 - `bucket ID: 0`:内存桶分区标识(AUD$表的内部结构) - **典型诱因**: - 表空间空间不足(导致无法写入磁盘) - I/O子系统故障(磁盘损坏/权限问题) - Oracle内存管理异常 #### 3. **ORA-01688: 表空间扩展失败** - **错误焦点**:`AUDsys.CLI_SWP$...`分区扩展失败 - **关键细节**: ```text unable to extend table AUDsys.CLI_SWP$7657cb20$1$1 partition HIGH_PART by 8192 in tablespace SYSAUX ``` - **三维解决方向**: 1. **空间问题**:SYSAUX表空间不足(占90%+案例) 2. **对象问题**:审计临时表`CLI_SWP$...`过度增长 3. **配置问题**:表空间自动扩展禁用或文件上限受限 --- ### **问题关联分析** 错误链揭示根本矛盾: $$ \text{ORA-02002} \xrightarrow{\text{触发}} \text{ORA-55917} \xleftarrow{\text{根源}} \underbrace{\text{ORA-01688}}_{\text{SYSAUX空间不足}} $$ 审计写入(02002) → 内存刷新失败(55917) ← 表空间扩展受阻(01688) --- ### 解决方案路径 1. **紧急恢复** ```sql -- 检查SYSAUX使用率 SELECT * FROM dba_free_space WHERE tablespace_name='SYSAUX'; -- 扩展表空间(参考引用[1]) ALTER TABLESPACE SYSAUX ADD DATAFILE '/path/to/newfile.dbf' SIZE 2G; ``` 2. **清理审计数据** ```sql -- 归档并清理历史审计记录 EXEC DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL(...); ``` 3. **预防措施** - 启用表空间自动扩展 - 部署定期审计清理任务 - 监控`DBA_AUDIT_MGMT_CLEAN_EVENTS` ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值