[重庆思庄每日技术分享]-ORA-00000: normal, successful completion

今天打算在重启操作系统前关闭数据库却遇到ORA-00000错误;如下:

[oracle@auxdb1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 27 12:46:59 2014

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

Connected.

SQL> shutdown immediate

ORA-00000: normal, successful completion

SQL> select open_mode from v$database;

select open_mode from v$database

*

ERROR at line 1:

ORA-01012: not logged on

Process ID: 0

Session ID: 0 Serial number: 0

SQL> exit

Disconnected

显示状态为Connected,而且也有相关oracle进程:

[root@localhost ~]# ps -ef|grep ora_

oracle 3948 1 0 12:34 ?

00:00:00 ora_pmon_orcl

oracle 3950 1 0 12:34 ?

00:00:00 ora_psp0_orcl

oracle 3952 1 0 12:34 ?

00:00:00 ora_vktm_orcl

oracle 3956 1 0 12:34 ?

00:00:00 ora_gen0_orcl

oracle 3958 1 0 12:34 ?

00:00:00 ora_diag_orcl

oracle 3960 1 0 12:34 ?

00:00:00 ora_dbrm_orcl

oracle 3962 1 0 12:34 ?

00:00:00 ora_dia0_orcl

oracle 3964 1 0 12:34 ?

00:00:01 ora_mman_orcl

oracle 3966 1 0 12:34 ?

00:00:00 ora_dbw0_orcl

oracle 3968 1 0 12:34 ?

00:00:00 ora_lgwr_orcl

oracle 3970 1 0 12:34 ?

00:00:00 ora_ckpt_orcl

oracle 3972 1 0 12:34 ?

00:00:00 ora_smon_orcl

oracle 3974 1 0 12:34 ?

00:00:00 ora_reco_orcl

oracle 3976 1 0 12:34 ?

00:00:00 ora_mmon_orcl

oracle 3978 1 0 12:34 ?

00:00:00 ora_mmnl_orcl

oracle 3980 1 0 12:34 ?

00:00:00 ora_d000_orcl

oracle 3982 1 0 12:34 ?

00:00:00 ora_s000_orcl

oracle 3990 1 0 12:34 ?

00:00:00 ora_qmnc_orcl

oracle 3992 1 0 12:35 ?

00:00:00 ora_q000_orcl

oracle 3994 1 0 12:35 ?

00:00:00 ora_q001_orcl

oracle 4006 1 0 12:35 ?

00:00:00 ora_cjq0_orcl

oracle 4035 1 0 12:40 ?

00:00:00 ora_smco_orcl

oracle 4037 1 0 12:40 ?

00:00:00 ora_w000_orcl

root 4098 4069 0 12:50 pts/3

00:00:00 grep ora_

后来才发现是修改了主机名,而未把主机名添加到hosts文件导致的,将主机名添加到/etc/hosts文件即可:

[oracle@auxdb1 ~]$ more /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1

localhost.localdomain localhost

::1 localhost6.localdomain6

localhost6

[oracle@auxdb1 ~]$ exit

logout

[root@auxdb1 ~]# vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1

localhost.localdomain localhost

::1 localhost6.localdomain6

localhost6

192.168.56.202 auxdb1

~

"/etc/hosts" 5L, 209C written

[root@auxdb1 ~]# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1

localhost.localdomain localhost

::1 localhost6.localdomain6

localhost6

192.168.56.202 auxdb1

[root@auxdb1 ~]# su - oracle

[oracle@auxdb1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 27 12:49:39 2014

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing

options

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值