ORA-01200錯誤的分析

來源:互聯網
上載者:User

一 觸發ora-01200錯誤的原因
 
[Oracle@oracle ~]$ oerr ora 01200
01200, 00000, "actual file size of %s is smaller than correct size of %s blocks"
// *Cause: The size of the file as returned by the operating system is smaller
//        than the size of the file as indicated in the file header and the
//        control file. Somehow the file has been truncated. Maybe it is the
//        result of a half completed copy.
// *Action: Restore a good copy of the data file and do recovery as needed.

資料檔案實際塊數小於資料檔案頭部記錄的資料檔案塊數

二 用bbed構造一個ora-01200錯誤
 
1 資料檔案/oracle/test/jiujian1.dbf實際佔用塊數如下:
 
SQL> select file_name,blocks from dba_data_files where file_id=11;
 
FILE_NAME                          BLOCKS
----------------------------------------          ---------
/oracle/test/jiujian1.dbf                1048
 
2 用bbed修改資料檔案頭部記錄的資料檔案佔用塊數
BBED> info
 File# Name                                                        Size(blks)
 ----- ----                                                        ----------
    1 /oracle/CRM2/system1.dbf                                        61440
    2 /oracle/CRM2/zxb.dbf                                              1280
    3 /oracle/CRM2/CRM/sysaux01.dbf                                    37120
    4 /oracle/CRM2/CRM/users01.dbf                                      640
    5 /oracle/CRM2/zxa.dbf                                            12800
    6 /oracle/CRM2/CRM/undotbs2.dbf                                    25600
    7 /oracle/CRM2/zxc.dbf                                              1280
    8 /oracle/CRM2/CRM/zxbig1.dbf                                    262144
    11 /oracle/test/jiujian1.dbf                                          128
 
BBED> set dba 11,1
        DBA            0x02c00001 (46137345 11,1)
 
BBED> p  offset 44     
kcvfh.kcvfhhdr.kccfhfsz
-----------------------
ub4 kccfhfsz                                @44      0x00000418 (十進位1048)
 
BBED> set offset 44
        OFFSET          44
 
BBED> dump /v count 30
 File: /oracle/test/jiujian1.dbf (11)
 Block: 1      Offsets:  44 to  73 Dba:0x02c00001
-------------------------------------------------------
 18040000 00200000 0b000300 00000000 l ..... ..........
 00000000 00000000 00000000 0000    l ..............
 
 <16 bytes per line>
 
BBED> modify /x 1904
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
 File: /oracle/test/jiujian1.dbf (11)
 Block: 1                Offsets:  44 to  73          Dba:0x02c00001
------------------------------------------------------------------------
 19040000 00200000 0b000300 00000000 00000000 00000000 00000000 0000
 
 <32 bytes per line>
 
BBED> p offset 44
kcvfh.kcvfhhdr.kccfhfsz
-----------------------
ub4 kccfhfsz                                @44      0x00000419(10進位為1049)
 
BBED> sum apply
Check value for File 11, Block 1:
current = 0x34f4, required = 0x34f4
 
3 啟動資料庫便可觸發ora-01200錯誤
SQL> startup
ORACLE instance started.
 
Total System Global Area 322961408 bytes
Fixed Size                  2020480 bytes
Variable Size              92277632 bytes
Database Buffers          222298112 bytes
Redo Buffers                6365184 bytes
Database mounted.
ORA-01122: database file 11 failed verification check
ORA-01110: data file 11: '/oracle/test/jiujian1.dbf'
ORA-01200: actual file size of 1048 is smaller than correct size of 1049 blocks
 
三ora-01200錯誤的解決
 
方式1 通過bbed 改資料檔案頭部位移量44處的值為資料檔案實際佔用塊數
 
方式2 通過dd命令填充資料檔案實際大小為correct size of 1049 blocks中的值
dd if=/dev/zero of=/oracle/test/jiujian1.dbf bs=8192 count=1 seek=1049

SPFILE 錯誤導致資料庫無法啟動(ORA-01565) 

ORA-01172、ORA-01151錯誤處理 

ORA-00600 [2662]錯誤解決

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.