JDBC Thin driver doesn't support writing data into remote database via database link

Dear Oracle Guru:
Please confirm: Oracle JDBC thin driver does not support writing data to remote database via database link.
The following errors occur when trying to write data into a remote database via database link through jdbc thin driver:
ORA-03106: fatal two-task communication protocol error
ORA-02063: preceding line from FDBE.PAPDSRAS1
ORA-02063: preceding 2 lines from PA
SQL statement is a prepared statement using a SQL like: insert into mytable@pa (col1,col2) values (?,?).
Thanks.
null

Thanks, Dan.
I still think it is a driver problem, because I can do similar things in a stored procedure or in PL/SQL Developer to copy records from a local database table to a remote database table via database link (insert into mytable@pa select * from mytable). The value for distributed_transactions of our database is 10.

Similar Messages

  • JDBC/RMI driver does not support BLOB data type

    WLS 5.1 JDBC/RMI driver does not support BLOB data type. It is said in the Weblogic e-doc.
    I am using DataSource for database connections, meaning JDBC/RMI driver is actually producing
    database connections. I need several columns of BLOB types in my Oracle tables.
    Should I use the "JTS" driver instead in order to have the BLOB types supported ?
    Thanks for help.
    [att1.html]

    The error java.rmi.UnmarshalException seems to indicate you are somehow accessing the data-source over RMI, this seems odd. Are you running TopLink on a client and trying to connect to a WebLogic DataSource on the server?
    Maybe try connecting directly to the DataSource without going through TopLink and see if you encounter the same issue.
    You could also look at the TopLink WebLogic Examples and see how their configuration is different than your own.

  • JDBC Thin Driver Support for Data Encryption and Integrity

    Hello JDev Team,
    I am trying to implement JDBC Thin Driver Support for Data Encryption and Integrity.
    It works fine with java.sql.Connection and java.util.Properties like in the following code:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Properties props = new Properties();
    int level = AnoServices.REQUIRED;
    props.put("oracle.net.encryption_client", Service.getLevelString(level));
    props.put("oracle.net.encryption_types_client", "( RC4_40 )");
    props.put("oracle.net.crypto_checksum_client",Service.getLevelString(level));
    props.put("oracle.net.crypto_checksum_types_client", "( MD5 )");
    Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:main", props);
    etc...
    But I am developing an application with InfoSwing components and it has a different way to connect to Oracle database using oracle.dacf.dataset.connections.Connection, like this:
    sessionInfo1.setAppModuleInfo(new ModuleInfo("bc", "BcModule"));
    sessionInfo1.setConnectionInfo(new LocalConnection("JDBCThin"));
    sessionInfo1.publishSession();
    My question is:
    Is there any way to implement DataEncryption and Integrity into this type of connection?
    Thanks a lot in advance.
    Victor Bykov
    null

    Victor,
    No, you can't do this from DAC, but I've been discussing it with the developer, and we both think this capability would be useful to have, so I've logged it as an enhancement request.
    I do have a question for you. Once you've made the JDBC connection, do you need access to the Connection object afterwards? We're thinking of how the change could be implemented, and one way would be to allow you to pass in a Properties object when creating your own NamedConnection.
    Thanks
    Blaise

  • Does oracle 8.1.6.0 jdbc thin driver support jdk1.3 and oracle 8.0.5 database ?

    I have downloaded oracle 8.1.6.0 jdbc thin driver(named classes12.zip) to run with jdk1.3 to access oracle 8.0.5, but when I compile and run the jdbccheckup.java downloaded from oracle website like this:
    javac -classpath d:\jdbc\classes12.zip jdbccheckup.java
    (compile succeed)
    java -classpath d:\jdbc\classes12.zip jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

    Try this isntead.
    java -classpath d:\jdbc\classes12.zip;. jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

  • 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

  • Oracle JDBC thin driver question

    Does anyone know if there is a JDBC thin driver available for Oracle that supports "HTTP tunneling" of the SQLNET wire protocol?
    Such a driver would package the SQL*NET data stream into HTTP or HTTPS packets and connects to a Servlet proxy on the Web host that unpacks the data and forwards the SQL*NET stream to the Oracle RDBMS and returns the response the same way.
    This would help me overcome some firewall issues I'm seeing since HTTP/HTTPS ports are usually opened through a firewall. I know Sybase has a JDBC dirver that does this for their TNS protocol and was hoping some company has developed this for Oracle.
    Thanks in advance...

    The easiest thing to do is download it as an archive with your applet.
    Otherwise, you have to have the files on every client machine.
    For netscape, put the classes111.jar in the java classes folder typically:
    c:\ProgramFiles\Netscape\Communicator\Program\java\classes.
    I'd expect that IE would be setup in a similar way.

  • About jdbc-thin driver

    I download oracle jdbc-thin driver to access oracle database
    server,but it doesn't support unicode,why and how to resolve it?
    thanks!!
    null

    Actually, the usage of the client-side and of the server-side thin driver is the same: the URL in both cases is specified in the same way.
    The only difference is that you do not need to register the server-side Oracle JDBC driver with the Driver manager (though it will be a no-op if you do it).
    When you want to run code in the server that executes in a particular session, you will use the server-side (or kprb) driver that gives you the connection associated with your session.
    You have to use the server-side thin driver to establish a connection to a different database - something that is not the connection associated with your database
    session.
    Server-side thin driver connections can be used with JDBC as well as with SQLJ code.
    null

  • Weblogic Pool Driver doesn't support XA driver

              I am trying to set up a JDBC Strore for a JMS Server. The JDBC Store uses the Oracle
              XA driver (oracle.jdbc.xa.client.OracleXADataSource). However whaen the JMS server
              starts it gives me the following exception: Weblogic Pool Driver doesn't support
              XA driver. Any idea what I am doing wrong? I am using WL 8.1 SP2. THe full error
              trace is shown below:
              <Jan 15, 2004 3:05:09 PM EST> <Alert> <JMS> <BEA-040052> <JMSServer "jmsTestJmsServer1"
              store failed to open java.io.IOException: JMS JDBC store, connection pool = <jmsTestJdbcConnectionPool>,
              prefix = <JMS1>: cannot determine DBMS type
              <java.sql.SQLException: Pool connect failed : java.lang.Exception: Weblogic Pool
              Driver doesn't support XA driver, Please change your config to use a Non-XA driver
              <     at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:160)
              <     at weblogic.jdbc.pool.Driver.connect(Driver.java:156)
              <     at weblogic.jms.store.JDBCIOStream.checkDbmsType(JDBCIOStream.java:1490)
              <     at weblogic.jms.store.JDBCIOStream.open(JDBCIOStream.java:420)
              <     at weblogic.jms.store.JMSStore.open(JMSStore.java:224)
              <     at weblogic.jms.backend.BEStore.open(BEStore.java:262)
              <     at weblogic.jms.backend.BEStore.start(BEStore.java:151)
              <     at weblogic.jms.backend.BackEnd.openStores(BackEnd.java:1171)
              <     at weblogic.jms.backend.BackEnd.resume(BackEnd.java:1290)
              <     at weblogic.jms.JMSService.addJMSServer(JMSService.java:2241)
              <     at weblogic.jms.JMSService.addDeployment(JMSService.java:2012)
              <     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:330)
              <     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:590)
              <     at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:568)
              <     at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:240)
              <     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              <     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              <     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              <     at java.lang.reflect.Method.invoke(Method.java:324)
              <     at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:711)
              <     at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:690)
              <     at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:476)
              <     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
              <     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
              <     at weblogic.management.internal.RemoteMBeanServerImpl.private_invoke(RemoteMBeanServerImpl.java:947)
              <     at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:908)
              <     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:946)
              <     at weblogic.management.internal.MBeanProxy.invokeForCachingStub(MBeanProxy.java:481)
              <     at weblogic.management.configuration.ServerMBean_Stub.updateDeployments(ServerMBean_Stub.java:7271)
              <     at weblogic.management.deploy.slave.SlaveDeployer.updateServerDeployments(SlaveDeployer.java:1210)
              <     at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:362)
              <     at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
              <     at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
              <     at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
              <     at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
              <     at weblogic.Server.main(Server.java:32)
              

              It appears that WebLogic 8.1 does not have the "user transactions enabled" flag
              for a connection factory. I see references to this flag in earlier versions of
              WebLogic. The closest thing in WL 8.1 seems to be the "XA Connection Factory Enabled"
              flag.
              Tom Barnes <[email protected]> wrote:
              >Actually, all you normally need to check is "user transactions enabled".
              >The XA versions of the javax.jms interfaces (which are generated
              >via XA connection factories) are not required - except
              >that I think that MDBs make a check for this.
              >
              >Naresh Bhatia wrote:
              >> So I assume that the XA capability is enabled by checking the "XA Connection
              >Factory
              >> Enabled" checkbox for the JMS connection factory.
              >>
              >> Thanks.
              >> Naresh
              >>
              >> Tom Barnes <[email protected]> wrote:
              >>
              >>>Just use a non-XA driver and non-XA pool for JMS JDBC stores.
              >>>WL JMS' XA capability does not come from its JDBC driver.
              >>>
              >>>Naresh Bhatia wrote:
              >>>
              >>>
              >>>>I am trying to set up a JDBC Strore for a JMS Server. The JDBC Store
              >>>
              >>>uses the Oracle
              >>>
              >>>>XA driver (oracle.jdbc.xa.client.OracleXADataSource). However whaen
              >>>
              >>>the JMS server
              >>>
              >>>>starts it gives me the following exception: Weblogic Pool Driver doesn't
              >>>
              >>>support
              >>>
              >>>>XA driver. Any idea what I am doing wrong? I am using WL 8.1 SP2.
              >THe
              >>>
              >>>full error
              >>>
              >>>>trace is shown below:
              >>>>
              >>>><Jan 15, 2004 3:05:09 PM EST> <Alert> <JMS> <BEA-040052> <JMSServer
              >>>
              >>>"jmsTestJmsServer1"
              >>>
              >>>>store failed to open java.io.IOException: JMS JDBC store, connection
              >>>
              >>>pool = <jmsTestJdbcConnectionPool>,
              >>>
              >>>>prefix = <JMS1>: cannot determine DBMS type
              >>>><java.sql.SQLException: Pool connect failed : java.lang.Exception:
              >>>
              >>>Weblogic Pool
              >>>
              >>>>Driver doesn't support XA driver, Please change your config to use
              >>>
              >>>a Non-XA driver
              >>>
              >>>><     at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:160)
              >>>><     at weblogic.jdbc.pool.Driver.connect(Driver.java:156)
              >>>><     at weblogic.jms.store.JDBCIOStream.checkDbmsType(JDBCIOStream.java:1490)
              >>>><     at weblogic.jms.store.JDBCIOStream.open(JDBCIOStream.java:420)
              >>>><     at weblogic.jms.store.JMSStore.open(JMSStore.java:224)
              >>>><     at weblogic.jms.backend.BEStore.open(BEStore.java:262)
              >>>><     at weblogic.jms.backend.BEStore.start(BEStore.java:151)
              >>>><     at weblogic.jms.backend.BackEnd.openStores(BackEnd.java:1171)
              >>>><     at weblogic.jms.backend.BackEnd.resume(BackEnd.java:1290)
              >>>><     at weblogic.jms.JMSService.addJMSServer(JMSService.java:2241)
              >>>><     at weblogic.jms.JMSService.addDeployment(JMSService.java:2012)
              >>>><     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:330)
              >>>><     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:590)
              >>>><     at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:568)
              >>>><     at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:240)
              >>>><     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              >>>><     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              >>>><     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              >>>><     at java.lang.reflect.Method.invoke(Method.java:324)
              >>>><     at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:711)
              >>>><     at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:690)
              >>>><     at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:476)
              >>>><     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
              >>>><     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
              >>>><     at weblogic.management.internal.RemoteMBeanServerImpl.private_invoke(RemoteMBeanServerImpl.java:947)
              >>>><     at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:908)
              >>>><     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:946)
              >>>><     at weblogic.management.internal.MBeanProxy.invokeForCachingStub(MBeanProxy.java:481)
              >>>><     at weblogic.management.configuration.ServerMBean_Stub.updateDeployments(ServerMBean_Stub.java:7271)
              >>>><     at weblogic.management.deploy.slave.SlaveDeployer.updateServerDeployments(SlaveDeployer.java:1210)
              >>>><     at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:362)
              >>>><     at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
              >>>><     at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
              >>>><     at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
              >>>><     at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
              >>>><     at weblogic.Server.main(Server.java:32)
              >>>>
              >>>
              >>
              >
              

  • JDBC Thin Driver 8.17 Release 2

    Is the Oracle Direct Driver (JDBC Thin Driver 8.17 Release 2) compatible with other oracle versions like 8.15 and 8.16? Is it backward compatible to older releases. I have tried it and it does work, but I want to make sure there are no known problems going backwards because we have several versions in our shop.
    Thanks
    Brian

    Rong Lu (guest) wrote:
    : I am using Oracle JDBC thin driver 8.0.5.0.0 to query Oracle
    : 8.0.5 via SQL net. The problem I met is every time I try to
    : retrieve data for varchar2 (over 2k), it get truncated and
    only
    : return the first 2k without throwing any warning or exception.
    : I tried getString(), getAsciiStream() and getBinaryStream(),
    and
    : the results are still the same. The SQL Net works fine, since
    it
    : successfully returns over 2k varchar2 type data when programing
    : with PERL.
    check the following oracle jdbc faq link :
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
    #_36_
    null

  • JDBC thin Driver 8.0.X Limit 2k for varchar2?

    I am using Oracle JDBC thin driver 8.0.5.0.0 to query Oracle
    8.0.5 via SQL net. The problem I met is every time I try to
    retrieve data for varchar2 (over 2k), it get truncated and only
    return the first 2k without throwing any warning or exception.
    I tried getString(), getAsciiStream() and getBinaryStream(), and
    the results are still the same. The SQL Net works fine, since it
    successfully returns over 2k varchar2 type data when programing
    with PERL.
    null

    Rong Lu (guest) wrote:
    : I am using Oracle JDBC thin driver 8.0.5.0.0 to query Oracle
    : 8.0.5 via SQL net. The problem I met is every time I try to
    : retrieve data for varchar2 (over 2k), it get truncated and
    only
    : return the first 2k without throwing any warning or exception.
    : I tried getString(), getAsciiStream() and getBinaryStream(),
    and
    : the results are still the same. The SQL Net works fine, since
    it
    : successfully returns over 2k varchar2 type data when programing
    : with PERL.
    check the following oracle jdbc faq link :
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
    #_36_
    null

  • Jdbc thin driver to connect oracle as internal

    I need to connect to Oracle as Internal using jdbc driver, is there a way we can do this using jdbc thin driver. Actually I don't want to pass username and password as it will be harcoded in a properties file.
    Please let me know.

    Hi Minol,
    Have a look at this code example that shows how to Connect to Database as internal ( as sysdba ). In this code sample the properties are hard-coded, you can supply these Properties by loading them from a properties file.
    Connecting to Oracle Database with DBA privileges
    http://myjdbc.tripod.com/basic/codeindex.html
    The code snippet to load properties from a properties file
    //Import IO related classes
    import java.io.IOException;
    // Necessary support classes
    import java.util.Properties;
    import java.util.Enumeration;
    import java.util.ResourceBundle;
       * This method reads a properties file which is passed as
       * the parameter to it and load it into a java Properties
       * object and returns it.
       * @param file File path
       * @return Properties The properties object
       * @exception IOException if loading properties file fails
       * @since 1.0
      public static Properties loadParams(String file)
          throws IOException {
        // Loads a ResourceBundle and creates Properties from it
        Properties     prop   = new Properties();
        ResourceBundle bundle = ResourceBundle.getBundle(file);
        // Retrieve the keys and populate the properties object
        Enumeration enum = bundle.getKeys();
        String      key  = null;
        while (enum.hasMoreElements()) {
          key = (String) enum.nextElement();
          prop.put(key, bundle.getObject(key));
        return prop;
      }Regards
    Elango.

  • Jdbc thin driver connect oracle as internal

    I need to connect to Oracle as Internal using jdbc driver, is there a way we can do this using jdbc thin driver. Actually I don't want to pass username and password as it will be harcoded in a properties file.
    Please let me know.

    Hi Minol,
    Have a look at this code example that shows how to Connect to Database as internal ( as sysdba ). In this code sample the properties are hard-coded, you can supply these Properties by loading them from a properties file.
    Connecting to Oracle Database with DBA privileges
    http://myjdbc.tripod.com/basic/codeindex.html
    The code snippet to load properties from a properties file
    //Import IO related classes
    import java.io.IOException;
    // Necessary support classes
    import java.util.Properties;
    import java.util.Enumeration;
    import java.util.ResourceBundle;
       * This method reads a properties file which is passed as
       * the parameter to it and load it into a java Properties
       * object and returns it.
       * @param file File path
       * @return Properties The properties object
       * @exception IOException if loading properties file fails
       * @since 1.0
      public static Properties loadParams(String file)
          throws IOException {
        // Loads a ResourceBundle and creates Properties from it
        Properties     prop   = new Properties();
        ResourceBundle bundle = ResourceBundle.getBundle(file);
        // Retrieve the keys and populate the properties object
        Enumeration enum = bundle.getKeys();
        String      key  = null;
        while (enum.hasMoreElements()) {
          key = (String) enum.nextElement();
          prop.put(key, bundle.getObject(key));
        return prop;
      }Regards
    Elango.

  • JDBC Thin-Driver and Oracle Stored Procedure

    I've got a Oracle stored procedure which returns a Oracle record.
    How can I retrieve the record in java using the JDBC Thin-Driver ?
    Record:
    TYPE messagerec IS RECORD
    (log_level VARCHAR(2), timestamp VARCHAR2(19), text VARCHAR2(200));

    Using PL/SQL BOOLEAN, RECORD Types, and TABLE Types:
    Oracle SQLJ and JDBC do not support calling arguments or return values of the
    PL/SQL BOOLEAN type or RECORD types. Also, when using the Thin driver, they
    do not support calling arguments or return values of PL/SQL TABLE types (known
    as indexed-by tables). TABLE types are supported for the OCI driver.
    Check the following guide,
    http://otn.oracle.com/tech/java/sqlj_jdbc/pdf/a96655.pdf

  • 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.

  • Is JDBC  thin driver 10.1.0.3 compatible with ORACLE-10.2.0.2.0 ?

    Hi Everyone,
    Please let me know whether the JDBC thin driver 10.1.0.3 Driver compatible with the oracle server 10G version 10.2.0.2.0? We are facing some issues with the compatibility.
    The Errors we are getting is : StaleConnectionException while we are using the driver from the Websphere.
    Please let us know..Very Urgent.
    Thanks in Advance,
    Samuel.
    Message was edited by:
    user637857

    Hi Legatti,
    Thanks for taking time out and replying me.
    We dont know the reason why that error is being caused. Because the error is caused on the production we are not able to make any trail and errors. If we are sure that the driver compatibility is causing the error then we can go ahead and download the latest driver. If the latest driver will solve the problem we have to convince the client that the error is caused due to the incompatible driver. So if you have any documents/information supporting that please help.
    Thanks
    Samuel.

Maybe you are looking for

  • Can I move photos from one roll to another?

    I know I can drag and drop photos from folders and albums into other folders and albums. But I wasn't able to do this when looking at the "roll view". Is it possible to move a photo from one roll to another? Thanks!

  • Unknown Error: PDF_TEST_00   not returned Responds

    Hi Gurus, I am trying to execute some AIF using the T Code: FMBB, but just before calling the form itself, my testing program got stuck and does not longer respond.  No messages, no outputs, nothing after that. Have been to all of the step in this li

  • How to install video Integration component

    Dear Experts Link how to install video Integration component https://websmp106.sap-ag.de/~sapidb/011000358700000739542010E/index.htm Regards Carlos Farías

  • A suggestion to Oracle Forms development group

    Hello Oracle.. U guys want to start a new thread on this issue.. I think the problem is not only of a separate 6i runtime..(of course this is a big issue to all of us who ask our customers to buy softwares for those applications which up to now are r

  • XI Error ERROR_OBJECT.INTERNAL: Queue stopped

    Hi All, In our Integration system there are lot of ques stopped in SMQ2. When we checked the status is SYSFAIL and we are getting message as "XI Error ERROR_OBJECT.INTERNAL: Queue stopped" Not sure how to solve this problem and what are the things th