现在的位置: 首页 > 数据库 > 正文

oracle中手动添加监听器

2017年11月14日 数据库 ⁄ 共 1121字 ⁄ 字号 评论关闭

                                                                                   oracle中手动添加监听器与用户

        为了方便、快捷、通过pl/sql连接数据库服务器 ,可以手动的添加监听器与用户。

   准备 :

       1. 监听程序参数文件 :E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora

  文件内容为:

   SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-6T7KS8ECIRV)(PORT = 1521))
    )
  )

CANLIAN =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-6T7KS8ECIRV)(PORT = 1521))
    )
  )

 CANLIAN就是新添加的实例  

2. E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora

tnsnames.ora文件配置如下 :

 ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-6T7KS8ECIRV)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

canlian =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.25.9)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = canlian)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )


抱歉!评论已关闭.