更改oracle 服务器ip地址之后启动监听时报如下错误:

 <txt>TNS-12542: TNS:address already in use
 TNS-12560: TNS:protocol adapter error
  TNS-00512: Address already in use
   Linux Error: 98: Address already in use

修改/etc/hosts

[oracle@localhost ~]$ more /etc/hosts
#127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
#::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
#192.168.1.251   localhost localhost.localdomain localhost4 localhost4.localdoma
#192.168.1.251
www.fbird.cn
124.232.153.226(此处为修改后IP)  localhost localhost.localdomain

[oracle@localhost ~]$ more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain  --hostname要和主机名一致

 

[oracle@localhost admin]$ more listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/n
etwork/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain --此处和主机名一致)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

 

[oracle@localhost admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-SEP-2013 12:41:04

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                28-SEP-2013 12:30:30
Uptime                    0 days 0 hr. 10 min. 33 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

Logo

更多推荐