Maximum No of Open  Database Sessions

Hello
I m Abdul Qadeer.My problem is regarding open sessions.I m using JSP/Servlet with JDBC(using Oracle as DB).Problem is that I found an error message "ORA-00018: maximum number of sessions exceeded" and my application is generating error.
When I saw the Session in oracle from DBA then I saw the many Sessoions were open stating InActive but not closed.
First tell me, In JDBC which object is responsible for opening DB Session and how it will be removed?
Waiting For Reply
Abdul Qadeer

When you are through using a database connection, do you close it? For robustness, use try/catch/finally, open in the try block and close in the finally block. Check any JDBC tutorial for examples. Or even better, get a database connection pool, and after using a connection, return it to the pool.

Similar Messages

  • ADF panel opening too many JDBC Thin Client database sessions.

    Hi All,
    I have several ADF Panels, which allows the user to run a few simple queries against an Oracle database done using ADF view objects and ADF view links and ADF application module.
    Each ADF panel as I said contains several View Link queries, and links under the form of Jbuttons to other ADF Panels running other ADF View Links.
    Running the ADF Panel as described here opens up to 21 database sessions displaying as “JDBC Thin Client” when I look them up from v$session.
    Why do I end up with that many database sessions.
    Why doesn’t it just use one or two database sessions to run all these View Links? It seems that it is opening one database session for each of these view links.
    How can I change this destructive behavior? I only one to see one or two database sessions for the entire ADF panel no matter how many ADF View Links it contains.
    Your suggestions are most appreciated.
    Thanks.
    Bobby A.

    Thanks for your response.
    I took a quick look at the docs you pointed me to. It seems that I can set some parameters in bc4j.xcfg of each application module Home to control number of database connections that the application module will create. In that case maybe you can recommend which parameters and what value they should be set to.
    Your response will be most helpful as my background is rather in database admin and not java.
    Thanks.
    Bobby A.

  • How to Identify database sessions used by forms sso user sessions?

    Hi:
    When using forms with SSO, all database sessions are opened by the same OSUSER (usually oracle), from the same machine (usually the forms server) and by the same program (usually [email protected] [TNS V1-V3]).
    I need a way to identify the database session (v$session) that is beeing used by a specific SSO user. By using SSO, we say implicitly that all users using that SSO resource will be connect to the database by a specific database user.
    So, what can I do to identify the database session that a specific forms user is using ?
    Thanks
    Joao Oliveira

    You could try something like the following in a when new form instance trigger:
    declare
    authenticated_username varchar2(30);
    begin
    authenticated_username := get_application_property(`sso_userid');
    DBMS_APPLICATION_INFO.SET_CLIENT_INFO (
    client_info IN VARCHAR2);
    end;
    This will store the sso userid in the client_info field of v$session.
    I hope this works for you.
    Randy McGregor

  • How to open multiple sessions for one user?

    Sorry for the silly question but I couldn't find it googling or searching through this forum, so I started wondering whether it's possible in SQL Developer to open multiple sessions for one user. I'm fairly new to SQL Developer and databases in general.
    When I open SQL Developer and connect to a schema, a worksheet opens named MYSCHEMA. If I disconnect then connect, another worksheet opens, named MYSCHEMA~1. I assumed these were different sessions, but if I enter into one worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 1
    update my_table set col1 = 0 where row_id = 1
    select col1 from my_table where row_id = 1
    -- shows result is 0and then enter into the second worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 0I would have expected the second worksheet to report 1 because the first worksheet did not issue a COMMIT. Thus, I'd guess both worksheets are the same session? Is that right? If so, how do I have two sessions open simultaneously (opened by same user)?
    I'm trying to implement the code at the bottom of this post, for which testing requires at least two sessions:
    Re: Help with Procedure
    Edited by: tem on Apr 18, 2012 6:44 AM

    Thanks Jim,
    Ctrl-Shift-N doesn't do anything for me. I'm on a mac -- by experimenting it looks like command-N does what you're looking for. This appears to be the same as left-clicking on the "New" icon in the top left corner of SQL Developer, or selecting from the pull-down menu, File > New.
    This opens "Create a New" window that appears to be a wizard. What would I select at this point? Options are: Database Connection, Table, View, Package, ...
    I don't see an option for "Worksheet".
    UPDATE:
    OK, I found that if I select "SQL File", a worksheet becomes available. Perhaps this is what you intended. However, when I issue the command
    select col1 from my_table where row_id = 1;it still returns 0 instead of 1. Hmm, maybe my initial assumption was wrong -- if this is a second (e.g. different) session, should I expect the changes made in the first session in SQL Developer (the UPDATE command) WITHOUT a commit, to be observed in this second session? I thought that changes made in one session were not viewable in a different session until these changes are committed in the first session? If so, how to show this in SQL Developer? I must be missing something basic here.
    Or, is SQL Developer issuing some sort of "auto-commit" without my knowledge?
    Edited by: tem on Apr 18, 2012 8:00 AM

  • How to open Multiple session

    I am trying to OPEN multiple SESSION for same application and unable to do this using FIREFOX 7.01
    R 12(Oracle E-Business Suite), we are using FIREFOX for several clients to open the applciation. But i cannot open different session of same applcaition. it is ONLY opening singel JAVA form. In IE 8 or 9, i can do - NO MERGE option or File>New Session option. Is there some workaround for this. I am using Windows 7.

    Hi,
    When you run the form in the browser, it opens a new database session. For sharing the same session, you need to open/call/new form within the form itself.
    For using same JVM, you can use the [JVM Pooling|http://download.oracle.com/docs/cd/B14099_19/web.1012/b14032/jvm.htm] feature (assuming you are on forms >= 10.1.2).
    -Arun

  • Find thread that opened a session in AIX

    Hello.
    As stated in "Determining which Oracle database session is being used by a specific Siebel user session [ID 863771.1]":
    On the Oracle database side, you can query the V$SESSION table (make sure you are logged in as the tableowner) using the following WHERE clause format:
    WHERE PROCESS='XXXX:YYYY'
    XXXX = Server PID
    YYYY = Thread ID
    So querying v$session, sessions opened by windows clients have in the PROCESS column values like "12345:876", where 12345=process id and 876=thread id.
    Our application servers are installed in AIX, which is also multithreaded, but in the PROCESS column only process id is stored.
    Is there any way to find thread id?

    user11181920 wrote:
    I don't want to find any process info.I want to match siebel.S_SRM_TASK_HIST with v$session.
    I see.
    V$SESSION.PROCESS is does not look reliable source of Thread
    - I've connected to Oracle in Linux from Windows SQL*Developer - V$SESSION.PROCESS shows 1234, though in Windows the SQLDeveloper PID is 6896 and some thread has opened the connection.
    - I've connected to Oracle in Windows from same Windows SQL*Developer - V$SESSION.PROCESS shows 6896 but no thread.
    May be there is something in V$SESSION.MODULE, ACTION or CLIENT_INFO that may identify a client thread? (It is application who should populate these columns)
    Or you can use V$SESSION.LOGON_TIME and according col in SIEBEL.S_SRM_TASK_HIST.
    Also, if your Siebel uses LDAP, may be it uses it for proxy authentication?
    In this case you can look into v$session_connect_info to see actual user.
    There are some date columns in SIEBEL.S_SRM_TASK_HIST, but none of them match exactly V$SESSION.LOGON_TIME.
    I would have to start guessing between 2-3 sessions which one is the correct, since there are +500 conc. users, but perhaps this is the only way to do something, at least.
    I've seen v$session_connect_info, but it doesn't help.
    select a.*
    from v$session_connect_info a, v$session b
    where username='SIEBELUSR'
    and a.sid=b.sid
    and a.serial#=b.serial#;
    SID     SERIAL#     AUTHENTICATION_TYPE     OSUSER     NETWORK_SERVICE_BANNER     CLIENT_CHARSET     CLIENT_CONNECTION     CLIENT_OCI_LIBRARY     CLIENT_VERSION     CLIENT_DRIVER     CLIENT_LOBATTR     CLIENT_REGID
    10     30931     DATABASE     siebel     TCP/IP NT Protocol Adapter for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production     UTF8     Heterogeneous     Home-based     0.0.0.0.0          Client Temp Lob Rfc Off     0
    10     30931     DATABASE     siebel     Oracle Advanced Security: encryption service for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Pro     UTF8     Heterogeneous     Home-based     0.0.0.0.0          Client Temp Lob Rfc Off     0
    10     30931     DATABASE     siebel     Oracle Advanced Security: crypto-checksumming service for IBM/AIX RISC System/6000: Version 11.2.0.     UTF8     Heterogeneous     Home-based     0.0.0.0.0          Client Temp Lob Rfc Off     0
    Edited by: Lefteris on Sep 4, 2012 10:17 PM

  • Open New Sessions and attach

    Hello,
    I am trying to figure out how while attacehd to SAP from VBA excel to open a new session and continue the task in the new session. The end goal is to run 3 different transactions and have them up each in a seperate window. this is what I have so far but the transaction doesn't continue in the new session created it defaults back to the original window.
      Set SapGuiAuto = GetObject("SAPGUI")
      Set SAP = SapGuiAuto.GetScriptingEngine
    With SAP.Connections(0).Sessions(0)
        .createsession
    End With
      Set SapGuiAuto = GetObject("SAPGUI")
      Set SAP = SapGuiAuto.GetScriptingEngine
    SAP.Connections(0).Sessions(0).StartTransaction (Tcode)
    With SAP.Connections(0).Sessions(0)
            .findById("wnd[0]/usr/tabsTAB300/tabpF01/ssubINCLUDE300:SAPMM61R:0301/ctxtRM61R-MATNR").Text = Selection
            .findById("wnd[0]/usr/tabsTAB300/tabpF01/ssubINCLUDE300:SAPMM61R:0301/ctxtRM61R-WERKS").Text = "CHEM"
            .findById("wnd[0]/tbar[0]/btn[0]").press
            .findById("wnd[0]/tbar[1]/btn[34]").press
            .findById("wnd[0]/tbar[1]/btn[35]").press
            .findById("wnd[0]/tbar[1]/btn[36]").press
    I am attaching once...creating a new session and attaching again but it does not seem to happen in the new window created....any help please?

    Hi SLobo32, welcome to the forum !
    The question is simple but  I needed for the answer a lot of time. I have put my observations into a theory as folllows.
    By the command "create session", we opened a new SAP session. The system decides which is given session number. The task is then, how is the new session number.
    Session_number_max = 6                                  'the maximum number of possible SAP sessions
    Dim session_number_(Session_number_max)
    Set SapGuiAuto = GetObject("SAPGUI")
    Set SAP = SapGuiAuto.GetScriptingEngine
    Set connection = SAP.Children(0)
    Set session    = connection.Children(0)
    '------------------------------------------- new session connect -------------------------------------------------------------
    session_number_all = connection.children.count - 1
    for i = 1 to Session_number_max
         session_number_(i) = 0
    next 
    for session_number = 0 to session_number_all
         Set session    = connection.Children(int(session_number))
         session_number_(session.info.sessionnumber) = session.info.sessionnumber
    next
    if session_number_all < Session_number_max - 1 then
         session.createsession
         do
          wscript.sleep 500
          if connection.children.count - session_number_all >= 2 then exit do
         loop
         on error resume next
         Error_number = 1
         for session_number = 0 to session_number_all + 1
              err.clear
              Set session    = connection.Children(int(session_number))
              if err.number > 0 or err.number < 0 then exit for
             if session_number_(session.info.sessionnumber) = 0 then
                Error_number = 0
                exit for
             end if
             'session.findById("wnd[0]").iconify                          'So you can send another SAP session in the task bar.
         next
         on error goto 0
    else
    msgbox "New session is not possible."
    end if
    '------------------------------------------- new session connect -------------------------------------------------------------
    If Error_number = 0 then
    session.StartTransaction (Tcode)
    With session
    .findById("wnd[0]/usr/tabsTAB300/tabpF01/ssubINCLUDE300:SAPMM61R:0301/ctxtRM61R-MATNR").Text = Selection
    .findById("wnd[0]/usr/tabsTAB300/tabpF01/ssubINCLUDE300:SAPMM61R:0301/ctxtRM61R-WERKS").Text = "CHEM"
    .findById("wnd[0]/tbar[0]/btn[0]").press
    .findById("wnd[0]/tbar[1]/btn34").press
    .findById("wnd[0]/tbar[1]/btn35").press
    .findById("wnd[0]/tbar[1]/btn36").press
    Regards,
    ScriptMan
    Edited by: ScriptMan on May 11, 2011 3:08 PM

  • HELP to open database (again)

    Hi, saga continue:
    svrmgr> startup mount;
    Database mounted
    svrmgr> alter database open read only;
    ORA-16005: database requires recovery
    svrmgr> recover database;
    ORA-00283: recovery session canceled due to errors
    ORA-00264: no recovery required
    svrmgr> alter database open; - hang
    Please help to OPEN database!!!!
    Thnaks in advance,
    Andriy Korud, Ukraine

    You can find how to here:
    http://www.bing.com/search?q=close+sync+services+agent
    http://www.bing.com/search?q=what+is+mac+os+x+sync+services
    Mac OS X: Resetting the SyncServices folder - Apple - Support
    http://support.apple.com/kb/TS1627
      Aug 17, 2012 · Choose Reset Sync Services. Click Reset Sync History. Test for the ... Resetting SyncServices resets your Mac OS X User Account's Sync settings and …
    Sync Services: Advanced troubleshooting for contact and calendar ...
    http://support.apple.com/kb/TS2481

  • OrdImage using its own database session?

    Hello,
    I have been searching on the Internet and this forums, but I am unable to find an answer to my question, so I am asking it here: I have noticed that when a user enters to a screen with an OrdImage being displayed in it, the application module opens 2 database sessions instead of one. Furthermore, if I comment the af:media component used to display the OrdImage and I repeat the same test, only one database session is created. So for some reason, the OrdImage is using a separate database session from the rest of the screen.
    Does the OrdImage type really need its own session? Is it possible to make it use the screen's one? Using two database sessions in the same screen is kind of a waste of resources, especially when that screen has a lot of users (like the one where he have the issue).
    Thank you
    Jordi
    PS: by the way, I am using JDeveloper 11.1.1.4.0.

    I have just found [this article|http://jobinesh.blogspot.com.es/2011/07/tips-on-using-afmedia-to-display.html] about OrdImage in ADF, and I see that the pagedef property CustomInputHandler="OrdDomainValueHandler" (which is already set in my application) is used to retrieve some information that cannot be get through the View Object. Is it possible that this property is the responsible for that second connection?
    Jordi

  • Multiple database sessions

    Not sure if this is an expected behavior or not. But while navigating through the Apex, clicking a tab creates a new database session(APEX PUBLIC USER) every time and does not get closed after user logout.
    If I log in to Apex (1 DB session) click any tab (creates one more DB session) and without doing any change if click first tab again, it creates a third DB session for APEX PUBLIC USER. So even if we have just couple of users, application creates 100s of Database sessions.
    I tried to find out, but am I the only one having this issue ?
    It's Apex 4.1.0 with database 10.2.0.5 (EE)
    Edited by: 995569 on 22-Mar-2013 05:37

    Nattu wrote:
    Hi Tufley,
    Add a cookie name to the current authentication scheme in the "session cookie attributes" section in Shared Components>>Authentication Schemes. This will keep the same session for the application, and if you keep the same cookie name for the authentication schema for multiple applications, it will keep the same session across the applications as well.This is not what OP was asking for! and this doesn't stop the user opening the application in a different browser i.e. Firefox, Chrome etc

  • Database Sessions won't disconnect

    Hello friends,
    I'm just wondering if anyone has ever seen programs like SQL Developer and Toad keep openning new sessions over and over without disconnecting them? I have a few developers that will work on sql developer for a few hours and their sessions rise over 100 sessions per developer. They look at various tables and run various queries, but nothing out of the normal. They all drop instantly as soon as they close the application they are working in. Weird I know, but wondering has ever seen this before?
    Thanks
    Luke

    What i did to test it out is I openned up toad and the database. I did a session search by my OS user and seen I had one session to the database. I then ran one of the views inside the database and as it was being populated I was refreshing my view of how many sessions I had. Some of the views would add 16 extra sessions and then drop them all off after the view populated itself. Some would add 16 and keep them open. If I ran one of the views that didn't keep them open after I ran one that did keep them open it would clear the ones that were open from the previous view. If I openned two views in a row that didn't clear themselves out I could have over 30+ sessions because of two views. I looked at the views and they aren't rocket science... I can't seem to find a pattern for the views that keep the sessions open and ones that close them after it loads. It's very weird for sure.

  • Opening Multiple Sessions in Persona

    Hi - We got Persona 2.00 on our EWM environment , we have some reports where on the output user open new window in normal SAP GUI, e.g. hotspot on material number open a new window to display material master. but when we try to do same in persona , it gives error that "Maximum number of sessions reached". We checked in back-end SAP system in  SM04, there is only one session opened for the user. Is there any configuration to allow maximum 6 sessions (like SAP GUI) in Persona, or persona allow only one SAP window to be opened at a time?
    Thanks.
    Harkamal

    For every client session there is a server session associated with it. Such as, when you open five session you will have five server session and it serve queires.
    Regarding paralle queries, depends whether your table is defined as parallel, how many cpu do you have and also parallel parameters.
    Jaffar

  • Increased maximum number of open cursors

    I'm using JDBC with oracle. And I need to send many transactions to database.
    I use Statement.executeQuery("INSERT INTO ..............") and so on!
    But after 300 transaction Oracle send me an error that "increased maximum number of open cursors." How to increase the max number of that cursors or how to close them??
    Thanks in advance!

    1. Use, PreparedStatement instead of Statement.
    2. Use addBatch() and executeBatch() methods.
    3. Don't create statement objects in a loop, just create one object outside the while (or for) loop and use the same object again and again. Most probably the problem may be due to creating excessive object in a llop.
    Hope this helps.
    Sudha

  • ER: Disconnect database session

    Need to add functionality available in SQLDeveloper to disconnect an open JDeveloper database session. I am using the new Oracle JDeveloper 11g preview. I found it!! So you cannot right click on resource pallette and discount but you can from database navigator. Thanks!!
    Message was edited by:
    KeithWilliams

    Thanks Brian. I added to my original post, but it didn;t show up as a second post. So I found the functionality after the original post. Thanks for the reply, 11g looks VERY good!

  • Database Session

    Does anyone use Forms 6i to connect to mySQL?
    In the OCA manual, it says that I can't use OPEN_FORM(form_name, SESSION) to open a form.
    Because it doesn't support separate database sessions.
    So when I open a few forms and then any one form calls the COMMIT_FORM built-in, all forms I opened are committed.
    I would like to commit each form separately. Anyone knows the solution?
    Thanks,
    Peter

    You may want to do some "cowboy debugging" here... Put in some printlns and see what kind of messages you get. Each JDBC driver, app server and connection pooling approach will throw different messages -- oh, and they can vary depending on how the connection was terminated/killed/dropped... So, my recommendation is to put some print statements in the handler and see what gets sent and then account for those situations.
    - Don

Maybe you are looking for

  • Problem with queue timing out?

    Hi all, I am using a queue to send a cluster between parallel while loops (producer-consumer); however sometimes, but not on all occasions, the enqueue in the producer seems to "freeze" or maybe timesout for no reason (no timeout value is wired to th

  • Is it possible to display three different images at a time in three planes(xy,yz,zx) using IMAQ?

    Hi, I am developing a VI in which I need to display three images(two of which are the resulting images after the third one is processed) in three different planes.All these image planes must be at right angles to each other,as the faces of a cube.All

  • Sigsegv - using a JSP/BC4J deployed application

    OC4J: developer's preview & JDev9iRC packaged version Info: accessing a .../xyz.jsp doesn't return, generates a SIGSEGV(11). Question urgent!!!! I'VE SEEN A (RECENT) POST ON THIS BOARD SPECIFICALLY DEALING WITH SIGSEGV ERROR. THE ELEPHANTWALKER MENTI

  • How to uninstall a driver

    You guys have helped this rank amatuer a couple times before and I'm sure hoping you can do it again.  I'm trying to resolve a printer problem where somehow I ended up with the printer listed twice in the control panel and each one has different feat

  • Unlocked an AT&T BB 7290 to use T-Mobile SIM card but now "No Service"

    After my trusty dusty blackberry 7290 quit on me    I found another in "excellant condition" on ebay. It was locked to AT&T but I was able to enter the magic code and unlock it. SIM card is now reporting Network: Inactive (which I understand means th