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. PHPMailer < 5.2.18 - RCE EXP(Bash)

    #!/bin/bash# CVE-2016-10033 exploit by opsxcq# https://github.com/opsxcq/exploit-CVE-2016-10033echo ...

  2. yii2创建数据表

    原文地址: http://blog.csdn.net/xiaoyangxiaodong/article/details/45026865

  3. meta_value与meta_value_num的区别(排序)

    [meta_value与meta_value_num] //'meta_value' - 注意'meta_key=keyname' 必须也出现在查询中. 注意排序是按照字母表顺序进行的.(如:word ...

  4. 【JSP错误总结】无法访问jsp页面

    运行环境:window 7 64位  JSP服务器 tomcat 7 现象:无法访问JSP页面,如下图所示:

  5. 前端构建工具之gulp_常用插件

    gulp常用插件的使用 今天来看看一下gulp的常用插件的使用 就像gruntjs需要一个Gruntfile.js文件一样,gulp也需要一个文件作为它的主文件,在gulp中这个文件叫做gulpfil ...

  6. PHP收藏

    PHP打印测试,PHP调试技巧    PHP header函数使用大全    PHP面向对象(OOP)编程入门教程 小片段: PHP保留2位小数 格式化小数.浮点数 header('Content-T ...

  7. java从基础知识(九)I/O

    java中的流可以从不同的角度进行分类 按流的方向:输入流.输出流(注意这里的输入(read).输出是相对于程序而言的(writer),个人认为从读.写角度理解更为直观) 按处理数据单位:字节流.字符 ...

  8. hdu1045 DFS

    #include<stdio.h> #include<string.h> int n; int maxx; ][]; ]={,-,,}; ]={,,,-}; ][][];//炮 ...

  9. python string模块

    string.ascii_lowercase ='abcdefghijklmnopqrstuvwxyz' string.ascii_uppercase ='ABCDEFGHIJKLMNOPQRSTUV ...

  10. Unity MonoDevelop一打开未响应

    在学习Untiy的时候,使用内置的MonoDevelop开发工具.本来就不好用,经常出现未响应的情况,然后重启解决.终于有一次莫名其妙的崩溃了,在Unity打开该IDE就未响应,但直接打开MonoDe ...