码迷,mamicode.com
首页 > 数据库 > 详细

Oracle 11g ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务

时间:2015-11-13 13:12:34      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:

创建数据库test

1.打开Oracle net manager

2.服务命名:test

tcpip 主机:127.0.0.1 端口:1521

3.监听程序

选择 监听位置

网络地址:localhost

端口:1521

选择 数据库服务

全局数据库名 SID: test

4.停止监听服务 启动监听服务

# listener.ora Network Configuration File: E:\app\Administrator\product\11.1.0\db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = test)
      (SID_NAME = test)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = NBS)
      (SID_NAME = NBS)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  )

2个数据库服务一个test,一个NBS,公用一个监听

# tnsnames.ora Network Configuration File: E:\app\Administrator\product\11.1.0\db_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

test=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = test)
    )
  )

NBS =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = NBS)
    )
  )

 

Oracle 11g ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务

标签:

原文地址:http://www.cnblogs.com/andyz168/p/4961799.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!