Problem in connecting to database using oracle jdbc thin driver

hi
i am trying to connect to a database using oracle thin driver.
i am getting following error:
java.sql.sqlexception:Io exception: the network adapter could not establish the connection
Io exception: the network adapter could not establish the connection
the connection string has the property of using a dedicated server
for this reason i have put USE_DEDICATED_SERVER=ON in sqlnet.ora file...
we did not face this problem while connecting to other databases which do not have the property of dedicated server in their connection string in tnsnames.ora file.
please suggest a solution for this.
thanks and regards,
asif

If you are using the thin driver, sqlnet.ora does not come into play. None of Oracle networking does. That is one of the great things about using the thin driver, no need to have the client installed.
That error is due to incorrect connection info you are supplying or the machine you are connection from can't ping the machine it is trying to connect to.

Similar Messages

  • Connecting to OAS using Oracle JDBC Thin

    Hi,
    When I test connect to OAS residing on another host, using ORACLE JDBC THIN Driver and Named host method, I get the following error message :
    "Got back minus one from a read call"
    Any clues why such a message would come?
    Thks
    Sudha

    If you are using the thin driver, sqlnet.ora does not come into play. None of Oracle networking does. That is one of the great things about using the thin driver, no need to have the client installed.
    That error is due to incorrect connection info you are supplying or the machine you are connection from can't ping the machine it is trying to connect to.

  • Sql_trace does not work for Java app using Oracle JDBC thin driver

    Hi,
    I'm using Oracle 8.1.7. I enabled sql trace at instance level by setting sql_trace and timed_statistics to true in init.ora. I restarted the db instance. I wrote a stand-alone java application which used Oracle JDBC thin driver(classes12.zip) to make a connection to my db instance, do some select statements, and close the connection. There were no trace files generated in the folder specified by udump_dest variable. However, if I used sqlplus or dba studio, I saw trace files generated. Has anyone got Oracle sql trace work for JDBC calls from java apps.
    Thanks in advance!

    Hi,
    I'm using Oracle 8.1.7. I enabled sql trace at instance level by setting sql_trace and timed_statistics to true in init.ora. I restarted the db instance. I wrote a stand-alone java application which used Oracle JDBC thin driver(classes12.zip) to make a connection to my db instance, do some select statements, and close the connection. There were no trace files generated in the folder specified by udump_dest variable. However, if I used sqlplus or dba studio, I saw trace files generated. Has anyone got Oracle sql trace work for JDBC calls from java apps.
    Thanks in advance!

  • Change expired password using oracle jdbc thin driver

    Hello,
    I have a java program that uses the oracle jdbc thin driver (ojdbc6 - version 11.2.0.3) for database connection. My question is if I have any possibility to change an expired password (java.sql.SQLException: ORA-28001: the password has expired) using the thin driver - NOT OCI?

    No - the thin driver doesn't have any password management features.

  • Using Oracle JDBC Thin Driver

    We are trying to use the Oracle supplied JDBC thin driver directly from within a jar file we add for our application.
    The classes in the jar file directly connect to an oracle database via the thin driver.
    The problem we've encountered is that if the JDBC Connection object is held in memory, after some time, the connection times out for no reason.
    Is there some restriction with weblogic in connecting directly to database from a class file and then caching the connection reference? It almost seems as if weblogic is severing the connections.
    thank you,
    BJ

    Stefan,
    You are right, although I would recommend just having the
    TestConnectionOnReserve= true and the testTableName set. Refresh Minutes
    becomes kind of redundent when you set these values.
    TestConnsOnReserve allows the server to verify if a connection that the
    client/application has requested is good , otherwise it recreates this
    connection and gives it to the client/application.
    hth
    sree
    "Stefan" <[email protected]> wrote in message
    news:[email protected]...
    Hi Sree,
    If instead a WL connection pool would be used this issue could be solved
    using
    "Refresh Period" and TestTableName right? In this case the connection would
    be
    alive as long as WL server is up. As a bonus we would have an automatic
    reconnection
    after an Oracle server reboot?
    thanks, stefan
    "Sree Bodapati" <[email protected]> wrote:
    Hi BJ,
    When you get connection directly using the Oracle thin driver, this is
    for
    sure your database timing out the connection when no activity is detected
    for sometime. You should consult with your DBA to ensure this timeout
    is set
    to a higher value at the server or ensure you dont hold on to theconnection
    for long durations or ensure you handle this situation by triggering
    a
    generic oracle process so that you periodically keep the connection busy
    to
    ensure that the database does not close it.
    This shouldnt be anything to do with WebLogic as you dont seem to be
    using
    WebLogic connection pool.
    hth
    sree
    "BJ Choi" <bongjin.choi@neoforma> wrote in message
    news:[email protected]...
    We are trying to use the Oracle supplied JDBC thin driver directly from
    within a jar file we add for our application.
    The classes in the jar file directly connect to an oracle database via
    the
    thin driver.
    The problem we've encountered is that if the JDBC Connection object is
    held
    in memory, after some time, the connection times out for no reason.
    Is there some restriction with weblogic in connecting directly to database
    from a class file and then caching the connection reference? It almost
    seems
    as if weblogic is severing the connections.
    thank you,
    BJ

  • Issue in handling UTF8 characters using Oracle JDBC thin driver in Linux

    We have a standalone Java application which reads values from one table and inserts the same into another table. The value in the source table is "Türkiye Is Bankasi Gayrettepe Subesi" and the same value after inserting into the target table becomes "T�rkiye Is Bankasi Gayrettepe Subesi" (ü is getting converted to �).
    The same works fine if we run the application in Windows.

    Thanks again for looking into this. Please find the answers below
    1.What character set do you use in the database? (see NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET in the view NLS_DATABASE_PARAMETERS).
    - Both of them are UTF8
    2. What is the type of the column storing that string? (e.g. VARCHAR2, NVARCHAR2, an object type, ...)
    - Varchar2
    3. Source binary value (for "Türkiye Is Bankasi Gayrettepe Subesi")
    is
    Typ=1 Len=36:
    54,fc,72,6b,69,79,65,20,49,73,20,42,61,6e,6b,61,73,69,20,47,61,79,72,65,74,74,65,70,65,20,53,75,62,65,73,69
    Target binary value (for "T�rkiye Is Bankasi Gayrettepe Subesi")
    is
    Typ=1 Len=38: 54,ef,bf,bd,72,6b,69,79,65,20,49,73,20,42,61,6e,6b,61,73,69,20,47,61,79,72,65,74,74,65,70,65,20,53,75,62,65,73,69

  • I think Oracle JDBC Thin driver has many problems

    I developed application & applet using Oracle JDBC/Thin Drivers
    for use with JDK 1.2 and SUN JDK 1.2.2.
    In my computer, application runs correctly.
    On the other hand, applet isn't run and throws error "Cannot
    find class java/util/Map" on connecting to Oracle database.
    You know, java/util/Map class is only in SUN JDK 1.2.x and
    current web-browsers (for example, IE5.0, Netscape 4.7, ...)
    don't support Java Run time 1.2.x.
    I think this is very critial problem.
    So I tried with Oracle JDBC/Thin Drivers for use with JDK 1.1.x
    and SUN JDK 1.1.8. (Now SUN only supports JDK 1.1.8 in JDK 1.1.x
    series)
    But this time, applet throws error "Cannot find class javax/..."
    You know, JDK 1.1.8 doesn't have javax/... classes but early JDK
    1.1.x series had javax/.... classes.
    May be Oracle JDBC/Thin Drivers for use with JDK 1.1.x are made
    using these early JDK 1.1.x series, so I think Oracle JDBC/Thin
    Drivers for use with JDK 1.1.x can't be used with SUN JDK 1.1.8.
    Whatever is the matter!
    null

    You need to remote onto the server and go into start->control panel-Administration-> ODBC (or sometimes start->administration->ODBC) and set up ODBC connections . Make sure you set them up on the system tab, then you should see them in EAS. I don't remember, b ut don't think you need to restart the Essbase servise for them to take effect

  • Oracle JDBC Thin-Driver: Connection still valid (db still open)?

    Hi,
    I've got a problem with my program. The app opens a connection to an Oracle Database usingt the Oracle JDBC Thin.Driver. Everything works just fine but I can't figure out a way how to find out wheter the connection is still valid, e.g. if the database is still open?
    connection.isClosed() return always false :(
    Any help is appreciated.
    Thanks,
    Spaulding

    Hi oracle_guru,
    unfortunately it's not that easy. :(
    You can't just check for
    if(conn == null)since the connection won't realize when the db shuts down.
    Therefore I created a connection-watcher-thread which uses a prepared statement to check every once in while if the connection is still valid.
    Nevertheless, thanks for you reply,
    Spaulding

  • Oracle JDBC Thin Driver and Firewall Problem

    Hi!
    We have Oracle 8.1.5 and Websphere App Server. There is a
    firewall between the two. A servlet creates a connection pool
    (not that of Wesphere's). The frontend is JSP/HTML (no applets).
    The servlet uses the Oracle JDBC Thin Driver for DB Connections.
    The problem is - Once the connection is freed, the connection
    pool is not being able to retrieve it and hence it created
    another one, thus reaching the max. # of connections and the
    system hangs. Restarting the DB service flushes the connection
    and the application starts running again...
    There was a similar problem discussed in this forums long ago. I
    have not yet tried mentioning the firwall port and IP in the
    connection string. But apart from that, is there any other
    setting I need to do (on firewall or for the connectionstring)
    to deal with this problem?
    Someone had suggested to punch a hole in the firewall for the DB
    port - but we can not really do that in the current scenario...
    I would appreciate if anyone could share their experience
    regarding how they resolved this issue.
    Thanks in advance,
    Vijaya.

    One more question -
    Can we use Oracle JDBC OCI driver? We do not have any appletes...
    Does it have firewall issues too? Is there any other driver that
    we can use?
    Thanks,
    Vijaya.

  • Oracle Jdbc Thin driver and nls suppot

    Hello,
    I have a hungarian database with nls_lang variable set to hungarian. I'm trying to do a jdbc connection using classes12.zip
    but I'm getting the hungarian characters converted to question marks or other characters.
    I read suggestions that I must include the nls_charset12.zip in my classpath too. So I did that but I'm still having the same problem.
    What is missed??
    How do I get the right hungarian charachters without any conversion.
    This is becoming frustrating and I'm not able to solve it yet.
    Thanks for your help

    One more question -
    Can we use Oracle JDBC OCI driver? We do not have any appletes...
    Does it have firewall issues too? Is there any other driver that
    we can use?
    Thanks,
    Vijaya.

  • Bug in Oracle JDBC thin driver (parameter order)

    [ I'd preferably send this to some Oracle support email but I
    can't find any on both www.oracle.com and www.technet.com. ]
    The following program illustrates bug I found in JDBC Oracle thin
    driver.
    * Synopsis:
    The parameters of prepared statement (I tested SELECT's and
    UPDATE's) are bound in the reverse order.
    If one do:
    PreparedStatement p = connection.prepareStatement(
    "SELECT field FROM table WHERE first = ? and second = ?");
    and then bind parameter 1 to "a" and parameter to "b":
    p.setString(1, "a");
    p.setString(2, "b");
    then executing p yields the same results as executing
    SELECT field FROM table WHERE first = "b" and second = "a"
    although it should be equivalent to
    SELECT field FROM table WHERE first = "a" and second = "b"
    The bug is present only in "thin" Oracle JDBC driver. Changing
    driver to "oci8" solves the problem.
    * Version and platform info:
    I detected the bug using Oracle 8.0.5 server for Linux.
    According to $ORACLE_HOME/jdbc/README.doc that is
    Oracle JDBC Drivers release 8.0.5.0.0 (Production Release)
    * The program below:
    The program below illustrates the bug by creating dummy two
    column table, inserting the row into it and then selecting
    the contents using prepared statement. Those operations
    are performed on both good (oci8) and bad (thin) connections,
    the results can be compared.
    You may need to change SID, listener port and account data
    in getConnecton calls.
    Sample program output:
    $ javac ShowBug.java; java ShowBug
    Output for both connections should be the same
    --------------- thin Driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    [ The same - with buggy reversed order (should give no answers):
    aaa
    --------------- oci8 driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    aaa
    [ The same - with buggy reversed order (should give no answers):
    --------------- The end ---------------
    * The program itself
    import java.sql.*;
    class ShowBug
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    System.out.println("Output for both connections should be the
    same");
    Connection buggyConnection
    = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:ORACLE",
    "scott", "tiger");
    process("thin Driver", buggyConnection);
    Connection goodConnection
    = DriverManager.getConnection ("jdbc:oracle:oci8:",
    "scott", "tiger");
    process("oci8 driver", goodConnection);
    System.out.println("--------------- The end ---------------");
    public static void process(String title, Connection conn)
    throws SQLException
    System.out.println("--------------- " + title + "
    Statement stmt = conn.createStatement ();
    stmt.execute(
    "CREATE TABLE bug (id VARCHAR(10), val VARCHAR(10))");
    stmt.executeUpdate(
    "INSERT INTO bug VALUES('aaa', 'bbb')");
    System.out.println("[ Non parametrized query: ]");
    ResultSet rset = stmt.executeQuery(
    "select id from bug where id = 'aaa' and val = 'bbb'");
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - parametrized (should give one
    row): ]");
    PreparedStatement prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "aaa");
    prep.setString(2, "bbb");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - with buggy reversed order
    (should give no answers): ]");
    prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "bbb");
    prep.setString(2, "aaa");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    stmt.execute("DROP TABLE bug");
    null

    Horea
    In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
    to "Never".
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute>Never</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    Deepak
    Horea Raducan wrote:
    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

  • How does Oracle JDBC thin driver handle numbers via getString?

    Hi,
    I have a query regarding how numbers are handled by the oracle jdbc thin driver. The issue I am facing is with regards to the decimal separator (. is en_US and , in pt_BR)
    e.g. Consider the below code,
    Connection conn = DriverManager.getConnection(...);
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select value from test_table1");
    while (rset.next())
    System.out.println (rset.getString(1));
    test_table1 has a single column of sql type 'number' with a single row having value "123.45"
    NLS_NUMERIC_CHARACTERS = ".,"
    Database version = 10.2.0.2.0
    There is a (generic) method to which a ResultSet is passed and it returns a dictionary of key value pairs. All column values from the ResultSet are retrieved using getString method of ResultSet.
    My question is whether the jdbc driver formats numbers (based on the locale) before returning it as a string as part of the getString method?
    e.g.
    java -Duser.language=pt -Duser.region=BR TestJDBC
    prints "123.45" and not "124,45"
    Is there a reason why getString always retrieves a number column value with '.' as the decimal separator?
    To help make things a bit more clear, all the column values retrieved are then converted into an XML (and hence the conversion to string)
    At present, the only way I see out of this is to handle numbers differently.
    i.e. something similar to,
    if (resultsetmetadata.getcolumntype .. = double OR float OR int OR long.. )
    NumberFormat.getInstance().format(rset.getDouble(1));
    Is there a better way to resolve this issue?
    Thanks,
    Binoy

    user565580,
    As has been already stated, Oracle does not have data-types INTEGER or SMALLINT, only NUMBER.
    So even though Oracle lets you write INTEGER, it really creates a NUMBER.
    (As Joe mentioned.)
    Other databases don't have a NUMBER data-type, they have INTEGER, SMALLINT, etc.
    Originally, Oracle database only had three data-types:
    CHAR
    DATE
    NUMBER
    If you're going to be working with Oracle database, then you need to adapt yourself to its limitations.
    So you'll probably need to define NUMBER data-types using scale and precision.
    (As Kuassi mentioned.)
    Good Luck,
    Avi.

  • Applet which uses the JDBC Thin driver

    My applet is running from Internet Explorer(Windows NT 4.0) and uses the JDBC
    Thin Driver to connect to database. The code complies with J2SDK1.4.0-beta3 and
    JDBC 2.0. I am getting following error:java.lang.NoClassDefFoundError:
    oracle/jdbc/driver/oracleDriver at applet.button_actionPerformed...
    Can anybody help?
    help urgently needed...
    Best regards and thanks in advance

    AFAIK the Oracle drivers still don't work with JDK 1.4, switch to 1.31 and they should be fine.

  • Oracle JDBC Thin Driver for oracle 9.2.0.4

    Hi,
    It would be nice if someone please guide me to the download of Oracle JDBC Thin Driver for oracle 9.2.0.4.
    Thanks in anticipation

    user566773,
    As far as I know, all Oracle JDBC drivers are meant to be backward compatible.
    According to the table on the following Web page, the latest Oracle JDBC driver can be used with Oracle 9.2.0.x DBMS.
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/index.html
    Good Luck,
    Avi.

  • Bug in Oracle JDBC thin driver 8.1.6 ?

    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

    Horea
    In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
    to "Never".
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute>Never</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    Deepak
    Horea Raducan wrote:
    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

Maybe you are looking for

  • MR11 vs PO

    Hi I have a PO with IR document. I did not created the GR. This is not appearing in MR11. Will this type of POs without GR and only with IR will appear in MR11 or not. Regards ARAS

  • How to go about Setting PATH and CLASSPATH?

    I have problems compling the helloworldwww in the core programming.the error was: Exception in thread "main"java.lang.NoSuchMethodError:main my java programs are in c:\program files\java\bin My path : PATH=C:\WINNT\system32;C:\WINNT;c:\program files\

  • RMAN on Oracle 8i and 10g Retention Policy

    I have several Oracle 8i and Oracle 10g database instances on a Windows 2003 server. We use RMAN backups on these servers. We run a batch job daily to database backups. We create RMAN level 0 on Sunday, Thursday level 1, Tuesday, Thursday, Friday, an

  • PM Notifications - All Task Tab - Complete Function

    On PM Notifications, All Task Tab, a user completes a task with the checkered flag icon.  Is it possible to reverse the completion of the task on the All Task Tab of a PM Notification?  If not, is it possible to edit a completed task?

  • SSD boot disk dilemma! now where to install the c-suite?!

    Hi, Just did some end of the line upgrades to an old AM2 PC. Most notably updated the RAM and got an SSD drive as my boot disk. My question then, is should I install the entire 10gb or so creative suite on my boot disk, or one of my other terabyte re