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. [Unreal]学习笔记之材质说明

    取消蓝图中的连接线:Alt+鼠标左键 在蓝图中,通过按住1,2,3,4加鼠标左键,可以快速生成1,2,3,4维的向量 材质和材质实例的区别:使用一个母材质,可以创建出多种场景中的材质实例:每次修改母材 ...

  2. fineui刷新父页面

    protected override string AfterAddJS() { //TODO 重载这2个函数 可以控制新增和编辑之后执行的JS return AfterSaveJS_ReloadDa ...

  3. SQL创建流水号

    创建流水号表 CREATE TABLE SystemSerialNo ( SerialNoId INT PRIMARY KEY IDENTITY, TableName VARCHAR(60), Pre ...

  4. 一个php 字符串判断问题

    先看代码 你觉得下面的代码会输出什么结果: <?php $a = "10"; $b = "1e1"; if($a == $b ) { echo " ...

  5. Genymotion安装及遇到的问题

    https://www.genymotion.com/ 首先注册,不注册看不到下载按钮. 注册登陆后下载安装包(一定要记住用户名和密码,因为安装后登陆要用) 一路下一步. 选择虚拟设备 genymot ...

  6. html5第二天

    哎..以为自己能每天坚持写呢.前面8天一直在D3的东西..都没有时间研究html5.草草的翻了一下HTML5和CSS3权威指南.对整个页面设计有了一个大概的把握,但是让自己做肯定还会有写问题.暂时ht ...

  7. HDOJ 4770 Lights Against Dudely

    状压+暴力搜索 Lights Against Dudely Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K ...

  8. rpcbind服务说明及关闭

    rpcbind服务说明及关闭 Posted by 破冰 on -- : Tuesday rpcbind服务停止命令 service portmap stop redhat 的rpc.statd服务: ...

  9. PHP window下安装Spl_Types模块

    1. Window下,Spl_Types的模块的下载地址:http://pecl.php.net/package/SPL_Types/0.4.0/windows 2. php的可执行文件已经加到系统的 ...

  10. cocos2d-js 学习笔记 --安装调试(2)

    对于初学者安装cocos2d-js的环境并没有教程中说的那么简单,至少笔者是这么认为的 第一步,下载cocos2d-js的SDK,(先别着急运行) 第二步,安装Cocos2d console ,(Ma ...