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

ALTER SYSTEM CHECK DATAFILES

RAC环境中,当数据库OPEN状态时,如果遇到数据文件在其它一台实例,因为权限原因导致不能访问时,如1157报错

ORA-01157: cannot identify/lock data file 19 – see DBWR trace file

ORA-01110: data file 19: ‘/app/Oracle/oradata/users02.dbf’

此时我们需要使用alter system check datafiles来验证数据文件的信息并存放在SGA中,而不需要重启实例。语法如下:

alter system check datafiles global|local

默认为global,此命令不会验证ONLINE的数据文件

 
Problem Description:
====================

When running “ALTER SYSTEM CHECK DATAFILES” it delivers a “STATEMENT PROCESSED” but there is no recorded activity. There is no alert file even though the book says there is.
 
You can do an ALTER SYSTEM CHECK DATAFILES if the database is only mounted. But the command does not return an error if a datafile is missing.

 

Solution Description:
=====================

The ALTER SYSTEM CHECK DATAFILES command was designed to solve aparticular problem of file accessibility.  This most often has to dowith OPS, and disks that are shared among several machines.  There arecases where a disk may be accessible on one machine, but not another,because of configuration or OS problems.
.
Imagine that you have a datafile that is marked OFFLINE.  If the disk
where that datafile lives is accessible to a particular machine in anOPS installation, then you can bring it ONLINE.  If, however, anothermachine can’t get to that disk at the time you bring it ONLINE, thenthat instance won’t be able to verify the datafile.  Hence in thatinstance, the controlfile will have the datafile listed as ONLINE, butthe datafile still will not be properly accessible and entered in theSGA. 

 

Explanation:
============

The ALTER SYSTEM CHECK DATAFILES command was designed to allowyou to correct the problem from the OS perspective and make the diskaccessible. This would then trigger the instance into recognizing this fact,verifying the datafile, and thereby making it available to Oracle inthat instance.

 

So the command does not quite do what might be implied by the currentdocumentation.  It does not verify access to all online datafiles,rather,  it only looks at those that are now online, but which were not previously  verified.  Once a datafile has been verified, it is considered verified for alltime, until you OFFLINE the file or until the database is dismounted in that instance.

References:
===========

BUG:435848

Search Words:
=============

ALTER SYSTEM CHECK DATAFILES

本文固定链接: http://www.htz.pw/2014/11/09/alter-system-check-datafiles.html | 认真就输

该日志由 huangtingzhong 于2014年11月09日发表在 BASIC 分类下, 通告目前不可用,你可以至底部留下评论。
原创文章转载请注明: ALTER SYSTEM CHECK DATAFILES | 认真就输
关键字: