国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

備份的控制文件和新的數據文件

2024-07-21 02:32:53
字體:
來源:轉載
供稿:網友
我們可以想象,假如控制文件是從備份中恢復的,那么數據庫在open過程中又將如何呢?首先備份控制文件,打開數據庫,增進檢查點: [Oracle@jumper eygle]$ cp control01.ctl control01.ctl.bak
[oracle@jumper eygle]$ sqlplus "/ as sysdba"SQL*Plus: Release 9.2.0.4.0 - PRodUCtion on Fri Aug 11 10:46:05 2006Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.Connected to an idle instance.SQL> startup
ORACLE instance started.Total System Global Area  139531744 bytes
Fixed Size                   452064 bytes
Variable Size             121634816 bytes
Database Buffers           16777216 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL> alter system checkpoint;System altered.SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production然后恢復舊的控制文件,mount數據庫,轉儲數據文件頭:[oracle@jumper eygle]$ mv control01.ctl control01.ctl.n
[oracle@jumper eygle]$ mv control01.ctl.bak control01.ctl
[oracle@jumper eygle]$ sqlplus "/ as sysdba"SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 11 10:46:50 2006Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.Connected to an idle instance.SQL> startup mount;
ORACLE instance started.Total System Global Area  139531744 bytes
Fixed Size                   452064 bytes
Variable Size             121634816 bytes
Database Buffers           16777216 bytes
Redo Buffers                 667648 bytes
Database mounted.
SQL> alter session set events 'immediate trace name file_hdrs level 10';Session altered.SQL> !我們看控制文件的信息(選擇一個文件):DATA FILE #4:
  (name #4) /opt/oracle/oradata/eygle/eygle01.dbf
creation size=0 block size=8192 status=0xe head=4 tail=4 dup=1
 tablespace 4, index=4 krfil=4 prev_file=0
 unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
 Checkpoint cnt:61 scn: 0x0000.002acb1e 08/11/2006 10:44:38
 Stop scn: 0x0000.002acb1e 08/11/2006 10:44:38
 Creation Checkpointed at scn:  0x0000.0015078d 06/06/2006 09:41:54
再看數據文件頭信息: FILE HEADER:
        Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
        Db ID=1407686520=0x53e79778, Db Name='EYGLE'
        Activation ID=0=0x0
        Control Seq=989=0x3dd, File size=1280=0x500
        File Number=4, Blksiz=8192, File Type=3 DATA
Tablespace #4 - EYGLE  rel_fn:4
Creation   at   scn: 0x0000.0015078d 06/06/2006 09:41:54
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
 reset logs count:0x232bee1f scn: 0x0000.0007c781 recovered at 08/11/2006 10:11:26
 status:0x0 root dba:0x00000000 chkpt cnt: 64 ctl cnt:63
begin-hot-backup file size: 0
Checkpointed at scn:  0x0000.002acb98 08/11/2006 10:46:24我們注重到數據文件的chkpt cnt: 64 要大約控制文件的Checkpoint cnt:61,也就是說控制文件是舊的。此時嘗試打開數據庫就會出現如下錯誤:[oracle@jumper udump]$ sqlplus "/ as sysdba"SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 11 10:51:20 2006Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - ProductionSQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/opt/oracle/oradata/eygle/system01.dbf'
ORA-01207: file is more recent than controlfile - old controlfileOracle告訴我們,控制文件是舊的。此時我們可以通過重建控制文件或者從舊的數據備份開始恢復。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 彭泽县| 临泉县| 绥滨县| 六枝特区| 邮箱| 呈贡县| 砚山县| 临清市| 巴塘县| 贞丰县| 马关县| 金门县| 武平县| 呼图壁县| 纳雍县| 福州市| 鹿泉市| 青海省| 贡觉县| 阿尔山市| 镇坪县| 汾阳市| 保山市| 册亨县| 平罗县| 泽库县| 灌阳县| 荥经县| 集安市| 鄂尔多斯市| 开鲁县| 嵊州市| 普兰店市| 金华市| 万州区| 枞阳县| 富源县| 汉源县| 诸城市| 韩城市| 定边县|