Chinaunix首页 | 论坛 | 博客
  • 博客访问: 183490
  • 博文数量: 46
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 490
  • 用 户 组: 普通用户
  • 注册时间: 2017-03-26 14:22
个人简介

做最Low逼的DBA

文章分类

全部博文(46)

文章存档

2017年(46)

我的朋友

分类: Oracle

2017-04-19 22:10:49

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Helvetica} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Helvetica; min-height: 13.0px}

解决一则问题如下:

1.新建立监听程序报错:端口被占用

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


解决如下:

1.在Oracle 11g  network/admin目录下建立lintener.ora监听文件,配置如下:

# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

# Generated by Oracle configuration tools.


SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)

(PROGRAM = extproc)


)    

(SID_DESC =

(SID_NAME = orcl)

(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)

)

)


LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = reportdb)(PORT = 1522))

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))

)

)


ADR_BASE_LISTENER = /u01/app/oracle



2.在 network/admin目录下建立tnsnames.ora文件,配置如下:

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.



LISTENER_ORCL =

(ADDRESS = (PROTOCOL = TCP)(HOST = reportdb)(PORT = 1522))


ORACLR_CONNECTION_DATA =  

(DESCRIPTION =  

(ADDRESS_LIST =  

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))  

)  

(CONNECT_DATA =  

(SID = CLRExtProc)  

(PRESENTATION = RO)  

)  

)  


ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = reportdb)(PORT = 1522))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl)

)

)


3.重启监听程序。

lsnrct reload


4.查看监听程序

[oracle@reportdb ~]$ lsnrctl status


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-8月 -2016 14:27:30


Copyright (c) 1991, 2013, Oracle.  All rights reserved.


正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=reportdb)(PORT=1522)))

LISTENER 的 STATUS

------------------------

别名                      LISTENER

版本                      TNSLSNR for Linux: Version 11.2.0.4.0 - Production

启动日期                  29-8月 -2016 13:53:16

正常运行时间              0 天 0 小时 34 分 14 秒

跟踪级别                  off

安全性                    ON: Local OS Authentication

SNMP                      OFF

监听程序参数文件          /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

监听程序日志文件          /u01/app/oracle/diag/tnslsnr/reportdb/listener/alert/log.xml

监听端点概要...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=reportdb)(PORT=1522)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))

服务摘要..

服务 "PLSExtProc" 包含 1 个实例。

实例 "PLSExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

服务 "orcl" 包含 1 个实例。

实例 "orcl", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

命令执行成功


5.Tnsping ORCL实例测试

[oracle@reportdb ~]$ tnsping orcl


TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 29-8月 -2016 14:28:07


Copyright (c) 1997, 2013, Oracle.  All rights reserved.


已使用的参数文件:


已使用 TNSNAMES 适配器来解析别名

尝试连接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = reportdb)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))

OK (0 毫秒)

阅读(7595) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~