• Oracle ORA-12514: TNS:listener does not currently know of service requested in conn解决方案


    # listener.ora Network Configuration File: D:oracleproduct10.1.0Db_1
    etworkadminlistener.ora
    # Generated by Oracle configuration tools.
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = D:oracleproduct10.1.0Db_1)
          (PROGRAM = extproc)
        )
        )
      )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = cust-e44050fe71)(PORT = 1521))
          )
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
          )
        )
      )
    

     如果你listener.ora配置文件是这样的 说明少了一些配置信息应指出监听那个数据库应加上

    (SID_DESC =
          (GLOBAL_DBNAME = GKBM2015) //为数据库服务名
          (ORACLE_HOME = D:oracleproduct10.1.0Db_1)
          (SID_NAME = GKBM2015) //为数据库服务名
         )
        (SID_DESC =
          (GLOBAL_DBNAME = ZYXX2015) //为数据库服务名
          (ORACLE_HOME = D:oracleproduct10.1.0Db_1)
          (SID_NAME = ZYXX2015) //为数据库服务名
        )
    

     之后的文件是这样的

    # listener.ora Network Configuration File: D:oracleproduct10.1.0Db_1
    etworkadminlistener.ora
    # Generated by Oracle configuration tools.
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = D:oracleproduct10.1.0Db_1)
          (PROGRAM = extproc)
        )
        (SID_DESC =
          (GLOBAL_DBNAME = GKBM2015)
          (ORACLE_HOME = D:oracleproduct10.1.0Db_1)
          (SID_NAME = GKBM2015)
         )
        (SID_DESC =
          (GLOBAL_DBNAME = ZYXX2015)
          (ORACLE_HOME = D:oracleproduct10.1.0Db_1)
          (SID_NAME = ZYXX2015)
        )
        )
      )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = cust-e44050fe71)(PORT = 1521))
          )
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
          )
        )
      )
    

     之后重启监听程序

    cmd命令中输入 lsnrctl

    stop

    start

  • 相关阅读:
    Eureka的集群配置
    spring-cloud_Eureka服务注册与发现
    ADB常用命令
    教你如何修改Python的pip源镜像
    【vscode】【python】自定义代码自动补全
    【docker】删除docker中的运行日志
    MVC页面上多个提交按钮提交到不同的Action
    MongoDB在windows服务器安装部署及远程连接MongoDB
    sql如果存在就修改不存在就新增
    c#序列化和反系列化json与类型对象转换
  • 原文地址:https://www.cnblogs.com/Small-Life/p/4337306.html
Copyright © 2020-2023  润新知