• Oracle客户端连接数据库配置


    配置文件和路径

    • 配置文件:tnsnames.ora
    • 默认路径:%ORACLE_HOME% etworkadmin nsnames.ora%ORACLE_HOME%通常在环境变量中使用。
    • 我的路径为:C:Program Files (x86)OracleInstant Client etworkadmin nsnames.or

    配置文件如下:

    # tnsnames.ora Network Configuration File.
    # Generated by Oracle configuration tools.
    
    # Sample:
    #DatabaseName =   
    #  (DESCRIPTION =
    #    (ADDRESS_LIST =
    #      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))  
    #    )
    #    (CONNECT_DATA =
    #      (SERVER = DEDICATED)
    #      (SERVICE_NAME = ServiceName)
    #      (INSTANCE_NAME = InstanceName)                     
    #    )
    #  )
    
    # Modify the following content to fit your own needs.
    DummyDatabase =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = DummyService)
        )
      )
    
    
    pcidata_hce =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.10.10)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = devorcl)
        )
      )
      
    FM_DEV=
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.10.223)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = testorcl)
        )
      )
    
    hceorcl =                                                               //数据库名称自定义文中唯一值
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.10.123)(PORT = 1521))     //数据库IP及端口号
        (CONNECT_DATA =
          (SID =orcl)                                                       //实例名
        )
      )
    pdatatest =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.10.182)(PORT = 1521))
        (CONNECT_DATA =
          (SID =pdatatest)
        )
      )
    
    162ora =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.10.162)(PORT = 1521))
        (CONNECT_DATA =
          (SID =pdjgorcl)
        )
      )
    

     这样就可以通过pl/sql developer连接了。

  • 相关阅读:
    字符串系列复习
    点分治总结
    LCT总结
    网络流总结
    centOS7下安装GUI图形界面
    周记 2014.10.8
    周记 2014.9.28
    周记 2014.9.20
    tar命令
    [转]bit与byte
  • 原文地址:https://www.cnblogs.com/Dev0ps/p/9243571.html
Copyright © 2020-2023  润新知