0

0

RAC 客户端连接TNS-12547: TNS: 丢失连接

php中文网

php中文网

发布时间:2016-06-07 16:49:27

|

2303人浏览过

|

来源于php中文网

原创

在sqlnet.ora文件中将tcp.validnode_checking的值设为no。然后重v刹启数据库与服务就可以了。

mos上面解释
 oracle e-business suite release 11.5.10 introduced support for the oracle net security feature, tcp.validnode_checking, which is used to prevent unauthorized oracle net access (for example via sql*plus) to the applications database. if a node or pc is not registered, the connection attempt will fail with the error ora-12537: tns: connection closed.
 
第一种方法
 第一种
 在sqlnet.ora文件中将tcp.validnode_checking的值设为no。然后重v刹启数据库与服务就可以了。
 
第二种方法 
客户,在使用pl/sql连接数据库的时候提示ora-12537:tns:连接关闭。
  查看过程:
 1)查看客户端tnsname.ora文件信息如下:# tnsnames.ora network configuration file: e:\oracle\network\admin\tnsnames.ora
  # generated by oracle configuration tools.
  rhys =
    (description =
      (address_list =
        (address = (protocol = tcp)(host = 192.168.20.1)(port = 1521))
      )
      (connect_data =
        (service_name = test)
      )
    )
 没有问题
 2)查看服务器监听状态
 [oracle@oracle-one ~]$ lsnrctl status
 lsnrctl for linux: version 11.2.0.4.0 - production on 01-nov-2013 11:19:35copyright (c) 1991, 2013, oracle.  all rights reserved.
 connecting to (description=(address=(protocol=tcp)(host=oracle-one)(port=1521)))
  status of the listener
  ------------------------
  alias                    listener
  version                  tnslsnr for linux: version 11.2.0.4.0 - production
  start date                01-nov-2013 11:08:41
  uptime                    0 days 0 hr. 10 min. 54 sec
  trace level              off
  security                  on: local os authentication
  snmp                      off
  listener parameter file  /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
  listener log file        /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
  listening endpoints summary...
    (description=(address=(protocol=tcp)(host=oracle-one)(port=1521)))
    (description=(address=(protocol=ipc)(key=extproc1521)))
  services summary...
  service "test" has 1 instance(s).
    instance "test", status ready, has 1 handler(s) for this service...
  service "rhysxdb" has 1 instance(s).
    instance "test", status ready, has 1 handler(s) for this service...
  the command completed successfully
  [oracle@oracle-one ~]$ sqlplus / as sysdba
 sql*plus: release 11.2.0.4.0 production on fri nov 1 11:19:38 2013copyright (c) 1982, 2013, oracle.  all rights reserved.
  connected to:
  oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production
  with the partitioning, olap, data mining and real application testing options
 sql> show parameter service name                                type        value
  ------------------------------------ ----------- ------------------------------
  service_names                        string      test
  sql>
正常
 3)在客户端使用tnsping:
 c:\users\administrator>tnsping rhystns ping utility for 32-bit windows: version 11.2.0.1.0 - production on 01-11月-
 2013 11:10:05copyright (c) 1997, 2010, oracle.  all rights reserved.已使用的参数文件:
 e:\softsetup\oracle_client\oracle_base\network\admin\sqlnet.ora
 已使用 tnsnames 适配器来解析别名
  尝试连接 (description = (address_list = (address = (protocol = tcp)(host = 192.1
  68.20.1)(port = 1521))) (connect_data = (service_name = test)))
  tns-12547: tns: 丢失连接
 c:\users\administrator>
 4)在服务器查看sqlnet.ora文件内容如下:
 tcp.validnode_checking=yes
  tcp.invited_nodes=(192.168.56.101)
 可以看出,正是由于存在tcp.validnode_checking=yes才去检查tcp.invited_nodes定义的节点,将客户端ip地址192.168.56.1加入该文件中即可。
 tcp.validnode_checking=yes
  tcp.invited_nodes=(192.168.56.101,192.168.56.1)
  "sqlnet.ora" 1118l, 32887c written                                                                                                                 
 [oracle@oracle-one admin]$
 由于操作的是正在运行的服务器,,因此不能重启该监听,但是reload可以实现。
 [oracle@oracle-one admin]$
  lsnrctllsnrctl for linux: version 11.2.0.4.0 - production on 01-nov-2013 11:22:57copyright (c) 1991, 2013, oracle. 
all rights reserved.welcome to lsnrctl, type "help" for information.
 lsnrctl> help
  the following operations are available
  an asterisk (*) denotes a modifier or extended command:start              stop                status             
 services            version            reload             
 save_config        trace              spawn             
 change_password    quit                exit               
 set*                show*              lsnrctl> reload
  connecting to (description=(address=(protocol=tcp)(host=oracle-one)(port=1521)))
  the command completed successfully
  lsnrctl> exit
 5)在客户端测试:
 c:\users\administrator>tnsping rhys
 tns ping utility for 32-bit windows: version 11.2.0.1.0 - production on 01-11月-
 2013 11:23:14copyright (c) 1997, 2010, oracle.  all rights reserved.已使用的参数文件:
 e:\softsetup\oracle_client\oracle_base\network\admin\sqlnet.ora
 已使用 tnsnames 适配器来解析别名
  尝试连接 (description = (address_list = (address = (protocol = tcp)(host = 192.1
  68.56.101)(port = 1521))) (connect_data = (service_name = rhys)))
  ok (10 毫秒)c:\users\administrator>
 问题得到解决

Cardify卡片工坊
Cardify卡片工坊

使用Markdown一键生成精美的小红书知识卡片

下载

本文永久更新链接地址:

linux

热门AI工具

更多
DeepSeek
DeepSeek

幻方量化公司旗下的开源大模型平台

豆包大模型
豆包大模型

字节跳动自主研发的一系列大型语言模型

通义千问
通义千问

阿里巴巴推出的全能AI助手

腾讯元宝
腾讯元宝

腾讯混元平台推出的AI助手

文心一言
文心一言

文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。

讯飞写作
讯飞写作

基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿

即梦AI
即梦AI

一站式AI创作平台,免费AI图片和视频生成。

ChatGPT
ChatGPT

最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。

相关专题

更多
AO3官网入口与中文阅读设置 AO3网页版使用与访问
AO3官网入口与中文阅读设置 AO3网页版使用与访问

本专题围绕 Archive of Our Own(AO3)官网入口展开,系统整理 AO3 最新可用官网地址、网页版访问方式、正确打开链接的方法,并详细讲解 AO3 中文界面设置、阅读语言切换及基础使用流程,帮助用户稳定访问 AO3 官网,高效完成中文阅读与作品浏览。

19

2026.02.02

主流快递单号查询入口 实时物流进度一站式追踪专题
主流快递单号查询入口 实时物流进度一站式追踪专题

本专题聚合极兔快递、京东快递、中通快递、圆通快递、韵达快递等主流物流平台的单号查询与运单追踪内容,重点解决单号查询、手机号查物流、官网入口直达、包裹进度实时追踪等高频问题,帮助用户快速获取最新物流状态,提升查件效率与使用体验。

6

2026.02.02

Golang WebAssembly(WASM)开发入门
Golang WebAssembly(WASM)开发入门

本专题系统讲解 Golang 在 WebAssembly(WASM)开发中的实践方法,涵盖 WASM 基础原理、Go 编译到 WASM 的流程、与 JavaScript 的交互方式、性能与体积优化,以及典型应用场景(如前端计算、跨平台模块)。帮助开发者掌握 Go 在新一代 Web 技术栈中的应用能力。

1

2026.02.02

PHP Swoole 高性能服务开发
PHP Swoole 高性能服务开发

本专题聚焦 PHP Swoole 扩展在高性能服务端开发中的应用,系统讲解协程模型、异步IO、TCP/HTTP/WebSocket服务器、进程与任务管理、常驻内存架构设计。通过实战案例,帮助开发者掌握 使用 PHP 构建高并发、低延迟服务端应用的工程化能力。

2

2026.02.02

Java JNI 与本地代码交互实战
Java JNI 与本地代码交互实战

本专题系统讲解 Java 通过 JNI 调用 C/C++ 本地代码的核心机制,涵盖 JNI 基本原理、数据类型映射、内存管理、异常处理、性能优化策略以及典型应用场景(如高性能计算、底层库封装)。通过实战示例,帮助开发者掌握 Java 与本地代码混合开发的完整流程。

1

2026.02.02

go语言 注释编码
go语言 注释编码

本专题整合了go语言注释、注释规范等等内容,阅读专题下面的文章了解更多详细内容。

61

2026.01.31

go语言 math包
go语言 math包

本专题整合了go语言math包相关内容,阅读专题下面的文章了解更多详细内容。

53

2026.01.31

go语言输入函数
go语言输入函数

本专题整合了go语言输入相关教程内容,阅读专题下面的文章了解更多详细内容。

26

2026.01.31

golang 循环遍历
golang 循环遍历

本专题整合了golang循环遍历相关教程,阅读专题下面的文章了解更多详细内容。

31

2026.01.31

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
简单聊聊mysql8与网络通信
简单聊聊mysql8与网络通信

共1课时 | 820人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号