当前位置: 首页 > news >正文

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--

相关文章:

  • matlab runge现象,龙格现象matlab算法.doc
  • oracle支持分区移动,Oracle 12c 新特性 --- 移动分区支持数据过滤
  • linux如何打开控制端口tty2,linux – 如何检测属于gsm/3g-modem的tty是数据还是控制端口?...
  • linux服务器安装xfce,Ubuntu 16.10安装Xfce桌面与VNC远程连接
  • linux个图形界面对比,Linux对比文件,很好用的图形界面
  • Linux配置与管理samba服务器,Linux Samba服务器配置与管理
  • linux邮箱客户端配置,Linux下安装使用Mutt邮件客户端并配置邮件警报功能
  • linux heartbeat rpm,Heartbeat 3.0.3 介绍及rpm
  • linux rsh用法,Linux中rsh远程shell命令的使用技巧解析
  • C语言字符输入回车时停止,解决C语言输入单个字符屏蔽回车符的问题
  • 二分法查找字符串 c语言,c语言二分法如何实现查找数组元素
  • c++语言常量,C++常量(constant)
  • 64平台的c语言int类型值比32平台大,C语言数据类型32位和64位不同
  • c语言输入10个数从小,C语言中,从键盘输入10个数,从小到大排列输出,怎
  • 得到 android组件,android 获取HOME组件的Activity信息
  • [rust! #004] [译] Rust 的内置 Traits, 使用场景, 方式, 和原因
  • [译]Python中的类属性与实例属性的区别
  • 【5+】跨webview多页面 触发事件(二)
  • 【挥舞JS】JS实现继承,封装一个extends方法
  • Android路由框架AnnoRouter:使用Java接口来定义路由跳转
  • Bootstrap JS插件Alert源码分析
  • create-react-app项目添加less配置
  • FineReport中如何实现自动滚屏效果
  • isset在php5.6-和php7.0+的一些差异
  • JAVA 学习IO流
  • rabbitmq延迟消息示例
  • Sass 快速入门教程
  • Webpack 4x 之路 ( 四 )
  • 浮动相关
  • 工作手记之html2canvas使用概述
  • 前端性能优化--懒加载和预加载
  • 如何使用Mybatis第三方插件--PageHelper实现分页操作
  • 小程序开发中的那些坑
  • 小而合理的前端理论:rscss和rsjs
  • 一个项目push到多个远程Git仓库
  • 赢得Docker挑战最佳实践
  • - 语言经验 - 《c++的高性能内存管理库tcmalloc和jemalloc》
  • 正则学习笔记
  • ​水经微图Web1.5.0版即将上线
  • #{} 和 ${}区别
  • #Spring-boot高级
  • #考研#计算机文化知识1(局域网及网络互联)
  • #我与Java虚拟机的故事#连载16:打开Java世界大门的钥匙
  • (4) openssl rsa/pkey(查看私钥、从私钥中提取公钥、查看公钥)
  • (MIT博士)林达华老师-概率模型与计算机视觉”
  • (安卓)跳转应用市场APP详情页的方式
  • (编程语言界的丐帮 C#).NET MD5 HASH 哈希 加密 与JAVA 互通
  • (附源码)ssm码农论坛 毕业设计 231126
  • (函数)颠倒字符串顺序(C语言)
  • (每日持续更新)jdk api之FileFilter基础、应用、实战
  • (收藏)Git和Repo扫盲——如何取得Android源代码
  • (转)Linux下编译安装log4cxx
  • .bat批处理(八):各种形式的变量%0、%i、%%i、var、%var%、!var!的含义和区别
  • .bat批处理(十):从路径字符串中截取盘符、文件名、后缀名等信息
  • .describe() python_Python-Win32com-Excel