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

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

ALTER SYSTEM CHECK DATAFILES:等您坐沙发呢!

发表评论

gravatar

? razz sad evil ! smile oops grin eek shock ??? cool lol mad twisted roll wink idea arrow neutral cry mrgreen

快捷键:Ctrl+Enter