Home > Database > Mysql Tutorial > Linux下修改Oracle监听地址

Linux下修改Oracle监听地址

WBOY
Release: 2016-06-07 15:10:17
Original
1256 people have browsed it

如果你的服务器换了ip怎么办?如果你的服务器换了名字怎么办?以前的小伙伴怎么办?以前的老客户怎么办?没关系,简单教你修改监

如果你的服务器换了ip怎么办?
如果你的服务器换了名字怎么办?
以前的小伙伴怎么办?
以前的老客户怎么办?
没关系,简单教你修改监听地址,,老朋友随便找!
想要修改监听地址首先要找到两个文件,确定两样东西!
第一 你的主机名字?
第二 你的IP地址?
第三 你的listener.ora在哪里?
第四 你的tnsnames.ora在哪里?

原来的文件监听的是localhost,这个名字在/etc/hosts中会被映射成Ip地址127.0.0.1

lisenter.ora 目录在

/opt/Oracle/11g/network/admin

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.111.123)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /opt/oracle

tnsnames.ora

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.111.123)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

对应的把localhost换成自己的IP就可以了。

本文永久更新链接地址

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template