oracle修复sysaux表空间,修复受损的SYSAUX表空间

客户的SYSAUX表空间和对应的数据文件都完全脱机,且归档已经不存在,没办法执行物理级别的恢复。使用TTS迁移也行不通,因为exp和expdp导出元数据会报错;使用expdp、exp按照tablespace、schema导出也行不通,同样会报错;最后的办法是使用exp按照tables的传统方式导出是可以的,但这需要手动处理用户的视图、存储过程、函数、序列、同义词等用户对象,稍微麻烦了一点,不过最终还是OK了。下面贴出一篇指导性的metalink文章,供大家参考:

Fixing a Corrupted SYSAUX Tablespace (文档 ID 950128.1)

修改时间:2013-6-5

200491d1ae6203cbdf7e02dca39a75b1.png类型:HOWTO

In this Document

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 Database - Enterprise Edition - Version 10.2.0.1 and later

Information in this document applies to any platform.

***Checked for relevance on 17-May-2013***

GOAL

How to fix/work-around a corrupted SYSAUX tablespace

SOLUTION

SYSAUX was introduced in 10g to store all auxiliary database metadata related to Oracle options and features. This is a mandatory tablespace and cannot be dropped. Therefore it is important to have all objects in this tablespace accessible at all times.

To find out what is stored in this tablespace, look at V$SYSAUX_OCCUPANTS:

SQL> select occupant_name, space_usage_kbytes from v$sysaux_occupants;

Throughout this document, we are assuming that the datafile 3, belonging to the SYSAUX tablespace, is corrupted.

1- RMAN Block Recovery

RMAN block recovery is only possible if you have a backup and all archivelogs from prior to the time of the corruption. Further, block recovery is only available for Oracle Enterprise Edition.

a) check for corruption

RMAN> backup validate check logical tablespace SYSAUX;

or

RMAN> backup validate check logical datafile 3;

b) Once the above RMAN validate is completed, all corruptions found will be written to this view:

SQL> select * from v$database_block_corruption;

c) If  V$DATABASE_BLOCK_CORRUPTION returns more than one corrupted block, recover them

RMAN> blockrecover corruption list;

2 - Restore and Recover the Corrupted Datafile(s)

If you have a backup of the corrupted file(s), then restore and recover the datafile(s) from backup.

eg:

RMAN> restore datafile 3;

RMAN> recover datafile 3;

SQL> alter database datafile 3 online;

3 - Recreate the Corrupted Object

To identify the corrupted objects, please see . Most indexes can be recreated but only certain tables in the SYSAUX tablespace can be recreated. Please contact Oracle Support if you wish to explore this path.

4 - Export

If all of the above options are exhausted, the last resort is to export the database, schema(s) or table(s), create a new database and import.

As long as the export views are accessible you should be able to perform either a database or schema level export.

If a tablespace level export works you might also consider using Transportable Tablespaces for recreating the database as documented in

Note:733824.1 HowTo Recreate a database using TTS (TransportableTableSpace)

Note: If all datafiles belonging to the SYSAUX are inaccessible then you can only perform export at the table level. Full and schema level export will not work as the export views in SYSAUX are no longer available. You will need to use traditional exp rather than expdp as expdp relies on objects in the SYSAUX tablespace.

eg:

% exp scott/tiger file=xscott.dmp log=xscott.log tables=emp,dept

Once exported, you can import this dump into a new database.

REFERENCES

NOTE:184327.1- ORA-1157 Troubleshooting

NOTE:243246.1- SYSAUX New Mandatory Tablespace in Oracle 10g and higher

NOTE:472231.1- How to identify all the Corrupted Objects in the Database with RMAN

NOTE:733824.1- How To Recreate A Database Using TTS (Transportable TableSpace)

--end--

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Oraclesysaux表空间满了,需要进行清理或扩容操作。可以通过以下步骤进行处理: 1. 查看sysaux表空间的使用情况,确定是否需要扩容或清理。 2. 如果需要扩容,可以使用ALTER TABLESPACE命令进行扩容操作。 3. 如果需要清理,可以使用以下命令进行清理: a. 执行DBMS_SPACE_ADMIN.TABLESPACE_MOVER.PROCEDURE_MOVE_TABLESPACE将表移动到其他表空间。 b. 执行DBMS_SPACE_ADMIN.TABLESPACE_MOVER.PROCEDURE_MOVE_TABLESPACE将索引移动到其他表空间。 c. 执行DBMS_SPACE_ADMIN.TABLESPACE_MOVER.PROCEDURE_MOVE_TABLESPACE将LOB对象移动到其他表空间。 d. 执行DBMS_SPACE_ADMIN.TABLESPACE_MOVER.PROCEDURE_MOVE_TABLESPACE将对象移动到其他表空间。 e. 执行DBMS_SPACE_ADMIN.TABLESPACE_MOVER.PROCEDURE_MOVE_TABLESPACE将对象移动到其他表空间。 f. 执行DBMS_SPACE_ADMIN.TABLESPACE_MOVER.PROCEDURE_MOVE_TABLESPACE将对象移动到其他表空间。 4. 清理完成后,可以再次查看sysaux表空间的使用情况,确保已经解决问题。 ### 回答2: Oracle数据库中的SYSAUX表空间是用于管理和存储系统级别的关键性能数据的空间。当该表空间满时,可能会导致数据库性能下降或无法正常工作。那么,我们该如何处理这种情况呢? 首先,我们可以通过查询V$SYSAUX_OCCUPANTS视图来确定哪些对象占用了SYSAUX表空间,并分析这些占用情况。通过该视图,我们可以得知哪些对象是占用空间比较大的,可以采取针对性的对其进行管理和优化,比如移除或重建该对象。 其次,我们可以通过执行自动维护任务来释放SYSAUX表空间中不必要的数据。Oracle自动在SYSAUX表空间中创建了若干个自动维护任务,这些任务定时执行清理、移除或归档等操作,可以释放出一定的空间。我们可以通过查询DBA_AUTOTASK_CLIENT视图来查看自动维护任务的设置情况,并可以修改或禁用不必要的任务来释放更多的空间。 另外,我们可以考虑对SYSAUX表空间进行扩展,以增加其存储容量。在扩展SYSAUX表空间时,我们需要确保数据文件存储在一个有效的磁盘位置,并要注意数据文件的分布和扩展方式。在扩展完毕后,我们需要重新分配表空间数据文件中的数据块,并重新计算表和索引的size,以保证数据结构的正确性和性能的稳定性。 综上所述,当SYSAUX表空间满了时,我们不必过于紧张,可以通过几种方式来解决问题。同时,我们也需要定期对数据库进行管理和优化,在日常运维过程中及时排查各种问题,以避免出现系统崩溃、数据丢失等问题。 ### 回答3: Oracle中的sysaux表空间是用来存储系统级别的常用数据和信息的,包括一些企业管理以及可选组件等等,通常占据大量的空间。当sysaux表空间满了时,会对数据库的正常运行造成重大影响,因此需要及时处理。 当sysaux表空间满了,我们可以采取以下措施: 1. 压缩sysaux表空间:对sysaux表空间中的数据进行压缩,从而减小该表空间的大小。可以使用Oracle提供的压缩工具或第三方工具来实现。 2. 重新分配sysaux表空间大小:通过修改数据库参数或使用Oracle提供的ALTER TABLESPACE命令进行重新分配表空间大小,以便更好地管理数据库空间,并解决sysaux表空间满的问题。 3. 清理和删除不必要的信息:可以通过查询sysaux表空间中的数据来确定哪些信息已过时或不再需要。然后,将这些信息清理并从sysaux表空间中删除,进一步减小表空间的大小。 总之,当Oracle中的sysaux表空间满了时,需要针对具体情况采取相应的措施来解决问题。在处理sysaux表空间的问题时,需慎重行事,以免影响整个数据库的正常运行。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值