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. linux 查找文件或目录

    find / -maxdepth 2 -name "vmware*"在根目录/ 2层深度下搜索以vmware打头的文件或者目录

  2. Codeforces Round #352 (Div. 2) ABCD

    Problems     # Name     A Summer Camp standard input/output 1 s, 256 MB    x3197 B Different is Good ...

  3. socket (一)

    socket通常也称作"套接字",用于描述IP地址和端口,是一个通信链的句柄,应用程序通常通过"套接字"向网络发出请求或者应答网络请求. socket起源于Un ...

  4. Python爬虫利器三之Xpath语法与lxml库的用法

    前面我们介绍了 BeautifulSoup 的用法,这个已经是非常强大的库了,不过还有一些比较流行的解析库,例如 lxml,使用的是 Xpath 语法,同样是效率比较高的解析方法.如果大家对 Beau ...

  5. clearfix的应用

    之前遇到一个问题,引用Bootstrap框架时 一行显示四个模块,小屏幕时显示两个模块 当内容一样时,大小屏幕时一样的,但是当其中一个和另一个内容不同时,展示效果就会有错乱 <div class ...

  6. Integer与int的区别(包装类和基本数据类型的区别)

    1. 默认值 int默认值为0,Integer的默认值为null.推论:Integer既可以表示null又可以表示0 2. 包装类中提供了该类型相关的很多算法操作方法 如把十进制装换为2进制(toBi ...

  7. 【TIP】已经上架的app在AppStore上搜不到的解决办法

    相信很多人都遇到过这个问题,天天刷iTunes connect,终于发现app已经上架了,兴奋的跑过去告诉老板,老板说好,大家都装一个吧!然后大家过来问你怎么搜不到,老板看你都是一副这个表情:   这 ...

  8. DevExpress 在使用Ribbon皮肤时标题栏不变化的原因

    将 form的 AllowFormGlass 属性 该为False 就可以标题栏皮肤化了.

  9. MySQL 5.6 OOM 问题解决分享【转】

    本文来自:杨德华的原创分享 | MySQL 5.6 OOM 问题解决分享 延伸阅读:Linux的内存回收和交换 当遇到应用程序OOM的时候,大多数时候只能用头疼来形容,应用程序还可以通过引流来临时重启 ...

  10. ssdb binlog机制 存疑

    int BinlogQueue::del_range(uint64_t start, uint64_t end){ while(start <= end){ leveldb::WriteBatc ...