修改了硬件时间后导致oracle无法正常启动

今天发现系统时间和实际时间有出入

遂用百度来的方法

[root@lzr1 ~]#  hwclock --set --date="01/19/19 18:06" 
[root@lzr1 ~]#  hwclock --hctosys

修改了下系统时间


然后重启机器

[root@lzr1 ~]# reboot
[root@lzr1 ~]# 
Broadcast message from root@lzr1
        (/dev/pts/0) at 18:06 ...
The system is going down for reboot NOW!

重启后进入sqlplus

[oracle@lzr1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sat Jan 19 18:08:04 2019
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL>

发现空实例,startup一下

SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA01/orcl/spfileorcl.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA01/orcl/spfileorcl.ora
ORA-15056: additional error message
ORA-17503: ksfdopn:2 Failed to open file +DATA01/orcl/spfileorcl.ora
ORA-15001: diskgroup "DATA01" does not exist or is not mounted
ORA-06512: at line 4

提示无法识别控制文件和参数文件

先用之前的参数文件启动到nomount状态

[oracle@lzr1 pfile]$ pwd
/u01/app/oracle/admin/orcl/pfile
[oracle@lzr1 pfile]$ ls
init.ora.11142018235636
[oracle@lzr1 pfile]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sat Jan 19 18:11:19 2019
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile='/u01/app/oracle/admin/orcl/pfile/init.ora.11142018235636';
ORACLE instance started.
Total System Global Area 1202556928 bytes
Fixed Size                  2252704 bytes
Variable Size             822083680 bytes
Database Buffers          369098752 bytes
Redo Buffers                9121792 bytes
SQL> create spfile from pfile;
File created.

再去找一下控制文件cat init.ora.11142018235636


最下面一行是

control_files=("+DATA01/orcl/controlfile/current.260.996015513", "+FRA/orcl/controlfile/current.256.994895415")


进入磁盘中看一下控制文件

[grid@lzr1 ~]$ asmcmd
ASMCMD> ls
DATA/
DATA01/
FRA/
ASMCMD> cd +DATA01/orcl/controlfile

将DATA01和FRA两个控制文件的文件名修改到pfile参数文件中,保存,再启动数据库即可



注:

不要修改硬件时间,会导致开机时提示

Checking filesystems
/dev/mapper/VolGroup-lv_root: Superblock last mount time (Thu Jul 31 11:12:34 2014,
now = Mon Jul 28 11:15:32 2014) is in the future.

/dev/mapper/VolGroup-lv_root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i .e., without -a or -p options)
[FAILED]

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell,
*** Warning -- SELinux is active
*** Disabling security enforcement for system recovery.
*** Run *setenforce 1* to reenable.
Give root password for maintenance
(or type Control-D to continue):

上次装载superblock时间和现在时间不一致,磁盘无法正常工作

解决办法:

1. 拿安装盘启动
2. 把日期调到较早的时候
3. 磁盘检查
4. 硬盘启动,把时间改正常

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

转载于:http://blog.itpub.net/31060213/viewspace-2564204/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值