问题描述:如果启动数据库,出现如下问题。
[root@localhost ~]# su - oraarp
[oraarp@localhost ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Fri Jan 26 15:18:18 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected.
SQL> select * from v$instance
2 ;
select * from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
没有出现:
[oraarp@arpdb ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Fri Jan 26 15:20:59 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
一般来说,除了修改/etc/hostname文件之外。
还需要修改 /etc/sysconfig/network
[root@localhost ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=arpdb
临时生效的命令:
hostname arpdb