日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Oracle控制文件的恢復(fù)

如果Oracle控制文件是從備份中恢復(fù)的,下面就為您詳細介紹Oracle控制文件的恢復(fù),供您參考,希望對您學(xué)習(xí)Oracle控制文件能有所幫助。

創(chuàng)新互聯(lián)建站堅持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都網(wǎng)站建設(shè)、成都網(wǎng)站制作、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時代的寶安網(wǎng)站設(shè)計、移動媒體設(shè)計的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!

那么數(shù)據(jù)庫在open過程中又將如何呢?

首先備份Oracle控制文件控制文件,打開數(shù)據(jù)庫,增進檢查點:

 
 
 
  1. [oracle@jumper eygle]$ cp control01.ctl control01.ctl.bak
  2. [oracle@jumper eygle]$ sqlplus "/ as sysdba"
  3. SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 11 10:46:05 2006
  4. Copyright (c) 1982, 2002, Oracle Corporation.   All rights reserved.
  5. Connected to an idle instance.
  6. SQL> startup
  7. ORACLE instance started.
  8. Total System Global Area   139531744 bytes
  9. Fixed Size                    452064 bytes
  10. Variable Size              121634816 bytes
  11. Database Buffers            16777216 bytes
  12. Redo Buffers                  667648 bytes
  13. Database mounted.
  14. Database opened.
  15. SQL> alter system checkpoint;
  16. System altered.
  17. SQL> shutdown immediate;
  18. Database closed.
  19. Database dismounted.
  20. ORACLE instance shut down.
  21. SQL> exit
  22. Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
  23. With the Partitioning option
  24. JServer Release 9.2.0.4.0 - Production

然后恢復(fù)舊的控制文件,mount數(shù)據(jù)庫,轉(zhuǎn)儲數(shù)據(jù)文件頭:

 
 
 
  1. [oracle@jumper eygle]$ mv control01.ctl control01.ctl.n
  2. [oracle@jumper eygle]$ mv control01.ctl.bak control01.ctl 
  3. [oracle@jumper eygle]$ sqlplus "/ as sysdba"
  4. SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 11 10:46:50 2006
  5. Copyright (c) 1982, 2002, Oracle Corporation.   All rights reserved.
  6. Connected to an idle instance.
  7. SQL> startup mount;
  8. ORACLE instance started.
  9. Total System Global Area   139531744 bytes
  10. Fixed Size                    452064 bytes
  11. Variable Size              121634816 bytes
  12. Database Buffers            16777216 bytes
  13. Redo Buffers                  667648 bytes
  14. Database mounted.
  15. SQL> alter session set events 'immediate trace name file_hdrs level 10';
  16. Session altered.
  17. SQL> !

我們看Oracle控制文件控制文件的信息(選擇一個文件):

 
 
 
  1. DATA FILE #4: 
  2.    (name #4) /opt/oracle/oradata/eygle/eygle01.dbf
  3. creation size=0 block size=8192 status=0xe head=4 tail=4 dup=1
  4. tablespace 4, index=4 krfil=4 prev_file=0
  5. unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
  6. Checkpoint cnt:61 scn: 0x0000.002acb1e 08/11/2006 10:44:38
  7. Stop scn: 0x0000.002acb1e 08/11/2006 10:44:38
  8. Creation Checkpointed at scn:   0x0000.0015078d 06/06/2006 09:41:54

再看數(shù)據(jù)文件頭信息:

 
 
 
  1. FILE HEADER:
  2.          Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
  3.          Db ID=1407686520=0x53e79778, Db Name='EYGLE'
  4.          Activation ID=0=0x0
  5.          Control Seq=989=0x3dd, File size=1280=0x500
  6.          File Number=4, Blksiz=8192, File Type=3 DATA
  7. Tablespace #4 - EYGLE   rel_fn:4 
  8. Creation    at    scn: 0x0000.0015078d 06/06/2006 09:41:54
  9. Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
  10. reset logs count:0x232bee1f scn: 0x0000.0007c781 recovered at 08/11/2006 10:11:26
  11. status:0x0 root dba:0x00000000 chkpt cnt: 64 ctl cnt:63
  12. begin-hot-backup file size: 0
  13. Checkpointed at scn:   0x0000.002acb98 08/11/2006 10:46:24

我們注意到數(shù)據(jù)文件的chkpt cnt: 64 要大約控制文件的Checkpoint cnt:61,也就是說控制文件是舊的。

此時嘗試打開數(shù)據(jù)庫就會出現(xiàn)如下錯誤:

 
 
 
  1. [oracle@jumper udump]$ sqlplus "/ as sysdba"
  2. SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 11 10:51:20 2006
  3. Copyright (c) 1982, 2002, Oracle Corporation.   All rights reserved.
  4. Connected to:
  5. Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
  6. With the Partitioning option
  7. JServer Release 9.2.0.4.0 - Production
  8. SQL> alter database open;
  9. alter database open
  10. *
  11. ERROR at line 1:
  12. ORA-01122: database file 1 failed verification check
  13. ORA-01110: data file 1: '/opt/oracle/oradata/eygle/system01.dbf'
  14. ORA-01207: file is more recent than controlfile - old controlfile

Oracle告訴我們,控制文件是舊的。此時我們可以通過重建控制文件或者從舊的數(shù)據(jù)備份開始恢復(fù)。


文章題目:Oracle控制文件的恢復(fù)
鏈接地址:http://www.5511xx.com/article/djogsgh.html