Oracle数据库启动之最恶心的报错检查--ORA-00119、ORA-00130

今天一同事告知,新clone的数据库无法正常启动,登陆启动之后报错如下:

[oracle@PlanDB01Dev ~]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Fri May 15 15:17:38 2015


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


Connected.
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01Dev)(PORT=1521))'
SQL> alter system reset local_listener;
alter system reset local_listener
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0




SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01Dev)(PORT=1521))'
SQL> exit
Disconnected
首先想到可能是参数文件设置问题,或者监听器:
查看参数文件:
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=8589934592
*.diagnostic_dest='/u01/app/oracle'
*.log_archive_dest_1='LOCATION=/home/oracle/archivelog'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=1681915904
*.processes=1000
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=5047844864
*.undo_tablespace='UNDOTBS1'
可以看到一切正常。
再次尝试用参数文件启动:
oracle@PlanDB01Dev dbs]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Fri May 15 14:57:45 2015


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


Connected.
SQL> startup pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora' nomount;
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01Dev)(PORT=1521))'
SQL> exit
Disconnected
错误依旧存在。
检查监听器:

[oracle@PlanDB01Dev dbs]$ lsnrctl status


LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-MAY-2015 14:56:24


Copyright (c) 1991, 2011, Oracle.  All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01UAT)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused

[oracle@PlanDB01Dev dbs]$ lsnrctl start


LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-MAY-2015 15:09:20


Copyright (c) 1991, 2011, Oracle.  All rights reserved.


Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...


TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/PlanDB01Dev/listener/alert/log.xml
TNS-12533: TNS:illegal ADDRESS parameters
 TNS-12560: TNS:protocol adapter error
  TNS-00503: Illegal ADDRESS parameters

上述结论中提示地址问题, 查看监听文件:
[oracle@PlanDB01Dev admin]$ cat listener.ora 
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP) 主机信息不存在 (PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )


ADR_BASE_LISTENER = /u01/app/oracle

发现这里缺少了主机信息,怀疑与主机名和主机ip有关:检查主机地址配置相关的文件
[root@PlanDB01Dev etc]# hostname
PlanDB01Dev
[root@PlanDB01Dev etc]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 PlanDB01UAT localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.72.1.188 PlanDB01UAT
[root@PlanDB01Dev etc]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=PlanDB01Dev
GATEWAY=10.71.1.1

终于找到问题原因了,127.0.0.1 PlanDB01UAT localhost.localdomain localhost  中的主机名设置与实际主机名不符,实际主机名为:
HOSTNAME=PlanDB01Dev 修改好后再次启动数据库:

[root@PlanDB01Dev etc]# vi /etc/hosts
[root@PlanDB01Dev etc]# su - oracle
[oracle@PlanDB01Dev ~]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Fri May 15 15:21:21 2015


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


Connected to an idle instance.


SQL> startup
ORACLE instance started.


Total System Global Area 5027385344 bytes
Fixed Size    2237008 bytes
Variable Size 2701135280 bytes
Database Buffers 2315255808 bytes
Redo Buffers    8757248 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


数据库正常启动,启动后需要重建监听器,或者进行修改。否则service无法注册监听,至此问题全部解决。

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

转载于:http://blog.itpub.net/28612416/viewspace-1656346/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值