[20181204]低版本toad 9.6直连与ora-12505.txt

--//我们生产系统还保留有一台使用AMERICAN_AMERICA.US7ASCII字符集的数据库,这样由于toad新版本不支持该字符集的中文显示.
--//我一直保留toad 9.6的版本,并且这个版本是32位的,我必须在我的机器另外安装10g 32位版本的客户端,这样才能连上数据库.

--//同事前一段时间遇到使用该版本的连接问题,我已经解决,链接:http://blog.itpub.net/267265/viewspace-2219005/

--//前几天同事告诉我配置tnsnames.ora连接没有问题.而使用toad下直连模式报ora-12505错误.数据库是18c的版本
--//TNS:listener does not currently know of SID given in connect descriptor

$ oerr ora 12505
12505, 00000, "TNS:listener does not currently know of SID given in connect descriptor"
// *Cause:  The listener received a request to establish a connection to a
// database or other service. The connect descriptor received by the listener
// specified a SID for an instance (usually a database instance) that either
// has not yet dynamically registered with the listener or has not been
// statically configured for the listener. This may be a temporary condition
// such as after the listener has started, but before the database instance
// has registered with the listener.
// *Action:
//  - Wait a moment and try to connect a second time.
//  - Check which instances are currently known by the listener by executing:
//    lsnrctl services <listener name>
//  - Check that the SID parameter in the connect descriptor specifies
//    an instance known by the listener.
//  - Check for an event in the listener.log file.

--//有点奇怪的是我明明直连使用服务名连接,为什么报TNS:listener does not currently know of SID given in connect descriptor.
--//而是有关sid的信息呢?

1.环境:
SYS@orclcdb> select BANNER from v$version ;
BANNER
--------------------------------------------------------------------------------
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

--//首先我尝试使用toad 9.6直连cdb数据库,ok没有问题.而问题出现在连接pdb数据库.

$ lsnrctl status
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 04-DEC-2018 09:10:36
Copyright (c) 1991, 2018, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date                04-DEC-2018 09:06:09
Uptime                    0 days 0 hr. 4 min. 27 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/18.0.0/grid_home/network/admin/listener.ora
Listener Log File         /u01/app/oracle_base/diag/tnslsnr/hosp2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hosp2)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "64a52f53a7683286e053cda9e80aed76" has 1 instance(s).
  Instance "orclcdb", status READY, has 1 handler(s) for this service...
Service "74a69dc145f5662be0558253dd747177" has 1 instance(s).
  Instance "orclcdb", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orclcdb", status READY, has 1 handler(s) for this service...
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Service "orclcdb" has 1 instance(s).
  Instance "orclcdb", status READY, has 1 handler(s) for this service...
Service "orclcdbXDB" has 1 instance(s).
  Instance "orclcdb", status READY, has 1 handler(s) for this service...
The command completed successfully

--//注意看服务名orcl里面指向的实例是orclcdb.
--//突然想起链接:http://blog.itpub.net/267265/viewspace-2140061/的测试.
--//从提示上也是
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
Warning: You are no longer connected to ORACLE.
--//我明明使用服务名连接访问数据库,为什么报sid之类的错误.

--//视乎toad 9.6版本的直连模式也很奇怪,视乎还要对上sid.
--//修改监听配置文件./u01/app/oracle/product/18.0.0/grid_home/network/admin/listener.ora
--//加入如下:
USE_SID_AS_SERVICE_listener=on

--//注意文件的位置,我们的数据库很特殊,单实例asm.要修改/u01/app/oracle/product/18.0.0/grid_home/network/admin/目录下的监听配置文件.
--//监听重启也要执行:
$ srvctl stop listener ; srvctl start listener

--//这样再使用toad下直连模式就没有任何问题,连接cdb与pdb都没有问题.
--//我最终发现这个版本的toad(9.6)有bug(服务名和sid一样连接就没有问题),如果使用使用toad 12以上版本没有这个问题.

--//我在我的测试环境配置如下:
SYS@book> @ ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 04-DEC-2018 09:50:59
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(ARGV0=LLLLLL)(HOST=0.0.0.0)(PORT=1521)(ARGV0=KKKKK)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                20-SEP-2018 09:52:59
Uptime                    74 days 23 hr. 58 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "BOOKSHARE" has 1 instance(s).
  Instance "book", status READY, has 1 handler(s) for this service...
Service "booK123" has 1 instance(s).
  Instance "book", status UNKNOWN, has 1 handler(s) for this service...
Service "book" has 1 instance(s).
  Instance "book", status READY, has 2 handler(s) for this service...
Service "bookXDB" has 1 instance(s).
  Instance "book", status READY, has 1 handler(s) for this service...
The command completed successfully

--//配置2个服务 bookshare,book123. bookshare 是动态服务名,book123是静态服务.

SYS@book> show parameter service
NAME          TYPE   VALUE
------------- ------ ---------------
service_names string BOOK, BOOKSHARE

--//监听配置如下:
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

#SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF

SID_LIST_LISTENER =
   (SID_LIST =
    (SID_DESC =
      (SDU=32767)
      (GLOBAL_DBNAME = booK123)
      (ARGV0=myapp0)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0.4/dbhome_1)
      (SID_NAME=book)
      )
    )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(ARGV0=LLLLLL)(HOST = 0.0.0.0)(PORT = 1521)(ARGV0=KKKKK))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  )
 )

SECURE_REGISTER_LISTENER = (TCP)
ADR_BASE_LISTENER = /u01/app/oracle
DIAG_ADR_ENABLED_LISTENER=OFF
USE_NS_PROBES_FOR_DCD=true
INBOUND_CONNECT_TIMEOUT_LISTENER=10

--//使用toad 9.6连接使用服务名bookshare,book123都会报ora-12505错误.而使用新版本toad 12不会.

[20181204]低版本toad 9.6直连与ora-12505.txt的更多相关文章

  1. Fedora12下yum安装低版本gcc

    1.Fedora12下gcc位置及其版本如下: 2.根据需要,要安装低版本的gcc,直接用"yum install gcc"安装时默认是安装最新版本的gcc,如下: 3.可先通过& ...

  2. fetch ios低版本兼容cannot clone a disturbed response

    报错信息 ios 11以下 cannot clone a disturbed response github.com/github/fetc- 问题发生场景 使用了一个或者多个三方库 三方库或者自己的 ...

  3. xcode低版本调试高版本真机系统

    低版本xcode调试本真机高版本系统 //打开此路径把最新的文件拷贝到这里就可以了 /Applications/Xcode.app/Contents/Developer/Platforms/iPhon ...

  4. 低版本GCC程序向高版本移植的兼容性问题

    将低版本gcc编译过的程序移植到高版本GCC时, 可能会出现一些兼容性问题. 原因是, 为了适应新的标准,一些旧的语法规则被废弃了. 关于这方面的一些具体资料可从该处查询. 这里只是自己遇到的其中一个 ...

  5. android中导入低版本project可能会遇到的编译问题(转自: Victor@Beijing)

    使用高版本的SDK后再导入以前用低版本的project时,会遇到一些兼容性的问题. (1)Unable to resolve target 'android-5' 因为本机中现在使用的是2.2的SDK ...

  6. Sql Server本地高版本备份数据备份至远程低版本数据库方法

    想要将Sqlserver高版本备份的数据还原到低版本SqlServer2008R2上去,但是这在SqlServer中是没法直接还原数据库的,通过以下方法可以顺利还原. 通过高版本生成sql脚本在低版本 ...

  7. 让低版本的 Android 项目显示出 Material 风格的点击效果

    每天都被不同的需求纠缠的生活是幸福而又不幸的,这不我们家亲爱的设计师们又让我们在低版本的 Android 平台上实现一下类似于 Material Design 的点击效果. 虽然大家都知道 Mater ...

  8. android 在使用ViewAnimationUtils.createCircularReveal()无法兼容低版本的情况下,另行实现圆形scale动画

    ViewAnimationUtils.createCircularReveal()的简介: ViewAnimationUtils.createCircularReveal()是安卓5.0才引入的,快速 ...

  9. 高版本->低版本迁移,低版本客户端连接高版本数据库EXP导出报错EXP-00008,ORA-01455,EXP-00000

    生产环境: 源数据库:RHEL + Oracle 11.2.0.3 目标数据库:HP-UX + Oracle 10.2.0.4   需求:迁移部分表  11.2.0.3-->10.2.0.4,若 ...

随机推荐

  1. 用dos命令导出一个文件夹里面所有文件的名字(装逼利器)

    首先,当然是在相关的文件夹打开dos命令窗口. 然后,输入如下命令:dir/b >a.txt 如果你非常了解dos命令,那么你一定会觉得这个东西简单到爆,而且我的理解和猜想都有些无知. 但如果你 ...

  2. Spring Boot 系列(六)web开发-Spring Boot 热部署

    Spring Boot 热部署 实际开发中,修改某个页面数据或逻辑功能都需要重启应用.这无形中降低了开发效率,所以使用热部署是十分必要的. 什么是热部署? 应用启动后会把编译好的Class文件加载的虚 ...

  3. 基于Consul的数据库高可用架构

    几个月没有更新博客了,已经长草了,特意来除草.本次主要分享如何利用consul来实现redis以及mysql的高可用.以前的公司mysql是单机单实例,高可用MHA加vip就能搞定,新公司mysql是 ...

  4. LINUX LVM和快照卷配置和管理

    具体参考这个文章把: http://www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_linux_042_lvm.html 1.LVM是什么 逻辑卷管理LVM是一个多 ...

  5. [转&精]IO_STACK_LOCATION与IRP的一点笔记

    IO_STACK_LOCATION和IRP算是驱动中两个很基础的东西,为了理解这两个东西,找了一点资料. 1. IRP可以看成是Win32窗口程序中的消息(Message),DEVICE_OBJECT ...

  6. SecureCRT 设置彩色和显示中文

    1.设置Options->SessionOptions->Emulation,然后把Terminal类型改成xterm,并点中ANSI Color复选框.

  7. 翻译:insert on duplicate key update(已提交到MariaDB官方手册)

    本文为mariadb官方手册:INSERT ON DUPLICATE KEY UPDATE的译文. 原文:https://mariadb.com/kb/en/insert-on-duplicate-k ...

  8. 行为型---中介者模式(Mediator Pattern)

    中介者模式的定义 中介者模式,定义了一个中介对象来封装一系列对象之间的交互关系.中介者使各个对象之间不需要显式地相互引用,从而使耦合性降低,而且可以独立地改变它们之间的交互行为.   中介者模式的结构 ...

  9. CSharp工程中的几个文件

    以下基于.NET Framework4.6及.NET Core2.0 .csproj 用于配置项目信息,如: 程序集名称.类型 Framework版本 项目所包含的文件信息,如:cs.html.js. ...

  10. [Linux] LVS虚拟服务器四层负载均衡

    随着互联网的爆炸性增长及其在我们生活中日益重要的作用,互联网上的流量急剧增加,并且每年以超过100%的速度增长.服务器上的工作负载正在迅速增加,因此服务器很容易在短时间内过载,尤其是对于流行的网站.为 ...