oracle-01122,oracle ORA-01200&ORA-01110&ORA-01122

由于自己本地使用的virtual-box虚拟机,在虚拟机上安装Oracle,物理机偶尔会因为内存问题无响应,就强制断电重启,没想到虚拟机非常规关机导致oracle ORA-01200&ORA-01110&ORA-01122

启动数据库时报错:

[oracle@oratest ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 6 11:32:03 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area  839282688 bytes

Fixed Size    2257880 bytes

Variable Size  545262632 bytes

Database Buffers  289406976 bytes

Redo Buffers    2355200 bytes

Database mounted.

ORA-01122: database file 2 failed verification check

ORA-01110: data file 2: '/oradata/oracle/oradata/oradb/sysaux01.dbf'

ORA-01200: actual file size of 62720 is smaller than correct size of 66560 blocks

报错提示数据库记录/oradata/oracle/oradata/oradb/sysaux01.dbf的大小是66560而实际大小是62720,此种报错有个简单的解决方法,就是通过dd修改报错相关的数据文件,改成数据库期望的大小,瞒过oracle:SQL> select 66560 - 62720 from dual;

66560-62720

-----------

3840

SQL> !dd if=/dev/zero of=/oradata/oracle/oradata/oradb/sysaux01.dbf bs=8192 count=3840 seek=62721 --bs是数据库块大小,count是差值,seek是从哪开始填充0

3840+0 records in

3840+0 records out

31457280 bytes (31 MB) copied, 0.02607 seconds, 1.2 GB/s

SQL> alter database open;

Database altered.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup;

ORACLE instance started.

Total System Global Area  839282688 bytes

Fixed Size    2257880 bytes

Variable Size  545262632 bytes

Database Buffers  289406976 bytes

Redo Buffers    2355200 bytes

Database mounted.

Database opened.

SQL> select count(*) from dba_users;

COUNT(*)

----------

30

SQL> select count(*) from dba_data_files;

COUNT(*)

----------

4

SQL>

处理后数据库能正常打开、关闭、重启了。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29357786/viewspace-2136743/,如需转载,请注明出处,否则将追究法律责任。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值