zoukankan      html  css  js  c++  java
  • 在linux上安装完oracle数据库后,如何修改ORACLE_HOSTNAME

    1、修改HOSTS文件,添加node2到本机IP地址的映射:

    [root@node2home]# gedit /etc/hosts

    最后一行为添加的:

    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.222.11 node2

    2、修改/etc/sysconfig/network添加如下:

    [root@node2 home]# gedit /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=node2

    3、修改listener.ora

    su oracle
    
    gedit /home/oracle/product/11.2/db_1/network/admin/listener.ora

    修改HOST由HOST=localhost改为HOST=node2(随意):

    # listener.ora Network Configuration File: /home/oracle/product/11.2/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = node2)(PORT = 1521))
        )
      )
    
    ADR_BASE_LISTENER = /home/oracle

    4、tnsnames.ora文件不修改也可,我没修改

    gedit /home/oracle/product/11.2/db_1/network/admin/tnsnames.ora
    # tnsnames.ora Network Configuration File: /home/oracle/product/11.2/db_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
        )
      )
  • 相关阅读:
    部分类Partial
    Ajax之XMLHttpRequest
    C#结构(Struct)
    sql数据管理语句
    mysql基本语句
    bootstrap插件-滚动监听
    一轮项目学习总结
    js滚动监听
    Ajax
    各框架、插件记录
  • 原文地址:https://www.cnblogs.com/jycjy/p/6941429.html
Copyright © 2011-2022 走看看