This discussion is archived
8 Replies Latest reply: Jun 4, 2013 1:08 AM by Udo RSS

Test Database Connection "Unable to connect to DB" using Oracle 10g Express

1012358 Newbie
Currently Being Moderated
DB is up and running fine pls help


Connection test failed.
Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:419)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:538)
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:482)
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:156)
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:101)
com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:745)
com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:458)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
...
  • 1. Re: Test Database Connection "Unable to connect to DB" using Oracle 10g Express
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated
    Pl post OS details. Were all steps in the install guide completed without any errors ?

    http://www.oracle.com/pls/xe102/homepage

    HTH
    Srini
  • 2. Re: Test Database Connection "Unable to connect to DB" using Oracle 10g Express
    Udo Guru
    Currently Being Moderated
    Hello and welcome to the OTN forums,
    DB is up and running fine pls help
    How did you check that?
    Connection test failed.
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    This error message indicates that you either connect with the wrong SID or the instance you are trying to connect is actually wrong or the instace you are trying to connect are located on a different machine and you have hit on another host with a database listener on the same port...
    Without further information on your parameters and your enviroment it's hard to give you a more precise hint...

    -Udo
  • 3. Re: Test Database Connection "Unable to connect to DB" using Oracle 10g Express
    1012358 Newbie
    Currently Being Moderated
    After installing the JDBC driver and selecting the test configuration i am getting the below erro:

    Connection test failed.
    Message icon - Error Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:419)
    oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:538)
    oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)
    oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
    oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
    oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:482)
    oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:156)
    oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:101)
    com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:745)
    com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:458)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
    org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
    org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
    org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
    org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
    ...


    The Steps i followed to install the JDBC Driver are mentioned below:

    1. JDBC Data Source Properties:
    Name: testSample
    JNDI Name: abc.xyz.testSample
    Database Type: Oracle
    Database Driver: Oracle’s (Thin XA) for Instance
    connections; Versions: ... 11

    Database Name: orcl
    Host Name: wls-sysadm
    Port: 1521
    Database User Name: weblogic
    Password and Confirm Password: Welcome1

    Before that i started the database from start menu
    and both the services
    ORACLE service XE
    and ORACLELISTNERSERVICE is up and running fine.












    C:\Users\satish>lsnrctl status

    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 04-JUN-2013 10:18
    :51

    Copyright (c) 1991, 2005, Oracle. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 04-JUN-2013 09:35:25
    Uptime 0 days 0 hr. 43 min. 26 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Default Service XE
    Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
    dmin\listener.ora
    Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l
    og\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SATISH-PC)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=
    HTTP)(Session=RAW))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "XEXDB" has 1 instance(s).
    Instance "xe", status READY, has 1 handler(s) for this service...



    Can anyone pls help...urgent
  • 4. Re: Test Database Connection "Unable to connect to DB" using Oracle 10g Express
    Udo Guru
    Currently Being Moderated
    Hello,

    the error message results from this parameter
    Database Name: orcl
    ... which whould be "xe" for your XE database instance.
    Database Driver: Oracle’s (Thin XA) for Instance
    connections; Versions: ... 11
    Despite that, you are connecting to a 10g database, so you shouldn't select 11 here if 10 would be applicable.

    -Udo
  • 5. Re: Test Database Connection "Unable to connect to DB" using Oracle 10g Express
    1012358 Newbie
    Currently Being Moderated
    Then Which Driver i should select if i am selecting other drivers its asking for service name then

    which service name i should use....

    can you pls help me...
  • 6. Re: Test Database Connection "Unable to connect to DB" using Oracle 10g Express
    1012358 Newbie
    Currently Being Moderated
    Scenario is:

    I just want to deploy one application which needs DB connection.

    Thats why i installed oracle 10g and try to create datasource.

    But during test configuration its showing error can you pls help me.

    I dont have any knowledge of DB
  • 8. Re: Test Database Connection "Unable to connect to DB" using Oracle 10g Express
    Udo Guru
    Currently Being Moderated
    Then Which Driver i should select if i am selecting other drivers its asking for service name then
    You can try with Oracle Database 11, though your application might start using features that are not available in 10g yet, so it's always a good idea to use a driver version that corresponds to the database version you use.
    The "service name" would usually be "xe" in your case as well.
    But during test configuration its showing error can you pls help me.
    Did you try "xe" as database name with your 11g driver yet? That's what I pointed out as root cause for your error in my previous post.

    -Udo

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points