Using state or stateless connection

if i am going to implement a solution using oracle forms or oracle jdeveloper for example for Department of Civil Status where citizens will have ID cards , then what is recommended for the connection type to be between the solution end users ( the Civil Status employees) and server? Is it better to be state or stateless ??
what are the advantages and the disadvantages for the two options?
Edited by: user8946629 on Jan 6, 2010 7:55 AM

user8946629 wrote:
if i am going to implement a solution using oracle forms or oracle jdeveloper for example for Department of Civil Status where citizens will have ID cards , then what is recommended for the connection type to be between the solution end users ( the Civil Status employees) and server?Tethered
Is it better to be state or stateless ??Is a Hyundai better than a Kia? The answer, as always, is - it depends on a lot more information than what you have provided.
In fact, it is better to use a hybrid solution in which the parts that can use stateful will be stateful, and the parts that can be stateless are implemented as stateless.
what are the advantages and the disadvantages for the two options?Since this is such a basic question, and defines the core of development techniques for the past 15 years, this is a tough one for a forum not related to either JDeveloper not Forms. Many, many, many posts will likely be required to answer this - or perhaps http://lmgtfy.com/?q=advantages+of+stateful+or+stateless+application

Similar Messages

  • Ipad2, I can not sign in to imessage after turning it off and doing a hard reboot. Upon entering my info it states no network connection, but I can use it o surf in Safari and iter websites. Any suggestions. Went on with Apple, they think its my network.

    Ipad2, I can not sign in to imessage after turning it off and doing a hard reboot. Upon entering my info it states no network connection, but I can use it o surf in Safari and iter websites. Any suggestions. Went on with Apple, they think its my network. All other wireless equipment can ign on without problems. This happened after I turned imessage off.

    Step by step, how did you arrive at seeing this agreement?

  • Select for update on stateless connections

    i have read that using select for update for a web application will not work specially if the stateless connection are used , and the best way to make sure that the column you are reading was not changed is to use the time stamp approach and not select for update?? i am right

    Not entirely correct.
    A connection/session to Oracle has state. There is no such thing as a stateless Oracle connection.
    The stateless connection is from the web browser to the web server. It makes a connection. Asks for a page (GET, PUT or POST typically). It gets a response from the web server. It closes that connection.
    When the web server response, it opens a (stateful) connection to Oracle. Or it re-uses an existing (stateful) Oracle connection (now idle after having serviced another web browser/web server request).
    The problem with pessimistic locking (e.g. SELECT FOR UPDATE) is that the very same (stateful) Oracle session will either
    a) be closed when a response is send to the web browser
    b) be used for another totally different web browser
    Thus any locks made will either be lost (option a) or will get used by the wrong web browser (option b).
    A method is therefore needed to make the lock spans different Oracle (stateful) sessions. Web browser selects rows to update using Oracle session 101 at Time 1. Web browser submits updated rows and a commit using Oracle session 142 at Time 2.
    The "best way" to handle optimistic locking is likely using the Oracle System Change Number (SCN). This represents the "current version" of the rows.
    So at Time 1, via Session 101, you give the web browser a 100 rows to update - together with the SCN that says the current version of the rows are v1.2.0.1.
    At Time 2, using Session 142, the web browser submits its changes for those 100 rows. Together with the SCN v1.2.0.1.
    The SQL UPDATE issues the update statement - but adds the SCN version criteria. If the UPDATE fails to update all 100 rows, it means that some of the rows no longer exist, or that some rows have a new version number (was changed in the meantime).
    In this case, the UPDATE is rolled back and an exception raised to tell the web browser that some (or all) of those 100 rows have been changed in the meantime.
    Refer to the [url http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/pseudocolumns007.htm#BABFAFIC]Oracle® Database SQL Reference for details.

  • Weblogic Server 9.2 Crashes when using the JMS Wrapped Connection Pooling.

    ===== BEGIN DUMP =============================================================
    JRockit dump produced after 0 days, 01:05:05 on Thu Sep 16 18:27:36 2010
    Additional information is available in:
    E:\obopay\servers\EWP_9.2_Domain\jrockit.4516.dump
    E:\obopay\servers\EWP_9.2_Domain\jrockit.4516.mdmp
    If you see this dump, please open a support case with BEA and
    supply as much information as you can on your system setup and
    the program you were running. You can also search for solutions
    to your problem at http://forums.bea.com in
    the forum jrockit.developer.interest.general.
    Error Message: Illegal memory access. [54]
    Exception Rec: EXCEPTION_ACCESS_VIOLATION (c0000005) at 0x0095065F - memory at 0x00740060 could not be read.
    Minidump : Wrote mdmp. Size is 567MB
    SafeDllMode : -1
    Version : BEA JRockit(R) R27.2.0-131-78843-1.5.0_10-20070320-1457-windows-ia32
    GC Mode : Garbage collection optimized for throughput
    GC Strategy : Generational Parallel Mark & Sweep
    : Current OC phase is: not running. YC is not running.
    : GC strategy for GC 36 was genparpar
    : GC strategy for GC 37 was genparpar
    : GC strategy for GC 38 was genparpar
    : GC strategy for GC 39 was genparpar
    : GC strategy for GC 40 was genparpar
    : mmHeap->data = 0x00C00000, mmHeap->top = 0x10C00000
    : The nurserylist starts at 0x01BE75E8 and ends at 0x0CB52440
    : mmStartCompaction = 0x00C00000, mmEndCompaction = 0x01C00000
    : References are 32-bit.
    CPU : Intel Pentium III/Pentium III Xeon SSE SSE2 SSE3 SSSE3 EM64T
    Number CPUs : 2
    Tot Phys Mem : 3451408384 (3291 MB)
    OS version : Microsoft Windows XP version 5.1 Service Pack 3 (Build 2600) (32-bit)
    Thread System: Windows Threads
    State : JVM is running
    Command Line : -Djava.library.path=E:\bea\jrockit90_150_10\bin;E:\bea\jrockit90_150_10\jre\bin;E:\bea\weblogic92\server\native\win\32;E:\bea\weblogic92\server\bin;E:\bea\weblogic92\server\native\win\32\oci920_8 -Dweblogic.management.discover=false -Dplatform.home=E:\bea\weblogic92 -Dwls.home=E:\bea\weblogic92\server -Dwli.home=E:\bea\weblogic92\integration -Dweblogic.Name=myserver -Dweblogic.management.username=weblogic -Dweblogic.management.password=weblogic -Dweblogic.ext.dirs=E:\bea\patch_weblogic901\profiles\default\sys_manifest_classpath\weblogic_patch.jar Djava.security.auth.login.config=E://workspace/Bhopal/LoginModulesConfig/ewp_loginmodules.config -Djava.naming.factory.initial.ewp.remote=weblogic.jndi.WLInitialContextFactory -Dcom.ewp.proxy.is_remote=false -Djava.naming.provider.url.ewp.remote=t3://localhost:7001 -Dweblogic.webservice.verbose=true -Dweblogic.log.Log4jLoggingEnabled=true -Dweblogic.security.SSL.ignoreHostnameVerification=true Xdebug -Xnoagent -Dcom.sun.management.jmxremote -Xms256m -Xmx1024m -Dsun.java.launcher=SUN_STANDARD weblogic.Server
    java.home : E:\bea\jrockit90_150_10\jre
    JAVA_HOME : <not set>
    JAVAOPTIONS: <not set>
    PATH : E:\bea\jrockit90_150_10\jre\bin;E:\oracle\product\10.2.0\client_1\bin;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\TortoiseSVN\bin
    C Heap : Good; no memory allocations have failed
    StackOverFlow: 0 StackOverFlowErrors have occured
    OutOfMemory : 0 OutOfMemoryErrors have occured
    Registers (from ThreadContext: 0x4B29E378 / OS context: 0x4B29E764):
    eax = 00740060 ecx = 00740060 edx = 45a45ba0 ebx = 08c953b8
    esp = 4b29ea30 ebp = 00000000 esi = 4b29ea60 edi = 4b29efb4
    es = 00000023 cs = 0000001b ss = 00000023 ds = 00000023
    fs = 0000003b gs = 00000000
    eip = 0095065f eflags = 00010206
    Stack:
    (* marks the word pointed to by the stack pointer)
    4b29ea30: 00981099* 08c953b8 008ab310 4b29eb34 09e5c308 009810ea
    4b29ea48: 4b29ead8 0098ecd2 4b29ea60 4b29ea90 48bd8960 48bd8960
    4b29ea60: 00000001 45aa0278 45a45ba0 00000007 00000000 08c953b8
    4b29ea78: 08512180 4b29ef60 00000000 09d56368 09d563b0 4b29efb4
    Code:
    (* marks the word pointed to by the instruction pointer)
    0095062c: 5e5f0cc4 c35bc033 01b85e5f 5b000000 ccccccc3 0424448b
    00950644: a5f06ca3 ccccc300 cccccccc 04244c8b 01a8018b e0830774
    0095065c: 8bc88bfe* 40788301 44408b03 af0f0a75 c0830841 f8e08317
    00950674: ccccccc3 cccccccc cccccccc 0424448b 00f4888b 158b0000
    Loaded modules:
    (* denotes the module causing the exception)
    00400000-0040ffff E:\bea\jrockit90_150_10\bin\javaw.exe
    7c900000-7c9b1fff C:\WINDOWS\system32\ntdll.dll
    7c800000-7c8f5fff C:\WINDOWS\system32\kernel32.dll
    7e410000-7e4a0fff C:\WINDOWS\system32\USER32.dll
    77f10000-77f58fff C:\WINDOWS\system32\GDI32.dll
    77dd0000-77e6afff C:\WINDOWS\system32\ADVAPI32.dll
    77e70000-77f02fff C:\WINDOWS\system32\RPCRT4.dll
    77fe0000-77ff0fff C:\WINDOWS\system32\Secur32.dll
    77c10000-77c67fff C:\WINDOWS\system32\MSVCRT.dll
    76390000-763acfff C:\WINDOWS\system32\IMM32.DLL
    00820000-00a9cfff *E:\bea\jrockit90_150_10\jre\bin\jrockit\jvm.dll
    76b40000-76b6cfff C:\WINDOWS\system32\WINMM.dll
    71ab0000-71ac6fff C:\WINDOWS\system32\WS2_32.dll
    71aa0000-71aa7fff C:\WINDOWS\system32\WS2HELP.dll
    7c340000-7c395fff E:\bea\jrockit90_150_10\bin\MSVCR71.dll
    5dac0000-5dac7fff C:\WINDOWS\system32\rdpsnd.dll
    76360000-7636ffff C:\WINDOWS\system32\WINSTA.dll
    5b860000-5b8b4fff C:\WINDOWS\system32\NETAPI32.dll
    76bf0000-76bfafff C:\WINDOWS\system32\PSAPI.DLL
    6d700000-6d70bfff E:\bea\jrockit90_150_10\jre\bin\verify.dll
    6d370000-6d38cfff E:\bea\jrockit90_150_10\jre\bin\java.dll
    6d2f0000-6d2f7fff E:\bea\jrockit90_150_10\jre\bin\hpi.dll
    6d720000-6d72efff E:\bea\jrockit90_150_10\jre\bin\zip.dll
    6d520000-6d527fff E:\bea\jrockit90_150_10\jre\bin\management.dll
    6d530000-6d542fff E:\bea\jrockit90_150_10\jre\bin\net.dll
    71a50000-71a8efff C:\WINDOWS\system32\mswsock.dll
    662b0000-66307fff C:\WINDOWS\system32\hnetcfg.dll
    71a90000-71a97fff C:\WINDOWS\System32\wshtcpip.dll
    41c00000-41c26fff C:\WINDOWS\system32\DNSAPI.dll
    41c30000-41c37fff C:\WINDOWS\System32\winrnr.dll
    41c40000-41c6bfff C:\WINDOWS\system32\WLDAP32.dll
    41c80000-41c85fff C:\WINDOWS\system32\rasadhlp.dll
    68000000-68035fff C:\WINDOWS\system32\rsaenh.dll
    769c0000-76a73fff C:\WINDOWS\system32\USERENV.dll
    438b0000-438b8fff E:\bea\jrockit90_150_10\jre\bin\nio.dll
    41ba0000-41ba9fff E:\bea\jrockit90_150_10\jre\bin\jmapi.dll
    41bb0000-41bbdfff E:\bea\weblogic92\server\native\win\32\wlfileio2.dll
    43ce0000-43cf8fff C:\WINDOWS\system32\iphlpapi.dll
    43d10000-43d27fff C:\WINDOWS\system32\MPRAPI.dll
    77cc0000-77cf1fff C:\WINDOWS\system32\ACTIVEDS.dll
    43d30000-43d54fff C:\WINDOWS\system32\adsldpc.dll
    43d60000-43d70fff C:\WINDOWS\system32\ATL.DLL
    43d80000-43ebcfff C:\WINDOWS\system32\ole32.dll
    43ec0000-43f4afff C:\WINDOWS\system32\OLEAUT32.dll
    43f50000-43f5dfff C:\WINDOWS\system32\rtutils.dll
    71bf0000-71c02fff C:\WINDOWS\system32\SAMLIB.dll
    43f60000-44052fff C:\WINDOWS\system32\SETUPAPI.dll
    44060000-44064fff E:\bea\weblogic92\server\native\win\32\wlntio.dll
    44540000-44545fff E:\bea\jrockit90_150_10\jre\bin\rmi.dll
    4d010000-4d122fff E:\bea\jrockit90_150_10\jre\bin\dbghelp.dll
    "[STANDBY] ExecuteThread: '21' f" id=87 idx=0xf0 tid=4208 lastJavaFrame=0x4B29EB4C
    Stack 0: start=0x4B260000, end=0x4B2A0000, guards=0x4B263000 (ok), forbidden=0x4B261000
    Thread Stack Trace:
    at _mmGetPossibleMovedObjectSize+15()@0x0095065F
    at _refIterInit+393()@0x00981099
    at _refIterInit+474()@0x009810EA
    at _trProcessLocksForThread+66()@0x0098ECD2
    at _javalockCouldBeLock+1047()@0x008AB417
    at _javalockConvertThinToFat+42()@0x008AC13A
    at RJNIjrockit_vm_Locks_convertThinLockedToFatLocked@8+15()@0x00986B1F
    -- Java stack --
    at jrockit/vm/Locks.convertThinLockedToFatLocked(Ljava/lang/Object;)V(Native Method)
    at jrockit/vm/Locks.createMonitorAndConvert(Ljava/lang/Object;Z)Ljrockit/vm/ObjectMonitor;(Unknown Source)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at weblogic/common/CompletionRequest.getResult(CompletionRequest.java:109)
    ^-- Holding lock: weblogic/common/CompletionRequest@0x09E5C2A8[thin lock]
    at weblogic/store/gxa/internal/GXATransactionImpl.commitStoreIO(GXATransactionImpl.java:99)
    at weblogic/store/gxa/internal/GXATransactionImpl.doOperationCallbacks(GXATransactionImpl.java:215)
    at weblogic/store/gxa/internal/GXAResourceImpl.commit(GXAResourceImpl.java:1448)
    at weblogic/transaction/internal/XAServerResourceInfo.commit(XAServerResourceInfo.java:1333)
    at weblogic/transaction/internal/XAServerResourceInfo.commit(XAServerResourceInfo.java:577)
    at weblogic/transaction/internal/ServerSCInfo.startCommit(ServerSCInfo.java:514)
    at weblogic/transaction/internal/ServerTransactionImpl.localCommit(ServerTransactionImpl.java:1993)
    at weblogic/transaction/internal/ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2658)
    at weblogic/transaction/internal/ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2580)
    at weblogic/transaction/internal/ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:278)
    at weblogic/transaction/internal/ServerTransactionImpl.commit(ServerTransactionImpl.java:227)
    at weblogic/deployment/jms/WrappedTransactionalSession.delistFromTransaction(WrappedTransactionalSession.java:258)
    ^-- Holding lock: weblogic/deployment/jms/PooledSession_weblogic_jms_client_JMSXASession@0x09D56368[thin lock]
    at weblogic/deployment/jms/WrappedMessageProducer.send(WrappedMessageProducer.java:149)
    at com/obopay/jms/helper/BaseQueueHelper.sendMessage(BaseQueueHelper.java:107)
    The above is the jrockit crash dump file..
    I am using the JMS Wrapper Connection Poooling provided by Weblogic. When i use Jmeter and do the load testing for around 10 users, the server gets crashed.
    I doubt something is going wrong with the Weblogic JMS Connection Pooling, please help me..

    The problem doesn't look like it has anything to do with wappers per se. The stack indicates that the JVM died when the persistent store tried to invoke a standard Java synchronize operation. JVM crashes need to be analyzed by a JVM expert, so I second the suggestion to solicit help from JVM experts and/or filing a case with customer support. In the mean-time, you can probably work-around the issue by either (A) ensuring you have a recent version of the JVM installed, or (B) temporarily switching to the Sun JVM.
    Regards,
    tom
    Edited by: TomB on Sep 17, 2010 2:33 PM

  • Java.sql.SQLException: can't create statement from closed connection

    java.sql.SQLException: can't create statement from closed connection.
    at com.caucho.sql.QPooledConnectionImpl.prepareStatement(QPooledConnecti onImpl.java:411)
    I am getting this error with my JSP's, i am running on Resin on Win2k, and MySql as backend.
    Has anyone else also faced this issue ?
    Looking for someone to help me to solve this issue.
    rc

    Looking for someone to help me to solve this issue.Maybe you are closing the connections. You might want to verify that you are not doing that. Or if you are that that is the correct way to return the connection to the pool.
    Or you could have stale connections. Some databases will time out connections if the connection is no used in a while. (This is a good thing.) But this means connection pools must do something with connections that are not used for a while. The pools usually have a configuration option(s) which allows you to set up a keep alive message which keeps the database from closing the connection.

  • Re-using statement objects

    Hi,
    I am new to jdbc and sql in Java. So this is my question.
    If I want to to a select statement and depending on the result a second select, can I do this on the same statement object, or do I have to create a new one? And what about the resultset? Can you re-use this? And do you always close this statement after using it, or can you just close it when the program finishes?
    My code is something like this :
    Connection con = .....
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(blablabla...);
    if (rs.next() = ...)
    ResultSet rs = stmt.executeQuery(blablabla);
    }

    If I want to to a select statement and depending on
    the result a second select, can I do this on the same
    statement object, or do I have to create a new one?You can reuse your first statement and execute another query with it. But this would close your first resultset. If you want to use two resultsets at the same time, they must be created by different statements.
    Note that not all combinations of DBMS / driver support different active statements in 1 connection. In that case you would use a second connection for the second statement.
    And what about the resultset? Can you re-use this?You created a simple statement. So you can only position in it downwards by next() and retrieve values. If you execute another query by the same statement, your statement will close the first resultset and return a new one.
    And do you always close this statement after using it, or
    can you just close it when the program finishes?If you close it, you must create a new one if you need it again.
    No problem to let it remain open.
    At the end of your program then close them all in the right order:
    1. resultset (if still remained unclosed)
    2. statement (if still remained unclosed)
    3. connection (if still remained unclosed)

  • Use of Hostname for connectivity through client in 10g

    Hi,
    Can anyone please clarify the use of host name and DB name? I mean currently we are using Oracle 8.0.5 where clients are connecting to Database using the hostname for e.g "Dataserver"... but now we are planning to migrate our DB to 10.2.0.1 where in testing phase when we created database with same name i.e "Dataserver" oracle doesnt allow this as giving error that DB name cannot b same of host name... now i want to know is there any possibility in 10g that we can use host name for connecting to DB through clients?
    this question requires urgent attention as we need to migrate our database as early as possible.
    thanks

    while connecting to sql i m using:
    SQL> connect sharjeel/a@dar-dev-002
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    output of lsnrctl stat:
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 26-SEP-2011 17:15:18
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 26-SEP-2011 14:52:33
    Uptime 0 days 2 hr. 22 min. 48 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
    Listener Log File D:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dar-dev-002.AKHST.org)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orcl_XPT" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully

  • TS1717 I have older version of itunes on Windows Vista, when i check for updates it states it cannot connect to itunes update server even though i am connected to the internet, i have an iphone that has songs in the cloud and i wan to add them to my libra

    I have older version of itunes on Windows Vista, when i check for updates it states it cannot connect to itunes update server even though i am connected to the internet, i have an iphone that has songs in the cloud and i want to add them to my library?

    Try updating your iTunes using an iTunesSetup.exe (or iTunes64Setup.exe) installer file downloaded from the Apple website:
    http://www.apple.com/itunes/download/

  • Make use of established database connection

    From within an application in the Application Navigation, I have successfully established a connection to a database which is on another host machine. The steps are:
    right-click on the name of the application > select New > Database Tier > Database Connection > Connection Name ....
    After the connection is done, I am able to see the tables, etc. in the Connection Navigation, i.e., the connection was successful.
    Under the same application, I created a web project and in the project I am writing a servlet. I figure I can make use of the established connection as described above, to create sql statement object? But I do not know how. For example, I named that connection SbConnection, and tried the statements:
      Statment stmt = null;
      stmt = SbConnection.createStatement();
    But it does not work out. I am trying this because the classical way of
      Class.forname(....).newInstance();
      Connection conn = DriverManager.getConnection(......);
    does not work no matter how I tried.
    I am just starting in doing web application, servlet and JSP etc. and would appreciate a lot for any help.

    Fantastic, dvohra! It works out! Thanks a lot for the know-how!
    Next I am going to dig out something to read about JNDI and DataSource type of connection. But the part of editing the web.xml is magic and myth to me. Any suggested books or web sites for reading? (After know-how is know-why and know what I am doing.) Many thanks!

  • Multiple statements from one connection causes ORA-0100 Maximum open cursor

    HI,
    I am creating a connection and trying to run 2 statements off the connection. The connection has autocommit as false as I want to commit only after the second statement commits successfully. Upon executing the second statement, I get the ORAC-0100: Maximum open cursor error. I have verified that I have closed all the Preparedstatement and ResultSet in the first statement.
    My code looks like this:
    Connection myConn = DriverManager.getConnection(jdbc:oracle:thin:.....); myConn.setAutoCommmit(false); Savepoint sp = myConn.setSavePoint("save1"); PreparedStatement pstmt = myConn.prepareStatement(...) ResultSet rs = pstmt.executeQuery(); while (rs.next()){ ..... } rs.close(); pstmt.close(); rs=null; pstmt=null; Statement stmt2 = myConn.createStatement(); sql="DELETE FROM TempTable..."; stmt2.executeUpdate(sql);
    I put a breakpoint just before stmt.executeUpdate and verified the open cursor are below the threshold. And as soon as I execute stmt2.executeUpdate,I get the maximum cursor error. Also, I noticed that the number of open cursors jumps to the limit after stmt2.executeUpdate(sql) as verified by the following sql
    select s.sid, s.username,  a.value from v$sesstat a, v$statname b, v$session s where a.statistic# = b.statistic#  and s.sid=a.sid and b.name = 'opened cursors current' and s.username = 'user_name';
    Am I doing something wrong? Is there a better way to execute multiple statements using the same connection and commiting only after the last statement has executed successfully?

    I believe you need to close your connection via myConn.close() as follows:
    PreparedStatement pstmt=null;
    ResultSet rs=null;
    Connection myConn=null;
    try{
    myConn= //put code to get connection in this statement here
    pstmt = myConn.prepareStatement(...)
    rs = pstmt.executeQuery();
    while (rs.next()){
    }finally{
    if(rs!=null)
    rs.close();
    if(pstmt!=null)
    pstmt.close();
    if(myConn!=null)
    myConn.close();
    }

  • Trying to close Statement from its Connection object

    Hi, I am having difficulty finding information regarding how to find and kill a Statement for a given Connection. Unfortunately I do not have direct access to the Statement as the Connection object has been handed off and used externally.
    What I am doing is playing around with a connection pool and the effort to replace it with another at this point is not feasible, so basically what I am attempting to do is forcefully release a Connection after a specified timeout period but am finding that the Statement that it is running still persists. Waht I need to know is how I would be able to track down the Statement and .close() it as there does not seem to be any obvious way using the Connection object alone. Any ideas?
    Any help or suggestion about how to address this issue would be appreciated.

    Wrap the connection before handing it off to external code. Your wrapper will be responsible for tracking statement instances.

  • Using Planning vs Essbase connection in financial reports

    What are the pros/cons of using an essbase connection for financial reporting vs using a planning connection? we are on 9.2.1. using the Financial reporting studio client. These are basic financial reports-cost center expense reports, income statement, revenue analysis, etc.
    I notice that when I use a planning connection, I cannot select any attribute dimensions in my financial report.
    Also, are there any differences in the security used with a planning connection vs an essbase connection
    Thanks
    Jeff

    -- "I notice that when I use a planning connection, I cannot select any attribute dimensions in my financial report."
    you can select any attribute (see WorkSpace->File->Properties->Financial Reporting...)
    -- "Also, are there any differences in the security used with a planning connection vs an essbase connection"
    there are not big differences.
    We use planning for most of our reports. If report is very big (many rows or lines) we use financial report.
    Edited by: brdmike on 04.12.2008 7:48

  • .Using Oracle Heterogeneous Services Connectivity to SQL Server :ORA-02068

    Hi,
    I using oracle HS to connect sql server but error ora-02068: following server from HSSQL and ORA-03135 connection lost contact.
    step by step
    1. Create the init.ora file = initHSSQL.ora
    HS_FDS_CONNECT_INFO = HSSQL
    HS_FDS_TRACE_LEVEL = OFF
    2. modified listener.ora file
    SID_LIST_LISTENERHSSQL =
    (SID_LIST =
    (SID_DESC=
    (SID_NAME=HSSQL)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM=hsodbc)
    LISTENERHSSQL =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = CEPITA1403.siam.local)(PORT = 1521))
    and start listernerHSSQL = pass
    3.modified tnsname.ora :
    HSSQL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = CEPITA1403.siam.local)(PORT = 1521))
    (CONNECT_DATA =
    (SID = HSSQL)
    (HS = OK)
    and test by tnsping HSSQL = OK
    4.setup ODBC SQL Server
    Start --> Control Panel --> Administrative Tools --> Data Sources (ODBC)
    Click on the ‘System DSN’ tab.
    Click ‘Add’.
    Name HSSQL
    Click ‘Test Data Source…’.--> Pass
    5
    create public database link HSSQL
    connect to sa
    identified by xxxxxxxx
    using 'HSSQL';
    Database Link created.
    6. select * from ACCOUNT_CODE@HSSQL;
    show error message : ora-02068: following server from HSSQL and ORA-03135 connection lost contact.
    Please let me know.
    rose
    Edited by: user7218901 on Mar 25, 2009 12:39 AM

    Do you have all of your parameter files set up correctly?
    You need to have a hsora file in the hs/admin directory for ioi for instance, initioiDB.ora. In this file you need to set up your hs init parameters. This is an example of what's in one of mine:
    HS_FDS_CONNECT_INFO = Mapics
    HS_DB_NAME = MAPICS
    HS_DB_DOMAIN = WORLD
    HS_FDS_TRACE_LEVEL = ON
    The you need to have an entry in the tnsnames.ora file in the network/admin directory for hsodbcxtrad. The sid should be set to ioiDB.
    You can find documentation on how to manage heterogenous services in the online documentation.
    Managing Heterogenous Services Using Generic Connectivity
    Hope this helps
    Eric
    I have been trying to set up a database link between Oracle and SQL Server, currently both on the same Windows NT machine.
    I managed to create the link as follows:
    CREATE PUBLIC DATABASE LINK ioi
    CONNECT TO IOItest IDENTIFIED BY mba
    USING 'hsodbcxtrad';
    The link is created successfully.
    I then try to run a query and get the following error :
    select * from dealer@ioi
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC]DRV_InitTdp: [Microsoft][ODBC SQL Server
    Driver][SQL Server]Login failed for user '\'. (SQL State: 28000; SQL Code:
    18456)
    ORA-02063: preceding 2 lines from IOI
    I have added a UID and PWD to the registry settings for the SQL Server DSN but this makes no difference. Do I need to specify a username and password somewhere else ?
    Thanks
    Hugh

  • Entity Framework in WPF Application - Using Statement or Implement IDisposable

    I have a WPF application that uses Entity Framework.
    I have implemented a Repository that implements IDisposable, that holds my EF context.  When the application starts up I new up a Repository, which news up an EF context, then when the application shuts down, I dispose of my Repository, which disposes
    the EF context as well.
    The end result is that my context remains open during the entire lifetime of the application.  
    I've been reading up on EF, and all the examples put the operations against the EF context in a using statement.  Is that the preferred approach?  What is the priority: to keep the context open briefly, or just to make sure you properly dispose
    of it when you're finished with it.
    Thanks.
    Aaron

    >
    https://msdn.microsoft.com/en-us/library/aa355056(v=vs.110).aspx
    That link is only for WCF and it's broken implementation of the Dispose pattern.
    >I have been burnt in doing it where the connection was not closed or disposed when it short-circuted out of the Using statement on exception
    If so, it was a bug.  You should expect that not to happen.
    'using' will close your connection, unless the connection was open before the DbContext and was passed in.  'using' is the safest way to ensure that the connections are closed in a timely manner.
    David
    David http://blogs.msdn.com/b/dbrowne/
    I absoultly do not agree with you. I have been burnt in using the Using statment. And it was along the lines that an excpetion was thrown within the Using statement and no closing of the connection or dispoiong of it ever occured, which is what the WCF example
    is showing on how a Using statement can be short-circuted and things can go wrong.
    I don't care if the Using statement issue is being shown on a WCF typed cleint. I do the same thing in using straight up ADO.NET or EF, becuase I have been burnt by the Using statement, and I dont use them to open,  close or dispose of a connection.

  • TDS Connect Failure Error 17832 - Login Packet used to open the connection is structually invalid

    I have a package which uses TDS, Tabular Data Stream, to connect from a VAX VMS system to SQL server and it works for all flavors of SQL server. Except for one server. When I try to connect to this server the application gets disconnected after sending the
    Login 7.x message.  The server is running Windows 2008 R2 Standard, SP1, 64-bit and is in a domain.  SQL Server is 2008 R2 (10.50.4000).  SQL Server is configured for "SQL Server and Windows Authentication mode" in Server Properties,
    Security, Server authentication.  It is set to "allow remote connections to this server".  The TCP/IP Client Protocol is enabled in SQL Server Network Configuration, Protocols for MSSQLSERVER.  The SQL log shows 2 Logon source errors
    upon the connection attempt :
    Error: 17832, Severity 20, State 11.
    The login packet used to open the connection is structurally invalid; the connection has been closed.  Please contact the vendor of the client library.  [CLIENT: 172.19.20.122]
    I took a dump of the login packet from the client side package and included it here:
    Sending Login7.x message
    Sending PktTyp=10 LstPkt=01 PktNum=0001 PktSiz=00B8
    0000 b0 00 00 00 01 00 00 71 00 10 00 00 07 00 00 00
    0010 a8 00 00 00 00 00 00 00 e0 03 00 00 68 01 00 00
    0020 04 09 00 00 56 00 06 00 62 00 02 00 66 00 02 00
    0030 6a 00 06 00 76 00 0c 00 00 00 00 00 8e 00 0c 00
    0040 a6 00 00 00 a6 00 05 00 00 06 5b e4 96 08 00 00
    0050 00 00 b6 00 00 00 4c 00 54 00 56 00 56 00 53 00
    0060 42 00 51 00 41 00 b0 a5 b1 a5 47 00 41 00 4e 00
    0070 53 00 4b 00 45 00 69 00 68 00 65 00 2d 00 70 00
    0080 61 00 2d 00 73 00 71 00 6c 00 30 00 31 00 54 00
    0090 44 00 53 00 5f 00 53 00 45 00 52 00 56 00 49 00
    00a0 43 00 45 00 53 00 48 00 38 00 34 00 44 00 42 00
    0000        q                    h       V   b   f   j  
    v          
    0040           [           L T V V S B Q A     G A N S K E i h e - p
    0080 a - s q l 0 1 T D S _ S E R V I C E S H 8 4 D B
    I found other sites which discussed the connection ring buffers and so, I queried them for any information which might help:
    select cast(record as xml) xml_record from sys.dm_os_ring_buffers where ring_buffer_type = 'RING_BUFFER_CONNECTIVITY';
    xml_record:
    <Record id="53" type="RING_BUFFER_CONNECTIVITY" time="1697484630">
      <ConnectivityTraceRecord>
        <RecordType>ConnectionClose</RecordType>
        <RecordSource>Tds</RecordSource>
        <Spid>0</Spid>
        <SniConnectionId>32E3FDFC-2BF2-4EB8-82D2-AE05E73AFCBC</SniConnectionId>
        <SniProvider>7</SniProvider>
        <RemoteHost>172.19.20.122</RemoteHost>
        <RemotePort>1069</RemotePort>
        <LocalHost>156.144.249.81</LocalHost>
        <LocalPort>1433</LocalPort>
        <RecordTime>11/7/2014 15:13:42.729</RecordTime>
        <TdsBuffersInformation>
          <TdsInputBufferError>0</TdsInputBufferError>
          <TdsOutputBufferError>0</TdsOutputBufferError>
          <TdsInputBufferBytes>184</TdsInputBufferBytes>
        </TdsBuffersInformation>
        <TdsDisconnectFlags>
          <PhysicalConnectionIsKilled>0</PhysicalConnectionIsKilled>
          <DisconnectDueToReadError>0</DisconnectDueToReadError>
          <NetworkErrorFoundInInputStream>0</NetworkErrorFoundInInputStream>
          <ErrorFoundBeforeLogin>1</ErrorFoundBeforeLogin>
          <SessionIsKilled>0</SessionIsKilled>
          <NormalDisconnect>0</NormalDisconnect>
          <NormalLogout>0</NormalLogout>
        </TdsDisconnectFlags>
      </ConnectivityTraceRecord>
      <Stack>
        <frame id="0">0X0000000001E21F3B</frame>
        <frame id="1">0X0000000001E1EE4E</frame>
        <frame id="2">0X00000000010D2984</frame>
        <frame id="3">0X0000000000A8AB94</frame>
        <frame id="4">0X0000000000A8B05E</frame>
        <frame id="5">0X0000000000A8AD57</frame>
        <frame id="6">0X0000000000F651DE</frame>
        <frame id="7">0X0000000000F65395</frame>
        <frame id="8">0X0000000000F68925</frame>
        <frame id="9">0X0000000000F659D6</frame>
        <frame id="10">0X00000000755937D7</frame>
        <frame id="11">0X0000000075593894</frame>
        <frame id="12">0X00000000779159ED</frame>
        <frame id="13">0X0000000077B4C541</frame>
      </Stack>
    </Record>
    I feel the problem is in the configuration of the server's authentication which is requiring something beyond SQL server authentication.
    Any help would be appreciated.  Thanks in advance.

    One other item of note is the "SQL Server Network Configuration (32bit) "on this server is empty -- no "Protocols for MSSQLSERVER" branch like the 64-bit "SQL Server Network Configuration". 
    This is perfectly normal if all you have is a 64-bit instance on the machine. You would only see items here if you have a 32-bit server.
    The odd part is the Native Client Configuration shows up under (32bit) with Client Protocols...
    Yes, you always have a 32-bit client, which is to be used with 32-bit applications.
    In any case, whether server is 32-bit or 64-bit is immaterial when you connect.
    I'm afraid that I have not worked with TDS packets so that I can say what is wrong with this package, and I don't think I will try to read the TDS spec to say what the problem may be. But the issue seems to be that whatever you are using to create
    the TDS packets is not doing this fully correctly.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • Sales Order Stock (For Repair Returns) - Valuated & Non-Valuated

    Greetings All, We are currently using sales order stock as quantity only for customer returns for repair (RMA Sales Order). As long as we do not give a credit to our customer, this is working. My problem is that some of our customers are requesting c

  • Blend mode in Particle Generator

    A blend mode i set for a particle generator seems to effect the partiles as a whole, but not individualy. I am using Darken for example. The particles darken the background, but not each other. Is there a way to make them darken each other?

  • USB - max size @ performance ??

    Hi, Recently, i figured out that an External HDD (above 10gb) cannot be detected from SunRay device. Even though using the latest sunray (Sunray 4 10/08) & latest script usbdrived, but there's still facing a problem on the usb. What is exactly the ma

  • DV to FLV Conversion Curiosity

    So here is a curiosity. I have a DV footage I filmed and then captured using Premiere Elements 8.  The footage looks good for what it is, a recording of an instructor's lecture. The strange part comes when its time to 'Share' from Premiere.  When sha

  • Ipad is disabled and cant get itune because of blocked password, How can I get my password in?  I know it.

    My apple Ipad is disabled.  I tried to get itunes, but Itunes says I have a blocked password.  I don't know how I can get my password in.  I know it.I can't type it in anywhere.