Oracle 8i + JDBC 3.0?

Is there any JDBC 3.0 driver that works with Oracle 8i? More precisely, I'm looking to connect to 8i and be able to use named parameters in my CallableStatement's instead of indexed parameters.
Thanks,
Jeff

Jeff,
Unfortunately, I don't think any version of the JDBC driver (with any version of the Oracle database) supports named parameters in "CallableStatement"s. Have you looked at the JDBC samples on OTN?
Good Luck,
Avi.

Similar Messages

  • Error while creating a report that uses Oracle OCI JDBC connectivity

    Please let me know why my CR and LF characters are removed from my forum posting *****
    Hi,
    I was trying to create a report that uses Oracle OCI JDBC connectivity. I am using Eclipse3.4 download from "cr4e-all-in-one-win_2.0.2.zip".  I have successfully created a JDBC OCI connection.
    The connection parameters are given below:
    URL: jdbc:oracle:oci8:@xe
    Database: xe
    username: <userName>
    password: <password>
    I have tested the above connection in Data source Explorer and it works fine!!!
    But I am getting the following error when I drag-and-drop a table from the list of tables. Not sure what I am missing here?  Any help is highly appreciated.
    com.businessobjects.reports.jdbinterface.common.DBException: InvalidURLOrClassName
         at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
         at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
         at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1771)
         at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:491)
         at com.crystaldecisions.reports.queryengine.Connection.t1(SourceFile:2979)
         at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2408)
         at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)
         at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
         at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
         at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
         at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:657)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:525)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:523)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$3.doWork(ExecutorWithIdleProcessing.java:182)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityTask.run(PriorityTask.java:75)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.runSubtask(PriorityCompoundCancellableRunnable.java:187)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityProgressAwareRunnable.runSubtask(PriorityProgressAwareRunnable.java:90)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.doWork(PriorityCompoundCancellableRunnable.java:144)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$IdleTask.run(ExecutorWithIdleProcessing.java:320)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Thanks
    Karthik
    Edited by: KARTHIK1 on Oct 14, 2009 9:38 PM

    Hi Ted,
    Thanks for the feedback. I was able to create a report in Creystal Reports Designer 2008 using OCI.  It is not allowing only in the Eclipse plugin. In our environment we are not allowed to user Oracle thin connections and ONLY OCI is allowed.
    1) Can you please let me know if there is a way to do this? 
    2) Will it allow data sources using native database driver?
    3) If so, can I use JRC to create these reports from a desktop java program?
    Thanks & Regards
    Karthik
    Edited by: KARTHIK1 on Oct 15, 2009 4:38 PM

  • Oracle 8i jdbc/Tomcat connection issues

    Tomcat 4.1.8
    Oracle 8i JDBC Driver
    I have been able to create the DataSource as a global resource and as a local resource inside the context of the application.
    The code hangs when it attempts to create a connection. I have been able to connect to the database and perform the necessary query in a standalone application to ensure that I actually can connect.
    JSP Code:
    <html>
    <head>
    <title>VTW App</title>
    </head>
    <body>
    <%
    vtw.VTWApp tst = new vtw.VTWApp();
    tst.init();
    %>
    <h2>Results</h2>
    <%= tst.getList() %>
    </body>
    </html>
    Java Code (Class called by JSP):
    package vtw;
    import javax.naming.*;
    import javax.sql.*;
    import java.sql.*;
    public class VTWApp {
    String list = "EMPTY";
    public void init() {
    try{
    Context ctx = new InitialContext();
    if(ctx == null )
    throw new Exception("Boom - No Context");
    System.out.println("Context Created ...");
    DataSource ds =
    (DataSource)ctx.lookup(
    "java:comp/env/jdbc/oracleDB");
    if (ds != null) {
              System.out.println("DataSource Created ...");
    Connection conn = ds.getConnection();
    System.out.println("Connection Pulled");
    if(conn != null) {
                   System.out.println("Connection Good");
                   Statement st = conn.createStatement();
                   String query = "";
                   query += "select grpid, to_char(min(dtlastendtime),'mm-dd-yyyy hh24:mi:ss') ";
                   query += "from calc_table where equipmentsernum in (";
                   query += "'888000','888001'";
                   query += ") group by grpid";
                   ResultSet rs = st.executeQuery(query);
                   if(rs != null) {
                        list = "";
                        while(rs.next()) {
                             list += (rs.getString(1) + "," + rs.getString(2));
                   rs.close();
                   conn.close();
                   System.out.println("Connection Closed");
              } else {
                   System.out.println("Connection Not Established");
    }catch(Exception e) {
    e.printStackTrace();
    public String getList() { return list; }
    }

    I figured out the issue ...
    In the server.xml file the resource & resource params needed to be modified..
    1. Set type to oracle.jdbc.pool.OracleDataSource
    2. Set factory to oracle.jdbc.pool.OracleDataSourceFactory
    3. In the Java code cast the context lookup to an OracleDataSource instead of a java.sql.DataSource
    Oracles DataSource does not subclass the jdbc DataSource for its OracleDataSource class everything works fine now.
    <Resource name="jdbc/mydb" scope="Shareable" type="oracle.jdbc.pool.OracleDataSource"/>
    <ResourceParams name="jdbc/mydb">
    <parameter>
    <name>validationQuery</name>
    <value></value>
    </parameter>
                   <parameter>
                        <name>factory</name>
                        <value>oracle.jdbc.pool.OracleDataSourceFactory</value>
                   </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
         <name>url</name>
         <value>jdbc:oracle:thin:@server.company.com:1521:dbname</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>guest</value>
    </parameter>
                   <parameter>
                        <name>maxWait</name>
                        <value>10000</value>
                   </parameter>
                   <parameter>
                        <name>maxActive</name>
                        <value>100</value>
                   </parameter>
    <parameter>
    <name>user</name>
    <value>guest</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>2</value>
    </parameter>
    </ResourceParams>

  • How to store .doc file in oracle using jdbc

    Here is problem , storing microsoft excel file (or) .txt file to database(ORACLE) through JDBC .
    how to retrive

    Congratulations! You are the one millionth person to ask how to store files in databases without searching for previous threads.
    What do you win?
    A hearty smack in the forehead and a strenuous endorsement to use Google, search and find the answer.

  • Oracle keeping JDBC connections ...

    All
    has anyone come got any ideas on this:
    WLS6.0 sp2 on Win2k
    Oracle v8
    JDBC connection pool configured with 10 min connections / 50 max conns (in
    increments of 5). Shrinking is active, and is set to run every 15mins.
    What were seeing is that Oracle doesnt let go of any of the JDBC
    connections. It literally keeps them for days on end, until we have to
    manually kill them because theyre causing other DB problems.
    any ideas ?
    tks
    will

    Hello, I am using ALUI G6 (former Plumtree) and I am experiencing the same problem.
    JDBC connections are not released and we reach the connection max number easily.
    Please, can somebody help us ?
    Thanks for your help,
    Kind regards

  • Couldnot connect JBuilder 6 to ORACLE 8i , JDBC driver problem

    Hi guys
    I am trying to connect to the oracle 8i database from jbuilder 6 using a simple select statement , but it gives the following error
    Root cause:
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
         at _0002ftestEmployee_0002ejsptestEmployee_jsp_1._jspService(_0002ftestEmployee_0002ejsptestEmployee_jsp_1.java:83)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:484)
    plse help me how to connect jbuilder to oracle to access the data. I followed jbuilder doc like from the menu (Tools �� enterprise setup �� database driver ��)
    but could not select the driver since it is marked as red (uninstalled). How can I made jdbc driver to available to jbuilder.?. I am using oracle 8i. Will oracle 8i supports jdk 1.3 b��cos I have noticed the jbuilder supports from jdk 1.3 onwards. So plse correct me if I am wrong
    waiting for reply
    sumesh

    thanks for u'r reply.
    you mean to say i need to install the new JDBC driver (Classes12.zip and nls_charset12) to the oracle/ora8i/jdbc/lib folder.currently this folder contains only classes102 and classes11.zip files and the corresponding charset only.After instaling the new classes12.zip file do i need to set the classpath?.

  • Connecting to Oracle using JDBC

    Hi all,
    I am a new to Oracle. I am trying to connect to Oracle using JDBC
    The URL with which I tried to connect was:
    jdbc:oracle:oci8:@myServiceName,user='myLogin',password='myPassword'
    I get an error (ORA-12154)
    - TNS could not resolve service name
    When I use the same userid, password and service and connect thru' SQL*Plus it goes thru'. Is there any parameter which I am missing. Can anyone throw some light on this. I am held up with this issue badly.
    Thanks for all your help and time.
    Regards,
    Latha

    Hi Latha,
    Please try to use thin and add port number.
    m_conn = DriverManager.getConnection("jdbc:oracle:thin:@" + hostURL + ":" + port + ":" + database, user, password);
    Hong
    null

  • Getting started with oracle and jdbc

    i have downloaded ojdbc14.zip from oracle.com
    it's documentation only tells you about the api and the packages and nothing about how to configure it.
    how do i get started? where do i unzip those files and what to do next?
    please help

    "The Old oracle.jdbc.driver Package Will Go Away Soon
    If you still have existing applications that use the
    old oracle.jdbc.driver
    package, now is the time to convert your code."
    And who is so foolish as to use concrete types
    instead of java.sql and javax.sql interfaces or embed
    driver class names in their code? Well, anybody who's more interested in optimal performance than being generic, and willing to put up with the headaches of that, such as providers of high-performance OR mapping tools or someone tuning a very heavily used bit. Or anybody working in a committed Oracle-only shop. It's not a one-size-fits-all world...
    Again, Oracle is evolving the standard. No, the standard is Sun's java.sql interface.Yea, Sun evolved Java, and Oracle is recommending the use of Datasources to keep step with that evolution...
    This still
    works, but Oracle is shifting away from <sid> and
    using <service name> instead. The alternate syntax
    for the URL is:
    String url=jdbc:oracle:thin:@<host>:<port>/<database>
    This has been true for as long as Oracle has had a
    thin, type IV JDBC driver. The URL syntax hasn't
    changed.
    Yes it has and Oracle says it has, here:
    http://download-west.oracle.com/docs/cd/B14117_01/java.101/b10979/urls.htm#BEIJFHHB
    Wherein it is written, in Section 3.2.1 of the Oracle� Database JDBC Developer's Guide and Reference, the sesction on the several supported URL formats for Oracle 10.1
    Notes:
    * Oracle Service IDs are no longer supported at 10g Release 1 (10.1).
    They go on to list three URL styles supported:
    Oracle Net connection descriptor - like an entry in tnsnames.ora (ick!)
    Thin-style service name - the most common, what was quoted above.
    LDAP syntax - for having an LDAP service resolve the database for you
    However, in the old 8.1.7 JDBC documentation, here:
    http://download-east.oracle.com/docs/cd/A87860_01/doc/java.817/a83724/basic1.htm#1006213
    Oracle lists support for:
    Net8 connection descriptor - Net8 is the old name for Oracle Net
    Thin-style sid name - what was quoted in the post to which I first responded.
    Thin-style sid name syntax has a colon between the port and the sid; thin-style service name syntax has a forward slash between the port and the service name. SIDs and service names are not the same thing, although they serve the same purpose in a URL (connecting you to the right instance) and often have the same value. However, a SID for a database is set at DB creation time, is unique to the DB, and cannot be changed easily. Multiple service names can be configured for a database, and they can easily be changed (if you're the DBA). Oracle is providing an additional leval of abstraction by moving to service names, to support additional features and choices. While many installations don't need all that and have in essence ignored the distinction bewteen SID and service name, some multi-database projects can benefit from it.
    >
    StuDerby, I think you should look into this a bit
    more. Your advice is far from optimal, IMO.
    Yeah, I could've taken the time to write a more generic, newbie friendly repsonse; instead, I lifted directly from the Oracle documentation that was cited earlier since newbies seem to have an aversion to reading documentation.

  • How to use the Oracle 10g JDBC OCI driver in JBoss ?

    Greetings,
    I deployed ojdbc14.jar in JBoss and I created an Oracle datasource. I have the following questions:
    1. In the datasource descriptor file I have:
    <connection-url>jdbc:oracle:oci:@(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=xe)))</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    Is it enough in order to use the Oracle 10g JDBC OCI driver ?
    2. After having looked-up the datasource and created a connection, the classe of these objects are org.jboss.resource.adapter.jdbc.WrapperDataSource and, respectivelly, org.jboss.resource.adapter.jdbc.WrappedConnection. How can I have access to oracle.jdbc.oci and oracle.jdbc.pool packages ?
    Many thanks in advance,
    Nicolas

    Hello
    We were banging our heads on a similar thing, maybe this will help
    We needed to convert the wrapped connection to an OracleConnection so that we could do a proxy switch, but maybe you could apply it to your situation anyway
    1-you have to convert the Connection object to an OracleConnection in order to use the method that does the proxy switch
    The method to do this is getInnermostDelegate()
    Once you call this method, you get a new Connection object that can be cast to an OracleConnection object
    See below for the snippet of code
    // now switch the user and reselect
    if (conn instanceof DelegatingConnection) {
    properties.put("PROXY_USER_NAME","peter/peter");
    oraConn =((DelegatingConnection)conn).getInnermostDelegate();
    if (oraConn == null)
    out.println("oraConn is null\n");
    ((OracleConnection)oraConn).openProxySession(OracleConnection.PROXYTYPE_USER_NAME,properties);
    2-you have to put a setting in the xml file in conf/Catalina/localhost that allows you to call the getInnermostDelegate() method
    By default, Tomcat does not allow you to call this method, it will always return null
    You have to change the xml to allow it to return an object
    It seems that WebSphere and Tomcat both frown on vendor-specific methods that do not comply with the JDBC standards, but do allow it
    Here is the setting:
    <parameter>
    <!-- NOTE: This is necessary to enable access to the Oracle connection object -->
    <name>accessToUnderlyingConnectionAllowed</name>
    <value>true</value>
    </parameter>
    Note, this setting was also put in the conf/server.xml file
    Thanks
    Peter

  • Oracle 7 JDBC driver

    Hi,
    I want to connect to an Oracle 7 database over JDBC. When I go to the download page, it only gives me Oracle 8 and higher download options, even though the documentation index lists an Oracle7 driver.
    Does anyone know where I can get it from?
    Regards,
    Kelsey Grant

    Jin Yu (guest) wrote:
    : Is there a column limitation in Oracle 7 JDBC drivers ? We are
    : not able to retrieve more than 11 columns in a SELECT
    statement.
    : Could someone get back to us on this ?
    : Thanking you in advance
    : Jin Yu
    Hi!
    I tried to use the JDBC driver to connect to Oracle 7. But had
    some trouble with it.
    Could you give me some hints on how to load the driver, set up
    the url for database, etc?
    By the way, we use JBuilder.
    Thanks.
    null

  • Connecting Oracle by JDBC in Linux

    I'm using oracle8.1.7, redhat 7.2,Apache as webserver and tomcat
    as containers, all these work very well. but I have a problem
    connecting oracle with JDBC.
    I've installed the JDBC driver by setting the classpath
    in .bash_profile of oracle, but when I run the a jsp which try
    to connect the database, it return the exception error which
    tell me the suitable driver is not found! Can anyone tell me why?
    By the way, I'm using JDK1.3 and the JDBC driver is
    classes12.zip. Please help me out.

    Double Post
    http://forum.java.sun.com/thread.jspa?threadID=673989

  • Oracle CEP JDBC Data Cartridge

    Hello,
    I'm trying to implement Oracle CEP JDBC Data Cartridge
    according to :
    http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12048/datacartjdbc.htm#CIHCEFBH
    The problem is that it fails on deployment with following error :
    <Exception thrown from prepare method com.oracle.cep.cartridge.jdbc.JdbcCartridgeContext.checkCartridgeContextConfig.
    java.lang.AssertionError: java.lang.ClassNotFoundException: weblogic.jdbc.wrapper.PoolConnection
    I've added file that contains this class to classpath (com.bea.core.datasource6_1.10.0.0.jar) ,
    but get the same error .
    Any help would be appreciated .
    Regards,
    Dmitry

    Hello Wei Xiong,
    I have the same error when I trying to configure Oracle CQL Processor Table Source according to :
    http://docs.oracle.com/cd/E23943_01/dev.1111/e14301/processorcql.htm#CIHCCADG
    I've configured table source and had the same error on deployment :
    <The application context "check_entrance" could not be started: org.springframework.beans.FatalBeanException: Error in context lifecycle initialization; nested exception is com.bea.wlevs.ede.api.StatementException: Could not start rule [DBEventQuery] due to error: java.lang.ClassNotFoundException: weblogic.jdbc.wrapper.PoolConnection
    org.springframework.beans.FatalBeanException: Error in context lifecycle initialization; nested exception is com.bea.wlevs.ede.api.StatementException: Could not start rule [DBEventQuery] due to error: java.lang.ClassNotFoundException: weblogic.jdbc.wrapper.PoolConnection
         at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(ApplicationContextLifecycle.java:145)
    It's look like a same issue.
    I've added zip file of my Eclipse project and config.xml of my CEP domain to e-mail.
    Thank you !
    Regards,
    Dmitry

  • Creating user in oracle through JDBC

    I m trying to create a user in oracle through jdbc. When I m creating user through SQL plus I m able to do it successfully but when I m doing it through java code I can see that user�s entry in dba_users & dba_role_privs tables.But when I am trying to drop that user I get message �User doesn�t exist�. Also when I am trying to logged in through the newly created user (one that I have created through code)in SQL Plus , I get error �ORA-01017: invalid username/password ; logon denied�.If user doesn�t exist then how can I see it�s entry in dba_users & dba_role_privs?? One more thing �. I can drop that user through code but not using SQL Plus.
    This is the code�.In this code I have logged in using system-manager & I m trying to create user test88 with password test88.I am granting 3 roles to this user Connect , Resource & DBA same as Scott �Tiger. Please help.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class OracleDB1 {
    public static final String isSUCCESS = "SUCCESS";
    public static final String isORACLE = "ORACLE";
    public static final String isFail = "ERROR";
    public String dbDriver;
    public String dbURL;
    public String dbUserName;
    public String dbName;
    public String dbPassword;
    public String dbType;
    private Connection con;
    private Statement stmt;
    * @param s Username
    * @param s1 Indentified by
    * @param s2 tablespace
    * @param s3
    * @return
    * @throws SQLException
    * @throws ClassNotFoundException
    public String createUserOracle(String s, String s1, String s2, String s3)
    throws SQLException, ClassNotFoundException {
    System.out.println("Creating user method ");
    String s4 = "";
    if (!s2.equals("")) {
    if (!s3.equals("")) {
    s4 = new String("CREATE USER \"" + s + "\" IDENTIFIED BY \""
    + s1 + "\" DEFAULT TABLESPACE " + s2 + " QUOTA " + s3
    + " ON " + s2);
    else {
    s4 = new String("CREATE USER \"" + s + "\" IDENTIFIED BY \""
    + s1 + "\" DEFAULT TABLESPACE " + s2
    + " TEMPORARY TABLESPACE TEMP QUOTA UNLIMITED ON " + s2);
    else {
    s4 = new String("CREATE USER \"" + s + "\" IDENTIFIED BY \"" + s1
    + "\"");
    try {
    con = this.init();
    System.out.println("The new user statemeent " + s4);
    stmt = con.createStatement();
    System.out.println("The new user statemeent " + s4);
    stmt.execute(s4);
    System.out.println("the info success "+stmt.SUCCESS_NO_INFO);
    stmt.close();
    } finally {
    if (null != con) {
    con.close();
    return "SUCCESS";
    public String grantRightsOracle(String s)
    throws SQLException, ClassNotFoundException
    String s1 = new String("GRANT connect , resource , dba to \"" + s + "\"");
    try
    con=this.init();
    stmt = con.createStatement();
    System.out.println("granting "+s+"with the connect priveleges");
    stmt.execute(s1);
    stmt.close();
    finally
    if(null != con)
    this.close(con);
    return "SUCCESS";
    public Connection init() throws SQLException, ClassNotFoundException {
    System.out.println("initialising");
    Class.forName("oracle.jdbc.driver.OracleDriver");
    dbURL = "jdbc:oracle:thin:@localhost:1521:priya";
    con = DriverManager.getConnection(dbURL, "system", "manager");
    return con;
    public void close(Connection connection) throws SQLException {
    if (!connection.isClosed()) {
    connection.close();
    public String disableUserOracle(String s) throws SQLException,
    ClassNotFoundException {
    String s1 = "REVOKE CONNECT, RESOURCE, SELECT ANY TABLE FROM \"" + s
    + "\"";
    try {
    con = this.init();
    stmt = con.createStatement();
    stmt.execute(s1);
    stmt.close();
    } finally {
    if (null != con) {
    this.close(con);
    return "SUCCESS";
    public String deleteUserOracle(String s) throws SQLException,
    ClassNotFoundException {
    String s1 = new String("DROP USER \"" + s + "\" CASCADE");
    try {
    con = this.init();
    stmt = con.createStatement();
    stmt.execute(s1);
    stmt.close();
    } finally {
    if (null != con) {
    this.close(con);
    return "SUCCESS";
    public static void main(String args[]) {
    String s = "";
    OracleDB1 oracleoperations = new OracleDB1();
    try {
    System.out.println("creating user");
    s = oracleoperations.createUserOracle("test88", "test88", "", "");
    System.out.println("creating user is " + s);
    s=oracleoperations.grantRightsOracle("test88");
    System.out.println("granting rights" + s);
    //s=oracleoperations.deleteUserOracle("test88");
    //System.out.println("deleting user" + s );
    } catch (Exception exception) {
    exception.printStackTrace();

    I read that by default, JDBC uses an operation mode called auto-commit. This means that every update to the database is immediately made permanent.Still for this program I have tried connection.commit() also , Still it is not working.
    I think that problem is not with commit otherwise I shouldn't be able to see that newly created user entry in these tables from Sql Plus:-
    1)DBA_ROLE_PRIVS
    2) DBA_USERS
    3) DBA_sys_privs
    Ya but these is no entry in DBA_OBJECTS table for this user.

  • Spy for oracle thin jdbc driver

    Does anyone know a good spy utility to intercept the
    query going to the database thru oracle thin jdbc driver?

    If you can post the code, I would be happy to look at. I'm not aware of any 'trapping' mechanism for JDBC, although there may be one. Are you confident that you are 'waiting' on the execute of the SQL? It's very unusual for nothing to happen. In most cases, I would expect a long running query, or that you are getting, but not catching an Exception. Code would help if that's possible...

  • Oracle 8i JDBC to connect to 9i DB?

    We are having a big Java application that uses Oracle8i as underlying DB. It uses Oracle 8i JDBC for that. Now, we have to extend this application with a module that writes certain things into another DB. However, this DB is on Oracle 9i.
    Q: Can we access a 9i DB using the 8i JDBC driver? If yes, is there a special configuration for the JDBC or the 9i DB?
    Note: switching the 9i to "8i compatibility mode" is not an option, since we use loads of 9i features in that DB from another application that uses the 9i JDBC driver!
    We tried it and we got loads of exceptions from the 8i JDBC driver.
    Any comment or hint is more than welcome - we are running out of time...

    Hi
    I am trying exactly the same thing and am not able to use Oracle8i JDBC for Oracle9i DB. Have u been able to do this? In case yes, please tell me how.
    Thanks
    Ashish

  • Performance hint: oracle's JDBC is full of trace(), OracleLog.print()

    When someone writes OracleLog.print("some stuff"+variable+"other stuff") or print(...), And even if the log mode is false, the VM would compute "the some tuff"+variable+"other stuff" before calling print() or trace().
    So like this :
    public synchronized Connection getConnection(String s, String s1)
    throws SQLException
    makeURL();
    trace("User us " + s + "URL is " + m_url);
    Connection connection = DriverManager.getConnection(m_url, s, s1);
    return connection;
    So I noticed that the oracle's JDBC code has many of these (I decompiled it:) even though most of the traces are between "if(OracleLog.TRACE)" which is fine.
    So you imagine that for a heavy OLTP application, oppening and closing connections very often (even with the cached data source, there are a lot of trace() without the "if(log)") leads to calling trace() often, without useless computing...
    Riad

    When someone writes OracleLog.print("some stuff"+variable+"other stuff") or print(...), And even if the log mode is false, the VM would compute "the some tuff"+variable+"other stuff" before calling print() or trace().
    So like this :
    public synchronized Connection getConnection(String s, String s1)
    throws SQLException
    makeURL();
    trace("User us " + s + "URL is " + m_url);
    Connection connection = DriverManager.getConnection(m_url, s, s1);
    return connection;
    So I noticed that the oracle's JDBC code has many of these (I decompiled it:) even though most of the traces are between "if(OracleLog.TRACE)" which is fine.
    So you imagine that for a heavy OLTP application, oppening and closing connections very often (even with the cached data source, there are a lot of trace() without the "if(log)") leads to calling trace() often, without useless computing...
    Riad

Maybe you are looking for

  • How do I get certain games to fit in the box allowed (farmville on facebook)??

    Whenever I open my farmville game using fire fox the game seems to large for the box I have to play in I am missing a whole border around the game, if I use explorer to open the game from the same account it comes in just right. How do I get the game

  • Multiple rows in a single but with different column names

    Hello All, I have a table in which data is stored in the below displayed fashion. TRANS_ID Ty_1     NU_1 38960     BP     5215153159 38960    EM     [email protected]           38960    FX     5115538033 38960    HP     4419965055 38960 For some weir

  • Resizing JButtons in a BorderLayout

    Hi, I've been working with a BorderLayout and whenever I try and set a JButton's size or preferredSize, it always ignores what I set it at and puts it's size as filling the entire BorderLayout.CENTER. Any ideas?

  • Setting in Query not reflected on Crystal

    cyrstal Report created on top of BEx query, have following integration issue: 1) 0Vendor is Free Characteristic in Query. I have assigned the default value 03178 to the 0Vendor. When query is run, it is restricted to vendor 03178 by default, and user

  • OEM Software....Is this Legal

    I want to purchase DreamWeaver8 to do a Web site for a non-profit agency. I want to make sure that the software I buy is legal. I will not be charging the non-profit agency for developing their site. I found a place on-line called ClubMx.com that off