Chinaunix首页 | 论坛 | 博客
  • 博客访问: 169704
  • 博文数量: 31
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 280
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-28 06:36
个人简介

还在学习oracle的路上。

文章分类

全部博文(31)

文章存档

2020年(9)

2018年(3)

2017年(6)

2016年(11)

2015年(2)

我的朋友

分类: Oracle

2016-04-26 14:27:06

监听文件的配置

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = orcl)
      (ORACLE_HOME = E:\app\Administrator\product\12.1.0\client_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\12.1.0\client_1\bin\oraclr12.dll")
    )
   (SID_DESC =
        (GLOBAL_DBNAME = orcl )
        (SID_NAME = orcl )
     )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.7)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = orcl))  --- 这里可以不用管
    )
  )



客户端连接的设置
# tnsnames.ora Network Configuration File: C:\app\Administrator\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

PB2 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = pb2)
    )
  )



PB1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = pb1 )
    )
  )



以上的内容 是我 tnsname.ora 文件的设置内容,环境是 12c 启用了PDB。这样在服务器上就可以连接本地的数据库了。
阅读(2318) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~