ORA-01200的简单处理

大容量pc断电,导致虚拟机中的数据库down掉了。无法启动

ALTER DATABASE OPEN
Read of datafile '/paic/oradata/vmdev/system01.dbf' (fno 1) header failed with ORA-01200
Rereading datafile 1 header failed with ORA-01200
Errors in file /paic/app/oracle/diag/rdbms/vmdev/vmdev/trace/vmdev_ora_3332.trc:
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/paic/oradata/vmdev/system01.dbf'
ORA-01200: actual file size of 82256 is smaller than correct size of 83280 blocks
ORA-1122 signalled during: ALTER DATABASE OPEN...

这个错误猜测是因为数据中正在想system01.dbf这个数据文件写东西的时候突然断电,导致这个1K的东西没有写入完成,而中断。
因数据库没有备份,也没有开归档,所以没有办法只能欺骗oracle,让他认为数据库是一致的。
SQL> select 83280-82256 from dual;

83280-82256
-----------
       1024

[vm11g@vmdb11g trace]$ dd if=/dev/zero of=/paic/oradata/vmdev/system01.dbf bs=8192 count=1024 seek=82257
82256+0 records in
82256+0 records out
673841152 bytes (674 MB) copied, 2.87257 seconds, 235 MB/s

SQL> alter database open;

Database altered.

SQL> select status from v$instance;

STATUS
------------------------
OPEN

你可能感兴趣的:(ORA-01200的简单处理)