[20200416]ORA-01187 cannot read from file because it failed verification tests.
[20200416]ORA-01187 cannot read from file because it failed verification tests.txt
--//上午測試時遇到的問題:
1.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.問題:
SCOTT@book> select * from dept
2 @ prxx
declare
*
ERROR at line 1:
ORA-01187: cannot read from file because it failed verification tests
ORA-01110: data file 201: '/mnt/ramdisk/book/temp01.dbf'
ORA-06512: at line 2
SCOTT@book> select * from dba_temp_files;
select * from dba_temp_files
*
ERROR at line 1:
ORA-01187: cannot read from file because it failed verification tests
ORA-01110: data file 201: '/mnt/ramdisk/book/temp01.dbf'
--//前幾天我使用重建過控制檔案,當時執行了ALTER TABLESPACE TEMP ADD TEMPFILE '/mnt/ramdisk/book/temp01.dbf' REUSE;時正常的。
Tue Apr 07 11:59:10 2020
ALTER TABLESPACE TEMP ADD TEMPFILE '/mnt/ramdisk/book/temp01.dbf' REUSE
Completed: ALTER TABLESPACE TEMP ADD TEMPFILE '/mnt/ramdisk/book/temp01.dbf' REUSE
--//當時的記錄。
SCOTT@book> ALTER TABLESPACE TEMP ADD TEMPFILE '/mnt/ramdisk/book/temp01.dbf' REUSE;
ALTER TABLESPACE TEMP ADD TEMPFILE '/mnt/ramdisk/book/temp01.dbf' REUSE
*
ERROR at line 1:
ORA-01537: cannot add file '/mnt/ramdisk/book/temp01.dbf' - file already part of database
--//感覺/mnt/ramdisk/book/temp01.dbf檔案壞了。
$ xxd -c 16 /mnt/ramdisk/book/temp01.dbf | head
0000000: 00a2 0000 0000 c0ff 0000 0000 0000 0000 ......?........
0000010: 6635 0000 0020 0000 00cf 0000 7d7c 7b7a f5... ...?.}|{z
0000020: a081 0000 0000 0000 0000 0000 0000 0000 ................
0000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................}
$ oerr ora 01187
01187, 00000, "cannot read from file %s because it failed verification tests"
// *Cause: The data file did not pass the checks to insure it is part of the
// database. Reads are not allowed until it is verified.
// *Action: Make the correct file available to the database. Then, either open
// the database, or execute ALTER SYSTEM CHECK DATAFILES.
SCOTT@book> alter database tempfile '/mnt/ramdisk/book/temp01.dbf' drop;
alter database tempfile '/mnt/ramdisk/book/temp01.dbf' drop
*
ERROR at line 1:
ORA-02002: error while writing to audit trail
ORA-25153: Temporary Tablespace is Empty
ALTER SYSTEM CHECK DATAFILES
*
ERROR at line 1:
ORA-02002: error while writing to audit trail
ORA-25153: Temporary Tablespace is Empty
--//必須以sys使用者執行:
SYS@book> ALTER SYSTEM CHECK DATAFILES;
System altered.
--//檢視alert提示:
[2020-04-16 08:57:15] ORA-3261 signalled during: ALTER TABLESPACE TEMP drop TEMPFILE '/mnt/ramdisk/book/temp01.dbf' ...
[2020-04-16 09:01:17] Thu Apr 16 09:01:16 2020
[2020-04-16 09:01:17] alter database tempfile '/mnt/ramdisk/book/temp01.dbf' drop
[2020-04-16 09:01:17] Completed: alter database tempfile '/mnt/ramdisk/book/temp01.dbf' drop
--//可以看出前面報錯,實際上已經刪除。
3.刪除重新建立看看。
SCOTT@book> select * from dba_temp_files;
no rows selected
$ xxd -c 16 /mnt/ramdisk/book/temp01.dbf | head
0000000: 00a2 0000 0000 c0ff 0000 0000 0000 0000 ......?........
0000010: 6635 0000 0020 0000 00cf 0000 7d7c 7b7a f5... ...?.}|{z
0000020: a081 0000 0000 0000 0000 0000 0000 0000 ................
0000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................}
SCOTT@book> ALTER TABLESPACE TEMP ADD TEMPFILE '/mnt/ramdisk/book/temp01.dbf' REUSE;
Tablespace altered.
SCOTT@book> select * from dba_temp_files
2 @ prxx
==============================
FILE_NAME : /mnt/ramdisk/book/temp01.dbf
FILE_ID : 1
TABLESPACE_NAME : TEMP
BYTES : 434110464
BLOCKS : 52992
STATUS : ONLINE
RELATIVE_FNO : 1
AUTOEXTENSIBLE : NO
MAXBYTES : 0
MAXBLOCKS : 0
INCREMENT_BY : 0
USER_BYTES : 433061888
USER_BLOCKS : 52864
PL/SQL procedure successfully completed.
SCOTT@book> select * from dept where deptno=40
2 @ prxx
==============================
DEPTNO : 40
DNAME : OPERATIONS
LOC : BOSTON
PL/SQL procedure successfully completed.
4.什麼原因導致這個問題呢?
--//前幾天做了nid修改DBID還原的測試,難道臨時檔案裡面也記錄dbid資訊嗎?,連結:http://blog.itpub.net/267265/viewspace-2684913/
SCOTT@book> select name,open_mode,dbid,db_unique_name from v$database;
NAME OPEN_MODE DBID DB_UNIQUE_NAME
---- ---------- ---------- --------------
BOOK READ WRITE 1337401710 book
SCOTT@book> @ 10to16 1337401710
10 to 16 HEX REVERSE16
----------------- -----------------------------------
000000004fb7216e 0x6e21b74f-00000000
$ xxd -c 16 /mnt/ramdisk/book/temp01.dbf | head -1000 | grep -i 6e21
0002010: de4d 0000 0000 0000 0004 200b 6e21 b74f 轒........ .n!.O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--//估計問題在這裡,重新看了前面nid的執行過程:
$ nid TARGET=/
DBNEWID: Release 11.2.0.4.0 - Production on Tue Apr 7 11:43:18 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to database BOOK (DBID=1337401710)
Connected to server version 11.2.0
Control Files in database:
/mnt/ramdisk/book/control01.ctl
/mnt/ramdisk/book/control02.ctl
Change database ID of database BOOK? (Y/[N]) => y
Proceeding with operation
Changing database ID from 1337401710 to 1477856022
Control File /mnt/ramdisk/book/control01.ctl - modified
Control File /mnt/ramdisk/book/control02.ctl - modified
Datafile /mnt/ramdisk/book/system01.db - dbid changed
Datafile /mnt/ramdisk/book/sysaux01.db - dbid changed
Datafile /mnt/ramdisk/book/undotbs01.db - dbid changed
Datafile /mnt/ramdisk/book/users01.db - dbid changed
Datafile /mnt/ramdisk/book/example01.db - dbid changed
Datafile /mnt/ramdisk/book/tea01.db - dbid changed
Datafile /mnt/ramdisk/book/temp01.db - dbid changed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Control File /mnt/ramdisk/book/control01.ctl - dbid changed
Control File /mnt/ramdisk/book/control02.ctl - dbid changed
Instance shut down
--//確實修改了臨時檔案的dbid。正是這個問題導致上面的情況發生。做一個記錄。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2686411/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- iis 0x80070032 Cannot read configuration file because it exceeds the maximum file size
- 寶塔:續簽SSL證書報錯Verification failed, domain name resolution error or verification URL cannot be accessed!AIError
- [已解決] [HiveCatalog]Kerberos GSS initiate failed, No valid credentials provided, Cannot read from System.inHiveROSAIIDE
- Failed to read auto-increment value from storage engineAIREM
- SSH Host key verification failedAI
- sqlserver bulk insert報錯Cannot bulk load because the file could not be opened.SQLServer
- Cannot load from short array because "sun.awt.FontConfiguration.head" is nullNull
- Unable to read TLD "META-INF/c.tld" from JAR fileJAR
- remount of /system failed: Read-only file system原因及解決REMAI
- pycharm出現Git Pull Failed: Could not read from remote repository.PyCharmGitAIREM
- SCP報錯:Host key verification failed.AI
- TypeError: Cannot read private member xxx from an object whose class did not declare itErrorObject
- 【問題處理】ORA-00376 file xx cannot be read at this time
- CDH5.8.2安裝之Hash verification failedH5AI
- JDK 載入jar中的檔案資源出現Cannot be resolved to absolute file path because it does not reside in the file systemJDKJARIDE
- Failed to load libGL.so error libGL.so: cannot open shared object file: No such file or directoryAIErrorObject
- 解決db file sequential read與db file scattered read
- fork failed - Cannot allocate memoryAI
- 開啟託管server報錯:Cannot read from policy store. Reason is PolicyStore ErrorServerError
- 等待事件db file sequential read、db file scattered read和direct read的區別事件
- Cannot read property ‘aDataSort‘ of undefinedUndefined
- [INS-20802] Oracle Cluster Verification Utility failedOracleAI
- Linux 報錯Certificate verification failed: The certificate is NOT trusted.LinuxAIRust
- oracle之 Got minus one from a read call 與 ORA-27154: post/wait create failedOracleGoAI
- db file scattered read與事件db file sequential read相類似(轉)事件
- Oracle:db file scattered readOracle
- nodejs read/write fileNodeJS
- 事件:db file scattered read事件
- Spark Streaming Failed to read checSparkAI
- [sublime xftp外掛] Host key verification failed ,錯誤處理FTPAI
- javascript:void(null)gitLab---Host key verification failed.JavaScriptNullGitlabAI
- js提示Cannot read property ‘replace‘ of undefinedJSUndefined
- Npm install failed with “cannot run in wd”NPMAI
- Swift:Errors thrown from here are not handled because the enclosing catch is not exhaustiveSwiftError
- Msg 3702:Cannot drop the database 'gcard' because it is currently in use.DatabaseGC
- SSH 登入失敗:Host key verification failed 的處理方法AI
- db file scattered read等待事件事件
- db file sequential read等待事件事件