SQLJ or JDBC

I have asked this question in the SQLJ JDBC forum but since nobody answers me I try here instead:
Could you point me to some good resources (white papers) where I can read about performance issues when choosing between SQLJ and JDBC?
I assume this is a rather general question, but I have to come up with a precise answer. This system is limited by a large number of inserts into Oracle, but the SQL statements are not complicated.
Regards
Flemming

Not knowing exactly, but I guess, that there is no real difference between SQLJ and JSBC concerning performance. SQLJ is just a precompiler which translates SQLJ-Statements into JDBC API-calls. So both are basically the same. Most probably the limiting part will be the database, which has to execute all of the INSERT-statemens you mentioned.

Similar Messages

  • Sqlj and jdbc for linux

    Hi All,
    I am currently set up the (tomcat) jsp engine on top of apache web server.
    And now i would like to install both sqlj and a jdbc driver such
    that I can query our oracle database. In all of the options for downloads
    there is a windoze option and a solaris option. Do I have to wait for specific
    "linux" version to get them to work. Or is the solaris option alright
    for linux ??
    slightly confused,
    Chris

    Unfortunately, this description is still rather unspecific.
    It sounds, as if there might be an issue with the way database connections are established for the SQLJ and JDBC parts of your program. Could you provide more information on that, specifically on how you obtain JDBC connections and SQLJ connection contexts.

  • Performance of SQLJ vs.JDBC

    Performance of SQLJ vs JDBC
    Hi.
    I have a method (writen in SQLJ) containing SQL INSERT statemenmt. As I understand it - each time I invoke that method inside loop PreparedStatement object is created, parsed, executed and released.
    With JDBC I'm able to create and parse only once for the whole loop.
    Is it possible to do the same with SQLJ or I would have to re-write the code?
    TIA. Michael

    Rewrite. SQLJ slower than JDBC in times.

  • Sqlj and jdbc in a single program causing problems

    I am using both sqlj and jdbc in a single program(servlets) but after insatiaitng this program my other sqlj programs are not working while the JDBC pgms are working . Why is it so? How can I remedy it?

    Unfortunately, this description is still rather unspecific.
    It sounds, as if there might be an issue with the way database connections are established for the SQLJ and JDBC parts of your program. Could you provide more information on that, specifically on how you obtain JDBC connections and SQLJ connection contexts.

  • SQLJ vs JDBC vs stored procedur?People

    SQLJ vs JDBC vs stored procedur?
    What is used in the enterprise?
    What to study?

    SQLJ and JDBC are ways to access the database - from the client, from the middle tier, or from inside the database server itself.
    JDBC is an API specified by Sun as part of Java, while SQLJ is an ANSI (soon ISO) standard for embedding SQL in Java.
    JDBC is more widespread, while SQLJ is a more productive environment.
    Stored procedures are pieces of code executed in the database as part of your database session. In Oracle Databases, stored procedures are usually written either in PL/SQL (a propertietary Oracle language) or in Java. If you write your stored procedure in Java you use JDBC or SQLJ to access the database - essentially the same code you would write on the client or in a middle-tier.

  • Performance difference between sqlj and jdbc

    hi:
    i am working with a project and i have to generate text files
    from database . first i am working with pl/sql, but i am not so
    satisfied with the performance. so i turn to java stored procedure. I have two choice sqlj and jdbc when accessing
    database? which performs better? sqlj or jdbc? or there's only
    little difference.
    And would u like to give me some other choice to run faster.
    maybe pro*c/c++ is a choice . but if it can't run much faster ,
    it's not a better choice.
    regards

    Since you don't play games, you'll notice a difference in graphic and video applications that are GPU accelerated, like Motion, and Photoshop CS4 & 5.

  • JAR files for SQLJ and JDBC drivers: what is the best practice?

    starting a migration from IAS 10 to WebLogic 11g.
    Apparently the jar files for SQLJ are not on the classpath by default.
    java.lang.NoClassDefFoundError: sqlj/runtime/ref/DefaultContextwhich is the better practice: putting the SQLJ runtime jar into the lib subdirectory of the domain directory, or using a shared library reference? (usage of SQLJ is pretty prevalent in our apps, though we may be getting away from it)
    are the Oracle JDBC drivers on the classpath by default?
    if not, then the same question: put them into the lib subdirectory of the domain directory, or use a shared library reference?

    I'm looking at the setDomainEnv, especially the big note at the top:
    >
    # WARNING: This file is created by the Configuration Wizard.
    # Any changes to this script may be lost when adding extensions to this configuration.
    >
    and am getting squeamish about editing it...
    http://www.bea-weblogic.com/how-do-i-disable-wls-automatically-adding-to-classpath.html looks like the default behaviour is for WebLogic to put $DOMAIN/lib;$WL_HOME/common/lib/ext;$WL_HOME/server/lib/ext on the classpath; there is also a reference to setting weblogic.ext.dirs= when starting weblogic (which means I set the WEBLOGIC_EXTENSION_DIRS environment variable).
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/libraries.html#wp1067450 also refers at the bottom to using the domain /lib subdirectory.
    so am I correct that a good practice is to just put the jars I think I will globally need into $DOMAIN/lib, rather than putting them in $WL_HOME/common/lib/ext, $WL_HOME/server/lib/ext, or fiddling with the WEBLOGIC_EXTENSION_DIRS environment variable?
    Edited by: user8652010 on Feb 10, 2011 1:08 PM

  • Installation of SQLJ with JDBC

    I want to install SQLJ on Sun Unix machine and How to configer JDBC driver for Java programmer? Is the above things is sufficient to interact Java programmer with Oracle 8i database.
    Thanks
    null

    Follow the "Getting Started" section in the SQLJ User's Guide and Reference.
    You need:
    - a JDK (1.1.x or 1.2)
    - the Oracle JDBC driver distribution
    - the SQLJ distribution (translator.zip)
    null

  • Sqlj and JDBC test

    I installed JDK1.2.2, it works very well. I also installed
    JDBC7.3.4 and SQLJ7.3.4. After I compiled the
    TestInstallCreateTable.java, I run the class to get the following
    error messages. Can SQLJ7.3.4 work with the JDK1.2.2?
    Exception in thread "main" java.lang.UnsatisfiedLinkError:
    C:\ORAWIN95\BIN\oci73jdbc.dll: One of the library files needed to
    run this application cannot be found
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at
    java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1319)
    at
    java.lang.ClassLoader.loadLibrary(ClassLoader.java:1243)
    at java.lang.Runtime.loadLibrary0(Runtime.java:470)
    at java.lang.System.loadLibrary(System.java:768)
    at
    oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:138)
    at
    oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:
    93)
    at
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:146)
    at
    java.sql.DriverManager.getConnection(DriverManager.java:457)
    at
    java.sql.DriverManager.getConnection(DriverManager.java:137)
    at
    sqlj.runtime.ref.ConnectionContextImpl.<init>(ConnectionContextIm
    pl.
    ava:102)
    at
    sqlj.runtime.ref.DefaultContext.<init>(DefaultContext.java:142)
    at
    oracle.sqlj.runtime.Oracle.getConnection(Oracle.java:501)
    null

    Thank you for your timely help. After setting up %JAVA_HOME%\lib\classes.zip in classpath, I am able to compile the .sqlj file. But I am not able to run. I get a java.lang.NoClassDefFoundError:oracle.sqlj.runtime.Oracle. I am able to see this class in the database, under Java classes. Kindly advice. Thanks in advance.

  • SQLJ -codegen=jdbc

    What is the difference between the -codegen=oracle and -codegen=jdbc options of Oracle SQLJ? Will there be any performance benifit for -codegen=jdbc over -codegen=iso?

    Based on the above mentioned stack it looks like the sqlj program is being compiled in codegen=oracle mode. As can be seen in the below three lines.
    sqlj.runtime.ref.ConnectionContextImpl.getOracleConnection(ConnectionContextImpl.java:149)
    sqlj.runtime.ExecutionContext$OracleContext.prepareOracleCall(ExecutionContext.java:1507)
    adaptech.model.karibu.pusua.Pusua.existe(Pusua.sqlj:74)
    The generated client program is calling ExecutionContext.OracleContext.prepareOracleCall directly. This would be seen only with codegen=oracle and not with codegen=iso.
    Also, please do check if you have ojdbc14.jar or classes12.jar as part of the classpath at the time of execution of the program.

  • Oracle SQLJ or JDBC ?

    Hi,
    I would like some advice. Have anyone used Oracle SQLJ instead of the JDBC ?
    What should I use ?
    I started with JDBC then someone told me about SQLJ and said it was more high level and therefore easier to use. What do you think ?
    Thanks

    It depends whether you need portability or not. JDBC will be portable across DBs whereas SQLJ feature is not. Also I would advise not to make portability a default requirement for any application as that shuts down a whole bunch of nice, performant solutions. Would recommend reading Rod johnson's J2EE expert one-on-one. Wrox crashed, so not sure book is available or not.
    -Sanjay

  • Creation of tables using JDBC or SQLJ in webdynpro application

    Hi,
    I am trying to create tables in javadictionary(MaxDB)using my WebDynpro application.I tried creating tables using SQLJ and JDBC.But I was not able to do it.I can select and insert data into already created tables.
    Whwn I tried creating a table using JDBC I encountered the following exception.
    com.sap.sql.log.OpenSQLException: The SQL statement "CREATE TABLE TMP_DEPID (DEPID varchar(10) NOT NULL,DEPNAME VARCHAR(25))" contains the syntax error[s]: Open SQL syntax error: CREATE ... TABLE is not supported
    SQL syntax error: "VARCHAR" is a reserved keyword and cannot be used as an unquoted identifier
    Does this mean that creating tables is not supported?
    Can anyone help me in this matter?
    Thanks in advance,
    regards
    ~Pradeep Shetty

    Hi Pradeep,
    Yes, OpenSQL does not support creation of tables. But why would you need to create tables at runtime?! The natural way is to create the model at design time of your application, i.e. with the Java DataDictionary.
    However, if for any reason you really need to create database tables at runtime, you can achieve this by using a non-OpenSQL datasource, e.g. you could create a VendorSQL one and use it to obtain JDBC connections in your app. See also http://help.sap.com/saphelp_nw04/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm.
    Hope that helps!
    Vladimir

  • SQLJ vs. JDBC

    This was posted some time ago:
    Some advantages you gain in using SQLJ over JDBC for static SQL
    statements are:
    SQLJ uses database connections to type-check static SQL code.
    JDBC, being a completely dynamic API, does not do any type
    checking until run-time.
    SQLJ programs allow direct embedding of Java bind expressions
    within SQL statements. JDBC requires separate get and/or set
    call statements for each bind variable and specifies the binding
    by position number.
    SQLJ provides strong typing of query outputs and return
    parameters and allows type-checking on calls. JDBC passes values
    to and from SQL without compile-time type checking.
    [i]
    My question is: If the SQLJ is converted to JDBC code once compiled, then how can it offer anything different than JDBC? How can it offer type-checking or binding or any of that?

    I finally solved my own problem. The SQLJ compiler creates a .ser file that is used on the DB side to customize and build the packages needed so that the SQL is static. Using straight JDBC creates dynamic calls.
    At this point I'm worried because I've not had one question answered regarding SQLJ, and it appears that nobody is using it. So, I'm looking in other directions if I can.

  • JDBC and SQLJ

    Can I use SQLJ inside my servlets? Or, do I have to create stored procedures with SQLJ and connect to those through JDBC in my servlets? If I use SQLJ as stored procedures, how do I retrieve the information from the SQL calls from my servlet?
    Thanks

    Hi jmennen,
    Yes, your servlets can use SQLJ, provided they have access to the appropriate SQLJ classes.
    However, your question gives me the impression that you are very confused regarding SQLJ and/or JDBC.
    I suggest you state what you want your servlet to do, and thus allow people to suggest the best way to implement your servlet.
    [You may not even [i]need SQLJ (or JDBC) :-]
    Hope this helps.
    Good Luck,
    Avi.

  • Execute SQLJ/JDBC within InfoBus Data Form???

    Is there a way to execute SQLJ or JDBC from within the InfoBus data forms without opening a new connection?
    Is there a way to execute SQLJ or JDBC via the Business Components using the connection already established in the InfoBus frame?
    Please post any samples if this can be done.
    Thanks
    Andrew

    Andrew,
    The best way to do what you are asking is to create a custom method at the application module or view object level, export that to your client, then call the method from the form.
    Here is an example from a JSP Web Application. The basic idea is the same though.
    1. Double-click the appmoduleImpl.java file for your application module to open it in the code editor (expand the Application Module node to find this source file, if there is not one there, edit your app module, click on the Java tab, and check the Generate Java Files checkbox, click Finish and rebuild your project).
    2. Enter the code that you want to execute (I've included an example below that calls a stored PL/SQL procedure to calculate a value).
    3. Compile the file to make sure your code is OK.
    4. Edit the Application Module and click on the Client Methods tab. You should see your new method in the Available list.
    5. Shuttle the method to the Selected list.
    6. Click Finish and rebuild your project.
    7. From your Infobus client code, call the method you just wrote. You may need to include the package that contains the business components code.
    Note that when you export client methods from your BC4J project, you may need to include the stubs for these methods in your client project, depending on how you deploy your BC4J project. For example, if you deploy your BC4J app module as an EJB, the deployment process will generate the client stubs for these exported methods into a separate project (or you can specify to have them generated into your client project on the Remotable tab of the app module wizard). See the online docs for deployment for more information.
    Example exported client method:
    public int getTotalHits(String mon, String year) {
    CallableStatement stmt = null;
    int total;
    String totalhits = "{? = call walkthru.total_hits(?,?)}";
    stmt = getDBTransaction().createCallableStatement(totalhits, 1);
    try
    // Bind the Statement Parameters and Execute this Statement
    stmt.registerOutParameter(1,Types.INTEGER);
    stmt.setString(2,mon);
    stmt.setString(3,year);
    stmt.execute();
    total = stmt.getInt(1);
    catch (Exception ex)
    throw new oracle.jbo.JboException(ex);
    finally
    try
    stmt.close();
    catch (Exception nex)
    return total;
    null

Maybe you are looking for

  • ADF af:column width attribute

    Hello, I'm trying to expand the width of columns inside an af:table component so they stretch automatically according to the parent's size. I have tried all ways but columns always get set the default 100px width. The only way to make it stretch is u

  • Black video windows in iTunes 11.1.5

    since update to iTunes 11.1.5 on Windows 7 - 64-bit, I got a black video window after starting a movie from store or bibliothek (trailer and also own videos). iTunes 11.1.4.62 works fine on my other Windows 7 in a virtual machine, but I don't have th

  • Portlet content from XML XDB

    Hi, I need to get content of xmls stored in XML DB and display in a portlet. Does someone has any idea how to do that/ I try to use: select xdbURIType(##Param1##).getClob() from dual as SQL source. During building portlet it works when I press Test b

  • BC4J /  JDBC Failover BUG ?

    I have developed an ADF / BC4J application which works. In our environment we have a failover configuration I coded this approach for my ADF applications. My Custom connect string in the connection wizard for the BC4J is: jdbc:oracle:thin:@ (DESCRIPT

  • Best Compression scheme...

    This post is not a question - rather an attempt at a solution that I have read about on these boards for years. Simply put - how do you get the best looking video from FCP onto a DVD. A co-worker just stumbled on this protocol & I thought I'd pass it