BBED 修改檔案頭 解決 ORA-01190
問題:ORA-01190: control file or data file 6 is from before the last RESETLOGS
1.mount狀態下
2.找到udump ls -lrt最後一個是最新的
3.關閉資料庫 啟動到nomount
4.原來備份的資料檔案 拿回來覆蓋現在的資料檔案
5.開庫報錯
各資料檔案頭中resetlogs的資訊如下:
6.bbed修改檔案頭
7.重建控制檔案
8.查詢
SQL> select hxfil,fhrls change#,fhrlc_i,fhrlc time from x$kcvfh;
HXFIL CHANGE# FHRLC_I TIME
---------- ---------------- ---------- --------------------
1 505082 834878105 12/22/2013 22:35:05
2 505082 834878105 12/22/2013 22:35:05
3 505082 834878105 12/22/2013 22:35:05
4 505082 834878105 12/22/2013 22:35:05
6 505082 834878105 12/22/2013 22:35:05
8.開庫
1.mount狀態下
點選(此處)摺疊或開啟
- alter database backup controlfile to trace.
2.找到udump ls -lrt最後一個是最新的
3.關閉資料庫 啟動到nomount
點選(此處)摺疊或開啟
- SQL> CREATE CONTROLFILE REUSE DATABASE \"YWS\" RESETLOGS NOARCHIVELOG
- 2 MAXLOGFILES 16
- 3 MAXLOGMEMBERS 3
- 4 MAXDATAFILES 100
- 5 MAXINSTANCES 8
- 6 MAXLOGHISTORY 292
- 7 LOGFILE
- 8 GROUP 1 '/u01/oracle/oradata/yws/redo01.log' SIZE 50M,
- 9 GROUP 2 '/u01/oracle/oradata/yws/redo02.log' SIZE 50M,
- 10 GROUP 3 '/u01/oracle/oradata/yws/redo03.log' SIZE 50M
- 11 -- STANDBY LOGFILE
- 12 DATAFILE
- 13 '/u01/oracle/oradata/yws/system01.dbf',
- 14 '/u01/oracle/oradata/yws/undotbs01.dbf',
- 15 '/u01/oracle/oradata/yws/sysaux01.dbf',
- 16 '/u01/oracle/oradata/yws/users01.dbf',
- 17 '/u01/oracle/oradata/yws/yws.dbf'
- 18 CHARACTER SET WE8ISO8859P1
- 19 ;
- Control file created.
- SQL> alter database open;
- alter database open
- *
- ERROR at line 1:
- ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
- SQL> alter database open resetlogs;
- Database altered.
4.原來備份的資料檔案 拿回來覆蓋現在的資料檔案
點選(此處)摺疊或開啟
- [oracle@lk oradata]$ mv yws.dbf yws
- [oracle@lk yws]$ pwd
- /u01/oracle/oradata/yws
5.開庫報錯
點選(此處)摺疊或開啟
-
SQL> startup
-
ORACLE instance started.
-
-
Total System Global Area 243269632 bytes
-
Fixed Size 1218748 bytes
-
Variable Size 83887940 bytes
-
Database Buffers 155189248 bytes
-
Redo Buffers 2973696 bytes
-
Database mounted.
-
ORA-01190: control file or data file 6 is from before the last RESETLOGS
- ORA-01110: data file 6: '/u01/oracle/oradata/yws/yws.dbf'
點選(此處)摺疊或開啟
-
Fhrls:resetlogs scn值
-
Fhrlc:resetlogs count值
-
fhrlc_i:resetlogs count 轉換成10進位制的值
-
-
-
reset logs count and scn: The counter with the SCN is called the Reset Log Stamp,
-
and is a unique identification. The counter is in fact a timestamp
-
點選(此處)摺疊或開啟
-
SQL> select resetlogs_change#, to_char(resetlogs_time,'mm/dd/yyyy hh24:mi:ss') time from v$database;
-
-
RESETLOGS_CHANGE# TIME
-
----------------- -------------------
-
501518 12/22/2013 17:51:25
-
-
SQL> select hxfil,fhrls change#,fhrlc_i,fhrlc time from x$kcvfh;
-
-
HXFIL CHANGE# FHRLC_I TIME
-
---------- ---------------- ---------- --------------------
-
1 501518 834861085 12/22/2013 17:51:25
-
2 501518 834861085 12/22/2013 17:51:25
-
3 501518 834861085 12/22/2013 17:51:25
-
4 501518 834861085 12/22/2013 17:51:25
- 6 446075 829960901 10/28/2013 00:41:41
6.bbed修改檔案頭
點選(此處)摺疊或開啟
-
BBED> modify /x 993ac3 dba 6,1 offset 112
-
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
-
File: /u01/oracle/oradata/yws/yws.dbf (6)
-
Block: 1 Offsets: 112 to 623 Dba:0x01800001
-
------------------------------------------------------------------------
-
993ac331 7bce0600 00000000 00000000 00000000 00000000 00000000 07000000
-
00000000 06000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 07000000
-
03005957 53000000 00000000 00000000 00000000 00000000 00000000 00000000
-
06000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 74ef8421 01000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 72a50700 00000000 d0f3c231
-
01000a00 34000000 867e0000 1000d1bf 02000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
-
<32 bytes per line>
-
-
BBED> dump dba 6,1 offset 112
-
File: /u01/oracle/oradata/yws/yws.dbf (6)
-
Block: 1 Offsets: 112 to 623 Dba:0x01800001
-
------------------------------------------------------------------------
-
993ac331 7bce0600 00000000 00000000 00000000 00000000 00000000 07000000
-
00000000 06000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 07000000
-
03005957 53000000 00000000 00000000 00000000 00000000 00000000 00000000
-
06000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 74ef8421 01000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 72a50700 00000000 d0f3c231
-
01000a00 34000000 867e0000 1000d1bf 02000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
-
<32 bytes per line>
-
-
-
-
-
BBED> dump dba 1,1 offset 116
-
File: /u01/oracle/oradata/yws/system01.dbf (1)
-
Block: 1 Offsets: 116 to 627 Dba:0x00400001
-
------------------------------------------------------------------------
-
fab40700 00000000 00000000 00000000 00000000 00000420 6a000000 6b48c331
-
67000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 06005359
-
5354454d 00000000 00000000 00000000 00000000 00000000 00000000 01000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 0a000a00 c5327831 7bce0600 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 fbb40700 0000b4bf af3ac331 0100bd0c
-
01000000 02000000 10000000 02000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
-
<32 bytes per line>
-
-
-
-
-
-
BBED> modify /x fab407 dba 6,1 offset 116
-
File: /u01/oracle/oradata/yws/yws.dbf (6)
-
Block: 1 Offsets: 116 to 627 Dba:0x01800001
-
------------------------------------------------------------------------
-
fab40700 00000000 00000000 00000000 00000000 00000000 07000000 00000000
-
06000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 07000000 03005957
-
53000000 00000000 00000000 00000000 00000000 00000000 00000000 06000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 74ef8421 01000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 72a50700 00000000 d0f3c231 01000a00
-
34000000 867e0000 1000d1bf 02000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-
-
<32 bytes per line>
-
-
BBED> sum apply;
-
Check value for File 6, Block 1:
- current = 0x0748, required = 0x0748
7.重建控制檔案
點選(此處)摺疊或開啟
-
SQL> alter database backup controlfile to trace;
-
-
Database altered.
-
-
SQL> shutdown immediate;
-
ORA-01109: database not open
-
-
SQL> CREATE CONTROLFILE REUSE DATABASE \"YWS\" RESETLOGS NOARCHIVELOG
-
2 MAXLOGFILES 16
-
3 MAXLOGMEMBERS 3
-
4 MAXDATAFILES 100
-
5 MAXINSTANCES 8
-
6 MAXLOGHISTORY 292
-
7 LOGFILE
-
8 GROUP 1 '/u01/oracle/oradata/yws/redo01.log' SIZE 50M,
-
9 GROUP 2 '/u01/oracle/oradata/yws/redo02.log' SIZE 50M,
-
10 GROUP 3 '/u01/oracle/oradata/yws/redo03.log' SIZE 50M
-
11 -- STANDBY LOGFILE
-
12 DATAFILE
-
13 '/u01/oracle/oradata/yws/system01.dbf',
-
14 '/u01/oracle/oradata/yws/undotbs01.dbf',
-
15 '/u01/oracle/oradata/yws/sysaux01.dbf',
-
16 '/u01/oracle/oradata/yws/users01.dbf',
-
17 '/u01/oracle/oradata/yws/yws.dbf'
-
18 CHARACTER SET WE8ISO8859P1
-
19 ;
-
- Control file created.
8.查詢
SQL> select hxfil,fhrls change#,fhrlc_i,fhrlc time from x$kcvfh;
HXFIL CHANGE# FHRLC_I TIME
---------- ---------------- ---------- --------------------
1 505082 834878105 12/22/2013 22:35:05
2 505082 834878105 12/22/2013 22:35:05
3 505082 834878105 12/22/2013 22:35:05
4 505082 834878105 12/22/2013 22:35:05
6 505082 834878105 12/22/2013 22:35:05
點選(此處)摺疊或開啟
-
Errors in file /u01/oracle/admin/yws/udump/yws_ora_13792.trc:
-
ORA-00600: internal error code, arguments: [2662], [0], [505089], [0], [505116], [4194313], [], []
-
Sun Dec 22 23:50:14 2013
-
SMON: enabling cache recovery
-
Sun Dec 22 23:50:16 2013
-
Errors in file /u01/oracle/admin/yws/udump/yws_ora_13792.trc:
-
ORA-00600: internal error code, arguments: [2662], [0], [505089], [0], [505116], [4194313], [], []
-
Sun Dec 22 23:50:16 2013
-
Error 600 happened during db open, shutting down database
-
USER: terminating instance due to error 600
-
Instance terminated by USER, pid = 13792
- ORA-1092 signalled during: alter database open resetlogs...
8.開庫
點選(此處)摺疊或開啟
-
SQL> conn / as sysdba
-
Connected to an idle instance.
-
SQL> startup
-
ORACLE instance started.
-
-
Total System Global Area 243269632 bytes
-
Fixed Size 1218748 bytes
-
Variable Size 83887940 bytes
-
Database Buffers 155189248 bytes
-
Redo Buffers 2973696 bytes
-
Database mounted.
-
ORA-01113: file 1 needs media recovery
-
ORA-01110: data file 1: '/u01/oracle/oradata/yws/system01.dbf'
-
-
-
SQL> recover datafile 1;
-
Media recovery complete.
-
SQL> alter database open;
-
alter database open
-
*
-
ERROR at line 1:
-
ORA-01113: file 2 needs media recovery
-
ORA-01110: data file 2: '/u01/oracle/oradata/yws/undotbs01.dbf'
-
-
-
SQL> recover database;
-
Media recovery complete.
-
SQL> alter database open;
-
-
Database altered.
-
-
SQL>
-
-
-
- 成功open。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29477587/viewspace-1079790/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-01190使用bbed強制online資料檔案
- 【kingsql分享】使用BBED修改Oracle資料檔案頭推進SCNSQLOracle
- 【BBED】使用BBED修改資料檔案SCN,使該檔案從offline轉變為online
- git提示檔案有修改但實際檔案無修改解決方案Git
- hosts檔案如何修改 hosts檔案修改後無法儲存怎麼解決
- 標頭檔案講解
- linux Typora修改Windows檔案產生亂碼(未解決)LinuxWindows
- 解決Windows10沒有修改hosts檔案許可權Windows
- gitbash的gitconfig檔案修改時提示拒絕訪問的解決Git
- [20181204]bbed修改問題.txt
- bbed修改undo段狀態
- BBED 修改oracle 資料檔案的 SCN 號來做資料庫不完全恢復。Oracle資料庫
- sed 修改檔案
- VScode開發ROS 解決ros找不到標頭檔案等問題VSCodeROS
- SVN培訓筆記(下拉專案、同步修改、新增檔案、修改檔案、刪除檔案、改名檔案等)筆記
- 8.13 標頭檔案剖析:標頭檔案路徑(下)
- Mac電腦hosts檔案如何修改?macOS修改Hosts檔案教程Mac
- linux 修改hosts檔案以及修改hostnameLinux
- Git修改配置檔案Git
- windows 修改hosts檔案Windows
- python 修改文字檔案Python
- [20190104]bbed手動修改資料.txt
- locate標頭檔案和庫檔案
- python實現修改xml檔案內容詳解PythonXML
- 電腦Hosts檔案修改後無法儲存的原因及解決方法教程
- Oracle 之利用BBED修改資料塊SCN----沒有備份資料檔案的資料恢復Oracle資料恢復
- win10 如何修改hosts檔案 win10 如何修改host檔案Win10
- 解決在Windows10下沒有許可權修改hosts檔案的問題Windows
- 雲伺服器Linux下修改Fstab檔案造成系統無法啟動解決伺服器Linux
- mac 修改 /etc/hosts 檔案Mac
- 如何分發大檔案、大檔案傳輸解決方案
- 祖傳標頭檔案
- 華納雲:怎麼解決mysql的my.ini檔案無法修改的問題?MySql
- Vue修改代理無需重啟專案解決方式Vue
- win10檔案出現只讀修改不了怎麼辦_win10檔案只讀取消不了的解決方法Win10
- win10系統修改檔案提示檔案操作失敗拒絕訪問如何解決Win10
- 檔案無法粉碎解決辦法
- Oracle 控制檔案損壞解決方案Oracle
- 糾文網一鍵幫你解決頭疼的論文格式修改