JDBC URL FOR ORACLE, wrong or correct, how do you know?

    • INSTANCE SID by ":"

      jdbc:oracle:thin:@db_ip_or_name:1521:ODB_IS

    • SERVICE NAME by "/"

      jdbc:oracle:thin:@db_ip_or_name:1521/ODB_SN

    • How do you know?

      SELECT NAME,VALUE,DESCRIPTION

      FROM V$PARAMETER P

      WHERE P.NAME IN ('db_unique_name','db_name','instance_name','service_names');

      *maybe you need your dba's help to query data dictionary view

      *----NAME-----|--VALUE--|--DESCRIPTION------------------------------

      instance_name | ODB_IS | instance name supported by the instance

      service_names | ODB_SN | service names supported by the instance

      db_name | ODB_NM | database name specified in CREATE DATABASE

      db_unique_name| ODB_UN | Database Unique Name

      The defferents are for RAC, DG; PRD,UAT,DEV deployment requirement etc.

      Use service_names = db_name as normal, they must been see in 'lsnrctl status'

    • PORT:

      lsnrctl status

      *run on the DB server shell window

ORA-12505: TNS: 监听器无法处理连接描述符中所给出的SID

Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=186647552)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

当然除了上述纯配置错误之外,还一个可能就是实例服务还没有注册到监听器里去,这个需要了解动态注册和静态注册的知识,以及查看alert日志。

[grid@WMS ~]$ 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.

http://stackoverflow.com/a/41297876/963585

JDBC URL FOR ORACLE, wrong or correct, how do you know? ORA-12505的更多相关文章

  1. jdbc应用程序连接Oracle rac的URL写法:

    1.应用程序连接Oracle rac的URL写法: #Oracle(AMS) jdbc.driverClassName=oracle.jdbc.driver.OracleDriver jdbc.url ...

  2. jmeter oracle 多机 jdbc url配置

    jmeter oracle 多机 jdbc url配置: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HO ...

  3. 常用数据库的驱动程序及JDBC URL:

    Oracle数据库: 驱动程序包名:ojdbc14.jar 驱动类的名字:oracle.jdbc.driver.OracleDriver JDBC URL:jdbc:oracle:thin:@dbip ...

  4. 常用数据库 JDBC URL 格式

    一 常用数据库 JDBC URL 格式 1 sqLite  驱动程序包名:sqlitejdbc-v056.jar 驱动程序类名: org.sqlite.JDBC JDBC URL: jdbc:sqli ...

  5. JDBC ----常用数据库的驱动程序及JDBC URL:

    常用数据库的驱动程序及JDBC URL: Oracle数据库: 驱动程序包名:ojdbc14.jar  驱动类的名字:oracle.jdbc.driver.OracleDriver  JDBC URL ...

  6. Oracel JDBC URL 和 Driver 的获取

    Driver 的获取 Driver Name:   oracle.jdbc.driver.OracleDriver Oracel JDBC URL的获取: URL:   jdbc:oracle:thi ...

  7. jdbc url写法(集群)

    mysql集群,jdbc url写法:jdbc:mysql://[host:port],[host:port].../[database][?propertyName1][=propertyValue ...

  8. 错误处理Cannot load JDBC driver class 'oracle.jdbc.drive

    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnec是由于<Resource name=&qu ...

  9. 数据库jdbc链接:mysql, oracle, postgresql

    #db mysql#jdbc.driver=com.mysql.jdbc.Driver#jdbc.url=jdbc:mysql://localhost:3306/mysql?&useUnico ...

随机推荐

  1. 自己动手编写spring IOC源码

    前言:对于spring IOC概念不是很了解的朋友可以阅读我上一篇博客--轻松理解spring IOC(这两篇博客也是由于我的个人原因导致现在才发布,惭愧啊).通过这篇博客的理解之后,相信大家会对sp ...

  2. SQL Server启动的几种方法

    SQL Server 启动有以下几种方法: (1)在Control Panel——Administrative Tools——Services,找到SQL Server (XXX)进行启动. 其中XX ...

  3. 【codeforces 415D】Mashmokh and ACM(普通dp)

    [codeforces 415D]Mashmokh and ACM 题意:美丽数列定义:对于数列中的每一个i都满足:arr[i+1]%arr[i]==0 输入n,k(1<=n,k<=200 ...

  4. Python中的if __name__='__main__'语句的作用

    笔者在自学Python的过程中,对于if __name__='__main__'的用法感到很困惑,在think Python一书中原作者的源代码是这么解释if __name__='__main__'语 ...

  5. linux常用命令-压缩解压命令

    gzip [文件] 压缩后文件格式 .gz,这个命令只能压缩文件,不能压缩目录.并且这个命令压缩后不保留源文件 gunzip [文件] 或者 gzip -d [文件] 解压缩.gz的压缩文件 tar ...

  6. LINQ 函数的实战演练测试

    1.首先定义一个图书类.专门存放图书的属性信息. 代码如下:   //Book.cs using System; namespace LinqTest { public class Book { pu ...

  7. C# WinForm实现Windows 7 Aero磨砂玻璃效果

    在Vista系统之后,微软为窗体程序提供了Aero磨砂的效果,如下图.那么用C#如 何来实现这种磨砂效果呢? 代码: using System; using System.Collections.Ge ...

  8. typeScence

  9. 破解激活Win10无风险?激活后删除激活工具无影响===http://www.pconline.com.cn/win10/693/6932077_all.html#content_page_4

    1Windows激活:测试环境搭建 随着Windows 10的发布,许多用户都用上了这个新一代的操作系统.Windows 10有个最好的设置就是,只要你在已经激活的旧系统中升进行升级操作,就能获得一个 ...

  10. 数据库如何生成sql语句

    以SQL SERVER 2008为例子. 1.启动客户端管理器,连接到要生成脚本的数据库. 2.在左边的”对象资源管理器“中,右键选择该数据库打开菜单.选择”任务“,”生成脚本“菜单,打开对话框. 3 ...