Oracle创建新undo表空间最佳实践(包含段检查)

所属分类: 数据库 / oracle 阅读数: 1873
收藏 0 赞 0 分享

在处理一则ORA-600 [4194]案例时,参考MOS文档:Step by step to resolve ORA-600 4194 4193 4197 on database crash (文档 ID 1428786.1)

1.对于ORA 600[4194]的解释

2.创建新undo表空间最佳实践(包含段检查)

1.对于ORA 600[4194]的解释:

The following error is occurring in the alert.log right before the database crashes.
ORA-00600: internal error code, arguments: [4194], [#], [#], [], [], [], [], []
This error indicates that a mismatch has been detected between redo records and rollback (undo) records.
ARGUMENTS:
Arg [a] - Maximum Undo record number in Undo block
Arg [b] - Undo record number from Redo block
Since we are adding a new undo record to our undo block, we would expect that the new record number is equal to the maximum record number in the undo block plus one. Before Oracle can add a new undo record to the undo block it validates that this is correct. If this validation fails, then an ORA-600 [4194] will be triggered.

可以看到,此错误是因为redo和undo的记录不匹配。常见于异常断电等场景。

2.创建新undo表空间最佳实践(包含段检查)

Best practice to create a new undo tablespace.
his method includes segment check.
 Create pfile from spfile to edit
SQL> Create pfile='/tmp/initsid.ora' from spfile;
 Shutdown the instance
 set the following parameters in the pfile /tmp/initsid.ora
 undo_management = manual
 event = '10513 trace name context forever, level 2'
 SQL>>startup restrict pfile='/tmp/initsid.ora'
 SQL>select tablespace_name, status, segment_name from dba_rollback_segs where status != 'OFFLINE';
This is critical - we are looking for all undo segments to be offline - System will always be online.
If any are 'PARTLY AVAILABLE' or 'NEEDS RECOVERY' - Please open an issue with Oracle Support or update the current SR. There are many options from this moment and Oracle Support Analyst can offer different solutions for the bad undo segments.
If all offline then continue to the next step
 Create new undo tablespace - example
SQL>create undo tablespace <new undo tablespace> datafile <datafile> size 2000M;
 Drop old undo tablespace
SQL>drop tablespace <old undo tablespace> including contents and datafiles;
 SQL>shutdown immediate;
SQL>startup nomount; --> Using your Original spfile
. Modify the spfile with the new undo tablespace name
SQL> Alter system set undo_tablespace = '<new tablespace created in step 6>' scope=spfile;
. SQL>shutdown immediate;
. SQL>startup; --> Using spfile

以上所述是小编给大家介绍的Oracle创建新undo表空间最佳实践(包含段检查),希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!

更多精彩内容其他人还在看

Oracle 子程序参数模式,IN,OUT,NOCOPY

Oracle 子程序参数模式主要有IN,OUT,NOCOPY,IN和OUT可以组合,OUT和NOCOPY也可以组合使用.
收藏 0 赞 0 分享

Oracle 存储过程加密方法

Oracle 存储过程加密方法,需要的朋友可以参考下。
收藏 0 赞 0 分享

oracle 多个字符替换实现

CSDN上的一个网友,需要一个sql语句的解决方案需求是这样的求写oracle多个字符替换(有测试数据)
收藏 0 赞 0 分享

Oracle 存储过程教程

一个简单的oracle分页存储过程的实现和调用。在看了众多的分页存储过程以后发现都是针对sqlserver的,而没有oracle的,因此想写一个关于oracle的存储过程,因为我用到的数据库是oracle。
收藏 0 赞 0 分享

oracle 更改数据库名的方法

这两天一朋友问如何更改数据库名,于是做个测试,简单记录下,以便说明问题。
收藏 0 赞 0 分享

Oracle 分析函数RANK(),ROW_NUMBER(),LAG()等的使用方法

Oracle分析函数RANK(),ROW_NUMBER(),LAG()等的使用方法,需要的朋友可以参考下。
收藏 0 赞 0 分享

Oracle字符集修改查看方法

Oracle字符集修改查看方法,需要的朋友可以参考下。
收藏 0 赞 0 分享

一些实用的sql语句

一些实用的sql,需要的朋友可以参考下。
收藏 0 赞 0 分享

Oracle中sys和system的区别小结

SYS用户具有DBA权限,并且拥有SYS模式,只能通过SYSDBA登陆数据库。是Oracle数据库中权限最高的帐号 SYSTEM具有DBA权限。但没有SYSDBA权限。平常一般用该帐号管理数据库就可以了。
收藏 0 赞 0 分享

oracle 存储过程和触发器复制数据

oracle 存储过程和触发器复制数据的代码,需要的朋友可以参考下。
收藏 0 赞 0 分享
查看更多