Too many database connections?

I have a function that gets called repeatedly from inside a loop. The function opens a connection to the database(DriverManager.getConnection) when it is first called, and closes the connection to the database upon completetion. In addition to this, I have several "permanent" connections while the program is running. My question is, how expensive is making these connections? How many connections are too many?
Thanks,
cmp2

(1) Define a class (Say) MyConnection (like):
package general ;
import java.lang.* ;
import java.util.* ;
import java.sql.* ;
public class MyConnection
public boolean connected = false ;
public String user = "" ;
public String password = "" ;
public String URL = "" ;
public Connection theConnection;
public MyConnection() {
public void getConnection(
String parmUser,
String parmPass,
String parmConnection ) {
boolean connDriver = false ;
String connectionDriver = "oracle.jdbc.driver.OracleDriver" ;
String URLfrount = "jdbc:oracle:thin:@" ;
try {
// Make the Connection
Class.forName(connectionDriver);
connDriver = true ;
} catch ( ClassNotFoundException e ) {
messages.add( "Signon Driver ClassNotFoundException: " + e );
if ( connDriver ) {
try {
URL = URLfrount + parmConnection ;
theConnection = DriverManager.getConnection(URL, parmUser, parmPass);
theConnection.setAutoCommit( false ) ;
connected = true ;
user = parmUser.toUpperCase() ;
password = parmPass ;
} catch (SQLException e) {
messages.add( "Signon Error: " + e );
(2) pass this connection from class to class

Similar Messages

  • Too many database connections and configurator logins ?

    Hi,
    We're having some performance and/or stability problem with Oracle Waveset 8.1.1. patch 2.
    I'm not sure what the problems is yet, but two facts got my attention:
    I noticed for too many database connections waiting to be closed on the OS, varying between 600 and 1200 :
    TCP: IPv4
    Local Address Remote Address Swind Send-Q Rwind Recv-Q State
    doesburg.ic.uva.nl.33555 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33556 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33557 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33558 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    etc.
    (doesburg is our Solaris 10 server where the tomcat application server is installed, hopewell is our Oracle 10g database server )
    I also noticed numerous Configurator logins in the audit log, about 10 per second:
    Audit Event Details
    Timestamp 03/15/2011 04:37:05 PM MET
    Subject CONFIGURATOR
    Action Login
    Result Success
    Identity System Type User
    Object Name CONFIGURATOR
    Server DOESBURG.IC.UVA.NL
    Sequence Number No Value
    Interface BPE
    Resource No Value
    AccountId No Value
    Message No Value
    Changes No Value
    Organization Membership Top
    Event Parameters
    Session ID #SESS#15E4CCFDD2645B36:10C191A6:12EB99FCC85:-5A50
    Configurator logins on the BPE interface which we don't use?
    Has anyone seen something like this before? What could cause it?
    Greetings,
    Marijke

    I'm still struggling with this problem. Our database administrator did add some tracing, and we see these type of queries:
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT task.id, task.type, name, :"SYS_B_0", :"SYS_B_1", summary, :"SYS_B_2", :"SYS_B_3", xmlSize, :"SYS_B_4"
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT object.id, object.type, name FROM object WHERE object.type=:"SYS_B_0"
    SELECT tstamp, id, version, changeType FROM orgchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM rolechange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    541 seperate logon sessions by waveset in about 2 minutes.
    Has anyone seen this? What could cause it?
    Greetings,
    Marijke

  • Too many authenticated connections

    I've got a customer with a BT line, sending via mail.btinternet.com.  For the last month or two they've complained that they keep getting asked for their password. 
    I've checked out the customer's system and I can see that it's not a password problem, but the SMTP server is instead coming back with "too many authenticated connections". 
    I can see that a host of BT customers on here are reporting password problems, I would guess that they are experiencing the same issue, that these are not password problems, but SMTP server issues on BT's new mail systems.  The message would suggest that the server is unable to take any more connections so some sort of resource issue at their end.
    Of-course unless you're looking under the bonnet of the SMTP connection, you won't be seeing this message, just the popup asking for your password again. It's not a password issue. If you try the connection multiple times, it will go in the end (when you get a connection that is willing to be accepted by the SMTP server. 
    I've configured the mail client to the letter, as per BT's stated configuration, and like I say, it will work on a percentage of connections. On a good run, you might get 10 out of 10 successes, other times 1 in 3.
    Please let me know if anyone is experiencing the same message.  The message could perhaps be a red-herring of some kind, perhaps not able to successfully negotiate the authentication / encryption using this particular mail client.  The customer is using Mac Mail and there do appear to be quite a few customers referencing Mac's / IOS on this forum, not many Outlook customers complaining.

    Hi Bookanengineer,
    Many thanks for your post, we have been away and asked some questions around this and the view is that this is unlikely to be an SMTP load issue. There is a limit to the number of authenticated connections we allow per user and the password pop ups being seen are more likely to be due to the customer having too many authenticated connections which could also be due to sessions not being closed correctly
    We believe that this is more likely to happen to client users as each time your client connects it opens an authenticated session. If, when you disconnect, the session does not close for whatever reason, the mail server still shows you with a session open. If that happens often you will quickly hit the limit for the number of sessions allowed per customer
    We do however need to eliminate other issues so need examples to further investigate, I appreciate that you are speaking on behalf of one of your customers, but  if you are able to send in any details to us so we can take a look that would be great. You can send in the details using the "Contact The Mods" link found in my profile.
    Thanks
    PaddyB
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • UTL_MAIL --- ORA-30678: too many open connections

    Hello,
    I have a pl/sql package that sends out emails using UTL_MAIL pkg pointing to an Exchange server, an APEX app calls this pkg.. This package used to work fine for months but I recently noticed that some emails are not being sent as expected. The package loops through a set of action items satisfying some conditions and send emails based on that ( this number is expected to grow every day ). I checked the errors log and I found this error:
    ORA-30678: too many open connections
    I think this means that I have to close the connection everytime I send en email, but UTL_MAIL does NOT have a function or a proc to close connections, right ?
    I don't know what causes this error to happen, but I suspect that this started happening right after we re-pointed the UTL_MAIL pkg from a Lotus Notes server to an Exchange server.
    I am also seeing this error:
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    I know where this error comes from (usually a null email id in the FROM or TO field ), but can this be causing the first error to happen ?
    Please advise if you got this error before, is it a bug in oracle 10g as I read in some blog ? or is the second error happening make the Exchange server refuse SMTP connections ???
    Thanks,
    Sam

    Hi Sam,
    seems to be a bug in UTL_MAIL if you ask me, as you are right - there is only /send/, no option to close, so I'd expect this to be done automatically.
    Anyway, though UTL_MAIL is usable for basic mailing, I prefer using a custom mail implementation based on UTL_SMTP. The most important reason is that most mail servers don't work without authentication. And if you have done this once, you can reuse the function/procedure/package as simple as UTL_MAIL. The good news is, that there are several examples published that provide you with the functionality you have in UTL_MAIL at once - with the difference, that you definetly get your connection closed when you expect it to be closed.
    You'll also be able to handle empty addresses. Perhaps this error actually causes UTL_MAIL to "forget" to close the connection, if this exception isn't caught before in order to close an open connection before raising it to the outside.
    One example implementation for using UTL_SMTP can be found [url http://www.morganslibrary.com/reference/pkgs/utl_smtp.html]here
    -Udo

  • ORA-02020: too many database links in use ; but OK with where clause...

    Hello all,
    I have a view called V_MEDGEN_LISTRADIO but I can't run
    SELECT * FROM V_MEDGEN_LISTRADIO
    ORA-02020: too many database links in useThe cause is that we call in the view 5 tables over dblink and the open_links parameter is set to 4.
    What is strange is that when I run this select by adding a where clause then it works!
    SELECT * FROM V_MEDGEN_LISTRADIO WHERE SPRR = 3645;Can someone explain me ? (use of index so all tables are not called ???)
    Thanks

    Explain plan for SELECT * FROM V_MEDGEN_LISTRADIO WHERE SPRR = 3645;
    | Id  | Operation                              | Name            | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop | Inst   |IN-OUT|
    |   0 | SELECT STATEMENT                       |                 |     1 |   244 |    19   (6)| 00:00:01 |       |       |        |      |
    |   1 |  SORT ORDER BY                         |                 |     1 |   244 |    19   (6)| 00:00:01 |       |       |        |      |
    |   2 |   NESTED LOOPS                         |                 |     1 |   244 |    18   (0)| 00:00:01 |       |       |        |      |
    |   3 |    NESTED LOOPS                        |                 |     1 |   218 |    17   (0)| 00:00:01 |       |       |        |      |
    |   4 |     NESTED LOOPS                       |                 |     1 |   188 |    15   (0)| 00:00:01 |       |       |        |      |
    |   5 |      NESTED LOOPS                      |                 |     3 |   384 |    10   (0)| 00:00:01 |       |       |        |      |
    |   6 |       NESTED LOOPS                     |                 |     3 |   186 |     4   (0)| 00:00:01 |       |       |        |      |
    |   7 |        REMOTE                          | SPRR            |     1 |    20 |     2   (0)| 00:00:01 |       |       | DEV10~ | R->S |
    |   8 |        REMOTE                          | MPAT_MF         |     3 |   126 |     2   (0)| 00:00:01 |       |       | DEV10~ | R->S |
    |   9 |       REMOTE                           | SPER_P          |     1 |    66 |     2   (0)| 00:00:01 |       |       | ORAP_~ | R->S |
    |* 10 |      TABLE ACCESS BY GLOBAL INDEX ROWID| DOSSIER_MEDICAL |     1 |    60 |     3   (0)| 00:00:01 | ROWID | ROWID |        |      |
    |* 11 |       INDEX RANGE SCAN                 | DOSMED_MPR_IDX2 |     2 |       |     1   (0)| 00:00:01 |       |       |        |      |
    |  12 |     REMOTE                             | MEP             |     1 |    30 |     2   (0)| 00:00:01 |       |       | ORAP_~ | R->S |
    |  13 |    REMOTE                              | SSV             |     1 |    26 |     1   (0)| 00:00:01 |       |       | ORAP_~ | R->S |
    Predicate Information (identified by operation id):
      10 - filter("DM"."EXAM_TYPE"='TELEM')
      11 - access("DM"."MPR"="P"."SPER")
    Remote SQL Information (identified by operation id):
       7 - SELECT "SPRR","MNEMO" FROM "SPRR" "MP" WHERE "SPRR"=3645 (accessing 'DEV10_DBLK' )
       8 - SELECT "SPAT","DU","RMPB","SPRR_MF","AU" FROM "MPAT_MF" "MF" WHERE "SPRR_MF"=3645 AND NVL("AU",:1+1)>=:2 AND
           "RMPB"='PRINC' AND "DU"<=:3 (accessing 'DEV10_DBLK' )
       9 - SELECT "SPER","NOM","PRENOM","DTE_NAI" FROM "SPER_P" "P" WHERE "SPER"=:1 (accessing 'ORAP_DBLK' )
      12 - SELECT "MSJ","MEPNO_SEQ","SSV_OU_PAT_SEJOURNE" FROM "MEP" "MEP" WHERE :1="MSJ" AND :2="MEPNO_SEQ" (accessing 'ORAP_DBLK' )
      13 - SELECT "SSV","LIB_1" FROM "SSV" "SSV" WHERE :1="SSV" (accessing 'ORAP_DBLK' )Explain plan for SELECT * FROM V_MEDGEN_LISTRADIO
    Plan hash value: 3820716840
    | Id  | Operation                                | Name                  | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop | Inst   |IN-OUT|
    |   0 | SELECT STATEMENT                         |                       |     7 |  1708 |   771   (1)| 00:00:10 |       |       |        |      |
    |   1 |  SORT ORDER BY                           |                       |     7 |  1708 |   771   (1)| 00:00:10 |       |       |        |      |
    |   2 |   NESTED LOOPS                           |                       |     7 |  1708 |   770   (1)| 00:00:10 |       |       |        |      |
    |   3 |    NESTED LOOPS                          |                       |     7 |  1568 |   763   (1)| 00:00:10 |       |       |        |      |
    |   4 |     NESTED LOOPS                         |                       |     7 |  1386 |   756   (1)| 00:00:10 |       |       |        |      |
    |   5 |      NESTED LOOPS                        |                       |     7 |  1176 |   742   (1)| 00:00:09 |       |       |        |      |
    |   6 |       NESTED LOOPS                       |                       |   194 | 24444 |   414   (1)| 00:00:05 |       |       |        |      |
    |   7 |        TABLE ACCESS BY GLOBAL INDEX ROWID| DOSSIER_MEDICAL       |   194 | 11640 |    23   (0)| 00:00:01 | ROWID | ROWID |        |      |
    |*  8 |         INDEX RANGE SCAN                 | DOSMED_EXAM_TYPE_IDX2 |   194 |       |     1   (0)| 00:00:01 |       |       |        |      |
    |   9 |        REMOTE                            | SPER_P                |     1 |    66 |     2   (0)| 00:00:01 |       |       | ORAP_~ | R->S |
    |  10 |       REMOTE                             | MPAT_MF               |     1 |    42 |     2   (0)| 00:00:01 |       |       | DEV10~ | R->S |
    |  11 |      REMOTE                              | MEP                   |     1 |    30 |     2   (0)| 00:00:01 |       |       | ORAP_~ | R->S |
    |  12 |     REMOTE                               | SSV                   |     1 |    26 |     1   (0)| 00:00:01 |       |       | ORAP_~ | R->S |
    |  13 |    REMOTE                                | SPRR                  |     1 |    20 |     1   (0)| 00:00:01 |       |       | DEV10~ | R->S |
    Predicate Information (identified by operation id):
       8 - access("DM"."EXAM_TYPE"='TELEM')
    Remote SQL Information (identified by operation id):
       9 - SELECT "SPER","NOM","PRENOM","DTE_NAI" FROM "SPER_P" "P" WHERE :1="SPER" (accessing 'ORAP_DBLK' )
      10 - SELECT "SPAT","DU","RMPB","SPRR_MF","AU" FROM "MPAT_MF" "MF" WHERE NVL("AU",:1+1)>=:2 AND "RMPB"='PRINC' AND "DU"<=:3 AND
            :4="SPAT" (accessing 'DEV10_DBLK' )
      11 - SELECT "MSJ","MEPNO_SEQ","SSV_OU_PAT_SEJOURNE" FROM "MEP" "MEP" WHERE :1="MSJ" AND :2="MEPNO_SEQ" (accessing 'ORAP_DBLK' )
      12 - SELECT "SSV","LIB_1" FROM "SSV" "SSV" WHERE :1="SSV" (accessing 'ORAP_DBLK' )
      13 - SELECT "SPRR","MNEMO" FROM "SPRR" "MP" WHERE :1="SPRR" (accessing 'DEV10_DBLK' )

  • ORA-02020 too many database links

    Hello,
    I'm getting the ORA-02020 too many database links error in my Apex application. This error occurs when I run an interactive report in a page. There are 21 pages and 7 database links in the application. Each page has one interactive report that references one database link in the region source.
    The database links are referenced in each page as follows: database link1 (page 1); database link2 (pages 2 and 3); database link3 (pages 4-7), database link4 (pages 8-15); database link5 (pages 16-18); database link6 (pages 19); and database link7 (pages 20-21). Each database link is referenced to separate schemas in one remote Oracle database.
    I tried to eliminate the error by setting the open_links and open_links_per_instance parameters in the init.ora file of the remote and XE databases to 100 then restarted the both databases. This solution did not work. I created separate Application Processes from the Shared Components to close each database link by implementing the following:
    Click on Shared Components&gt; Logic &gt; Application Processes &gt; Create &gt;
    Name: CLOSE_LINK1
    Sequence: 1
    Point: On Load: Before Header (page template header)
    Type: PL/SQL Anonymous Block
    Process Text: execute immediate 'ALTER SESSION CLOSE DATABASE LINK LINK1';
    Error Message: Database Link Error
    When I run the application now, the ORA-02081: database link is not open error appears.
    Please help anyone! I know someone has experienced these same errors.
    Thanks,
    Ms. H

    Joel,
    Thank you for your quick response. For clarification purposes, could you provide samples for 1) issuing the CLOSE DATABASE LINK and catching the exception; and 2) querying from V$DBLINK prior to issuing the CLOSE DATABASE LINK from the Shared Components &gt; Logic &gt; Application Processes?
    Lets assume the following query with a database link in the region source is referenced for Page 1.
    Page 1 - Employee Listing
    Region Source:
    select ename, job, hiredate
    from scott.emp@link1
    Lets assume the following Application Processes from the Shared Components is referenced to close the database link:
    Click on Shared Components&gt; Logic &gt; Application Processes &gt; Create &gt;
    Name: CLOSE_LINK1
    Sequence: 1
    Point: On Load: Before Header (page template header)
    Type: PL/SQL Anonymous Block
    Process Text: execute immediate 'ALTER SESSION CLOSE DATABASE LINK LINK1';
    Error Message: Database Link Error
    My thoughts are to do the following:
    1. Log in SQL*Plus as SYS
    SQL&gt; grant select to v_$dblink to scott;
    2. In Apex, goto Shared Components&gt; Logic &gt; Application Processes and add the following queries in the Process Text:
    Name: CLOSE_LINK1
    Sequence: 1
    Process Text:
    select db_link from v$dblink;
    execute immediate 'ALTER SESSION CLOSE DATABASE LINK LINK1';
    3. Catch the exception???
    Your assistance is greatly appreciated. :8}
    Ms. H

  • Help needed : javamail Too many simultaneous connections

    Hello
    i'm using javamail to develop a webmail
    i've created a service Class , and all things works well , but i have a serious problem when i browse my webmail ( viewing folders: inbox / spam / etc or messages) i get an error saying :
    Too many simultaneous connections. (Failure)
    i know that the imap server dosen't support more than 10 simultaneous connections.
    But i can't say to users using my webmail to do not a lot of actions !!! , and also when i use thunderbird for example it works fine without errors even if i do a lot of actions/connections
    How can i solve that problem ?
    Thanks
    A1 OK [email protected] authenticated (Success)
    A2 CAPABILITY
    * CAPABILITY IMAP4rev1 UNSELECT LITERAL+ IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1
    A2 OK Success
    A3 SELECT INBOX
    DEBUG: no connections in the pool, creating a new one
    * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
    * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
    * OK [UIDVALIDITY 616267767]
    * 7 EXISTS
    * 0 RECENT
    * OK [UNSEEN 1]
    * OK [UIDNEXT 90]
    A3 OK [READ-WRITE] INBOX selected. (Success)
    A4 STORE 1 +FLAGS (\Seen)+
    +* OK Gimap ready for requests from MyIP 24if2631473eyx.55+
    +A0 CAPABILITY+
    +* 1 FETCH (FLAGS (\Seen))+
    +A4 OK Success+
    +* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XLIST CHILDREN XYZZY+
    +A0 OK Thats all she wrote! 24if2631473eyx.55+
    +A1 LOGIN myemail mypwd+
    +A1 OK [email protected] authenticated (Success)+
    +A2 CAPABILITY+
    +* CAPABILITY IMAP4rev1 UNSELECT LITERAL+ IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1
    A2 OK Success
    A3 SELECT INBOX
    * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
    * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
    * OK [UIDVALIDITY 616267767]
    * 7 EXISTS
    * 0 RECENT
    * OK [UNSEEN 1]
    * OK [UIDNEXT 90]
    A3 OK [READ-WRITE] INBOX selected. (Success)
    A4 STORE 1 +FLAGS (\Seen)
    * OK Gimap ready for requests from MyIP 23if2388548eya.46
    A0 CAPABILITY
    * 1 FETCH (FLAGS (\Seen))
    A4 OK Success
    * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XLIST CHILDREN XYZZY
    A0 OK Thats all she wrote! 23if2388548eya.46
    A1 LOGIN custom.infoma1 mypwd
    A1 NO [ALERT] *Too many simultaneous connections. (Failure)*
    A2 LOGOUT
    * BYE Logout Requested 23if2388548eya.46
    A2 OK Quoth the raven, nevermore... 23if2388548eya.46
    A4 CLOSE
    A4 CLOSE

    Thunderbird supports disconnected or offline operation. It can disconnect from the server and then reconnect later
    and synchronize its state, so that you never know it was disconnected.
    You can do that too, but it's a lot of work.
    For webmail, the simplest approach is usually to have only one folder open at a time for each user.
    If your IMAP server is limiting you to 10 connections total, across all users, get a new IMAP server.

  • ORA-30678: too many open connections

    Hi,
    I executed this procedure..
    CREATE OR REPLACE procedure
    TRY.e_mail_message
    from_name in varchar2,
    to_name in varchar2,
    subject in varchar2,
    message in varchar2
    is
    l_mailhost VARCHAR2(64);
    l_from VARCHAR2(64);
    l_to VARCHAR2(64);
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    l_mail_conn UTL_SMTP.connection;
    mesg VARCHAR2( 4000 );
    BEGIN
    select a.SERVER into l_mailhost from email_setting a where a.SERVER is not null;
    select a.USERNAME into l_from from email_setting a where a.SERVER is not null;
    l_from := from_name;
    --UTL_SMTP.open_data(l_mail_conn);
    dbms_output.put_line('email test ');
    mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
    'From: <'||l_from||'>' || crlf ||
    'Subject: ' ||subject|| crlf ||
    'To: '||to_name || crlf || '' || crlf ;
    mesg:=mesg||message;
    dbms_output.put_line(mesg);
    l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
    UTL_SMTP.helo(l_mail_conn, l_mailhost);
    UTL_SMTP.mail(l_mail_conn, l_from);
    UTL_SMTP.rcpt(l_mail_conn, to_name);
    UTL_SMTP.data(l_mail_conn, mesg);
    UTL_SMTP.quit(l_mail_conn);
    exception
    when others then dbms_output.put_line(sqlerrm);
    END;
    However, email could not be sent to recipient. Below is the error message.
    Sending email to subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
    call email_mssg cmd 3
    email test
    Date: 23 June 10 15:11:50
    From: <>
    Subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
    To: [email protected]
    Please Settle Outstanding Bil for your Invoice No: CA/01062010/555. Thank you
    ORA-30678: too many open connections
    Below is the username I keyed in the email_setting table, with reference to the select username statement from the procedure as above.
    username in email_setting => [email protected]
    I also tried key in as '[email protected]' but still not working.
    Could someone suggest any solution? Thanks..

    Mr. Saubhik,
    Yes, no data passed for the From: as shown from the dbms output error message shown below:
    Sending email to subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
    call email_mssg cmd 3
    email test
    Date: 23 June 10 16:15:04
    From:
    Subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
    To: [email protected]
    Please Settle Outstanding Bil for your Invoice No: CA/01062010/555. Thank you
    ORA-29279: SMTP permanent error: 501 5.1.7 Invalid address
    I am clueless how to settle this. I don't want to hard code the sender's email address. Please help. Thank you.

  • SMTP Send Mail - too many authenticated connection...

    Using Outlook on a MAC, and within this last week I have started to get this error when sending mail. I have read all the forum posts and help documents on this issue and ensured that my settings are as described and yet I am still having this problem.
    Should I be switching to IMAP to avoid this problem, and if so how do I do that without losing all my SMTP downloaded email?
    Thanks for any insight - it is causing me real issues now as I'm job hunting and can't reply to job emails!!!!

    Yes same problem for me. In the last three days, or so, I will get the random "too many authenticated connections" message. I have just phoned BT twice this afternoon and had great trouble understanding both Indian guys. One suggested he's fixed it by adjusting things at BT to accept "S Client Mail", whatever that means! That however didn't fix it. The second suggested I needed to reset password (easy option that one), until I pointed out that I am having no trouble with password use on the BT webmail page or through my phone. He then said I'd have to reload Outlook to solve the problem. Yeah right, like I'm gonna loose all my emails, settings and calendar to satisfy his theory of "if it doesn't work then reload it". There is clearly a server problem somewhere and OH, how I would love to speak to someone, (anyone), at BT who actually knows what they are talking about from a network/server angle. Anyone worth their salary in networks could trace my activity online and find out what was going on and why it was failing.
    Setting POP3 and all others checked by BT as being correct.

  • ORA-30678: too many open connections with UTL_MAIL.send

    I'm have just recently started getting the ORA-30678: too many open connections error while calling the UTL_MAIL.send procedure to send emails via a pl/sql package. The call is made within a loop and there can be a significant number of calls made to this procedure. In fact, I received this error over 1400 times within the last three days. This was previously working until I made a change to the processing which now results in a larger number of emails/calls to this procedure. I don't see any documentation on how (or if) I can close the connection with UTL_MAIL.
    I'm using Oracle 11g. Any insight would be much appreciated.
    Thanks,
    Teri

    Looks like a bug possibly, check out this MOS Note:
    Ora-30678: Too Many Open Connections From UTL_MAIL [ID 788442.1]
    The bug note says it was fixed in 11.2. Not sure which version of 11 you are running.
    Edited by: Centinul on Apr 26, 2010 2:07 PM

  • I can´t send or receive emails theres a message Too many simultaneous connections. (Failure)

    What can I do if theres a message that says Too many simultaneous connections. (Failure) an error in IMAP conection
    I can´t send or receive any emails

    Hi monic,
    I'm sorry to hear you are having mail issues on your Mac. I'm a bit unclear exactly which version of OS X you are currently using, but if you continue to have issues sending or receiving emails, you may find the troubleshooting steps outlined in the following article helpful:
    OS X Mail: Troubleshooting sending and receiving email messages - Apple Support
    Regards,
    - Brenden

  • Too Many open connections. UTL_HTTP

    I am submiiting The URL for multiple times.
    So i am getting the too many open connections error. How to avoid the code.
    For your reference i have attached my code.
    DECLARE
      req   UTL_HTTP.REQ;
      resp  UTL_HTTP.RESP;
      value VARCHAR2(1024);
      url   VARCHAR2(4000);
      OPT   varchar2(1000);
      CURSOR MOB IS SELECT MOB FROM MOBILE_NUMBER;
    BEGIN
    -- UTL_HTTP.SET_PROXY('proxy.my-company.com', 'corp.my-company.com');
    FOR I IN MOB
    LOOP
    DBMS_OUTPUT.PUT_LINE(I.MOB);
    URL:='http://www.meru.co.in/wip/sendsms?username=11|'&'||'password=11|'&'||'to='||I.MOB||'&'||'message=this%20is%20shanmugam';
    DBMS_OUTPUT.PUT_LINE(URL);
      req := UTL_HTTP.begin_REQUEST(url);
      UTL_HTTP.SET_HEADER(req, 'User-Agent', 'Mozilla/4.0');
      resp := UTL_HTTP.GET_RESPONSE(req);
      UTL_HTTP.READ_LINE(resp, value, TRUE);
        DBMS_OUTPUT.PUT_LINE(value);
      END LOOP;
      UTL_HTTP.END_RESPONSE(resp); 
    EXCEPTION
      WHEN UTL_HTTP.END_OF_BODY THEN
        UTL_HTTP.END_RESPONSE(resp);
    END;how to close the connection for each record????
    Can anyone help me out in this??
    Thanks in Advance.
    Cheers,
    Shan

    Move UTL_HTTP.END_RESPONSE(resp); inside the loop. I mean
    UTL_HTTP.END_RESPONSE(resp);
    END LOOP;

  • Portal creates too many database sessions. fix doesn't work!!

    Oracle Database 9i, Application Server 9iAS,
    Operating System SUSE Linux 7.2
    CPU - Athlon 1400
    Ram - 1GB
    There is a modification for the http server that aims to eliminate a problem on unix that causes the database to create too many sessions. The script can be found at
    http://portalstudio.oracle.com/servlet/page?_pageid=1787&_dad=ops&_schema=OPSTUDIO
    However the script fails to work. The http server is on port 80 with the redirect on port 7778. However going to http://myhost/pls/ results in a server error - connection refused. Is it possible that there may be an error in the script.
    Thanks in anticipation

    ok so my sound is ok now I can check that off of the list... I just looked around and found some external USB speakers that work just right. My built in computer speakers are just not the best quality.
    As for the microphone, I still haven't been able to find out what is causing it to not work. I notice that it isn't actually broken since if I make a really loud noise right next to the input it will register a little but only a little bit.
    $ arecord -L
    null
    Discard all samples (playback) or generate zero samples (capture)
    pulse
    PulseAudio Sound Server
    default
    Default ALSA Output (currently PulseAudio Sound Server)
    sysdefault:CARD=Intel
    HDA Intel, ALC269 Analog
    Default Audio Device
    front:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    Front speakers
    surround40:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    4.0 Surround output to Front and Rear speakers
    surround41:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    $
    here is some additional information about my sound. Also, when I open alsamixer, I find that when I go to "select sound card"(F6) I see default and HDA Intel. If the default is pulseaudio, then is it possible that pulseaudio is causing the problem?

  • Tomcat Establishing Too Many DataSource Connections?

    I've created a Global JNDI resource in Tomcat's server.xml file pointing to a MS SQL database. In the ResourceParams I've set the maxActive connections to 10 and maxIdle connections to 5. Everything works great, except one particular method uses 50-75 connections when querying the database! (This is identified using sp_who in sql query analyzer.)
    This method walks through a recordset finding the parent record of a given child record. One connection object is used and it creates a new prepareStatement and resultset each iteration. I removed error handling to simply this post.
    public String getBusiness(String parent, String bus, Connection con) {
              String business = bus;
              String sql = "{call myDatabase..Business (?,?)}";
              pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
              pstmt.setInt(1, 0);
              pstmt.setString(2, parent);
              rs = pstmt.executeQuery();
              while(rs.next()) {
                   if(rs.getInt(1) > 0 && rs.getInt(1) != 99999999) {                         business = getBusiness(rs.getString(1), business, con);
                   }else{
                        business = rs.getString(2);
         return business;
    **My question is: if maxActive connections is set to 10, how are there 50-75 connections begin made from tomcat to the database?
    Your help is greatly appreciated!
    Thanks
    jmorrison42

    while(rs.next()) {
    if(rs.getInt(1) > 0 && rs.getInt(1) != 99999999) { business = getBusiness(rs.getString(1), business, con);
    }else{
    business = rs.getString(2);
    LOOK at that.. in a result set you are trying to call the getBusiness recursively.. so the current connection/resultset is not yet closed and it cannot use the same connection to get the next resutset (of recursive call).
    why dont use use a select inside select in database side.. ?..

  • Plugin opens too many Http connections

    Hi Java gurus,
    My applet sends many POST requests (10-20 per second) one by one (not concurrently) to an IIS server application, using HttpUrlConnection. When I run it with AppletViewer, I see (with netstat) a single HTTP connection which is re-used for each new POST.
    However, when I run it under IE with Plugin 1.4.0 or 1.4.1, netstat shows that each POST creates a new connection. After the response arrives, this connection goes to TIME_WAIT state for several minutes and the next POST opens a brand new connection. After some time I see hundreds of TIME_WAIT connections.
    I got an advice (from experts-exchange) to force using sun.net rather than sun.plugin, thus avoiding the apparent plugin bug. I do it as follows:
    URL.setURLStreamHandlerFactory(null);
    sysProperties.setProperty("java.protocol.handler.pkgs", "sun.net.www.protocol");
    Now a single connection is opened and re-used for all POSTs, but the applet is not aware that it runs under a plugin or browser, e.g., it doesn't recognize the IE proxy settings.
    My questions:
    1. Is this a known plugin bug? (I could not find any similar bug in Web).
    2. Are there other potential problem with my workaround?
    3. Are there other solutions to my problem?
    Thanks in advance
    Sruli Ganor

    I am facing the same problem...

Maybe you are looking for

  • NoClassDefFoundError: if project created in IDE...

    First let me say that I'm a total Java beginner. I know C/C++ pretty well, so I'm not a programming newbie. I don't know what the deal with this is, but it's driving me batty. Not wanting to use notepad because of its lack of assistance, I've tried u

  • Where to give the Employees confirmation date....

    Hi experts... Here im facing a problem when running a z report. For some employees the system is not picking the confirmation dates. Here im checking the contract elements infotype 0016..here everything is fine as 12 months... Why the system is not p

  • Rotate display?

    I just need a simple script to rotate my MAIN DISPLAY ONLY clockwise, and then another script to restore it to standard orientation. I found this great script which does most of what I want, but it does it to BOTH displays (I have two displays but I

  • Error on Micro SD While taking picture. Micro SD Undetected.

    Hello this is my first time using a Micro SD, my last phone was Xperia S. While I was taking picture I got an error, my phone does not detect my Micro SD and also my Laptop can't detect it. It's a 32GIG Transcender. My phone is fine but no more Micro

  • Passing an Integer through URL

    I have two pages, MasterPG and DetailsPG both have regions which have a field SerialNo (Number). in processFormRequest in CO of MasterPG, I'm calling DetailsPG pageContext.forwardImmediately("OA.jsp?page=/abcd/oracle/apps/per/selfservice/xxTest/webui