自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle控制文件的恢復(fù)

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

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

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

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

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

然后恢復(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.  
  5. SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 11 10:46:50 2006  
  6.  
  7. Copyright (c) 1982, 2002, Oracle Corporation.   All rights reserved.  
  8.  
  9. Connected to an idle instance.  
  10.  
  11. SQL> startup mount;  
  12. ORACLE instance started.  
  13.  
  14. Total System Global Area   139531744 bytes  
  15. Fixed Size                    452064 bytes  
  16. Variable Size              121634816 bytes  
  17. Database Buffers            16777216 bytes  
  18. Redo Buffers                  667648 bytes  
  19. Database mounted.  
  20. SQL> alter session set events 'immediate trace name file_hdrs level 10';  
  21.  
  22. Session altered.  
  23.  
  24. SQL> !  
  25.  

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

  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  
  9.  

再看數(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=4Blksiz=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  
  14.  

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

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

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

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

 

 

【編輯推薦】

Oracle單行日期函數(shù)簡介

Oracle bitand( )函數(shù)簡介

oracle聚合函數(shù)的使用

oracle管道函數(shù)的用法

oracle自定義函數(shù)的使用

 

責(zé)任編輯:段燃 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2011-08-02 08:59:52

Oracle控制文件

2010-10-29 14:20:54

Oracle移動(dòng)控制文

2011-08-29 16:41:14

OracleRMAN恢復(fù)數(shù)據(jù)文件的恢復(fù)

2010-04-27 14:18:56

Oracle控制文件

2010-04-19 16:51:11

Oracle控制文件

2010-04-12 14:33:43

Oracle備份恢復(fù)

2011-05-26 15:27:08

Oracle數(shù)據(jù)庫

2010-04-19 16:09:22

Oracle控制文件

2010-04-02 10:30:52

Oracle備份

2010-05-06 09:42:28

Oracle表空間

2011-05-24 10:26:12

Oracle數(shù)據(jù)庫日志文件

2010-04-14 17:11:13

Oracle管理

2009-06-29 18:09:12

多路復(fù)用Oracle

2011-05-17 11:33:43

oracle數(shù)據(jù)庫

2010-04-02 10:16:17

Oracle備份

2009-03-17 16:00:47

Oracle數(shù)據(jù)庫備份

2011-05-20 09:35:24

Oracle數(shù)據(jù)庫恢復(fù)備份

2010-04-01 11:21:51

Oracle備份

2010-04-15 13:36:48

Oracle恢復(fù)

2010-08-13 14:08:45

Oracle
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號