ORA-01157 ORA-01110 Alter system check datafiles

ORACLE RAC
增加數據文件後報:
ORA-01157: 無法標識/鎖定數據文件 21 - 請參閱 DBWR 跟蹤文件 ORA-01110: 數據文件 21: '/dev/rlvsas_8g_data06'

執行'alter system check datafiles'後恢復;

alter system check datafiles設計用來在rac環境對數據文件訪問進行檢測。當磁盤被多個機器共享訪問時,有可能個別文件只能被當個機器訪問,而其它機器不能訪問。一般是由於配置或者操作系統的問題。

假定有個數據文件標示爲offline,而且爲rac環境。當你想online該數據文件時,你發現其中一個節點不能訪問數據文件所在磁盤,這時這個實例不能夠驗證該數據文件。然後在另外一個實例中,控制文件會將該文件標示爲online。但是數據文件仍然不能正常訪問,並加載入SGA。此時alter system check datafiles命令可以用來糾正這個問題,使數據文件能夠正常訪問,將觸發實例重新識別並驗證這個數據文件。然後使數據庫能夠正常工作。

描述如下:

Paul Sherman wrote 'I tried an 'alter system check datafiles'

I had never come across that command before and looked at the documentation which states that 'in a distributed database system, such as an Oracle Parallel Server environment, updates an instance's SGA from the database control file to reflect information on all online datafiles'. Global actions against all nodes , local against the current instance only.?

I did check out the OPS install/config guide but did not found anything more in there. I was failing to understand in which circumstances the command would be required, knowing that we are running a number of OPS set ups and I had never used it. Looking further on Metalink I found the following note (Note:1071756.6)

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. 燳ou 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 a particular problem of file accessibility.?This most often has to do with OPS, and disks that are shared among several machines.?There are cases 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 an OPS installation, then you can bring it ONLINE.?If, however, another machine can't get to that disk at the time you bring it ONLINE, then that instance won't be able to verify the datafile.?Hence in that instance, the controlfile will have the datafile listed as ONLINE, but the datafile still will not be properly accessible and entered in the SGA.? Explanation:

The ALTER SYSTEM CHECK DATAFILES command was designed to allow you to correct the problem from the OS perspective and make the disk accessible. This would then trigger the instance into recognizing this fact, verifying the datafile, and thereby making it available to Oracle in that instance. So the command does not quite do what might be implied by the current documentation.?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 all time, until you OFFLINE the file or until the database is dismounted in that instance.
I hope someone founds that useful, at least I have learnt a bit more by checking it out. Thanks Paul for mentioning it, if only in passing.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章