What is the setting for processes in the database? What is your per-process-file 
descriptor limit?

If you are on Solaris following may apply to you ...

<Solaris only>

Problem Description 
------------------- 
You have a JDBC program connecting to the database. This program may run standalone 
or on a webserver. This program opens many simultaneous connections to the database. 
The following error occurs on or near the 257th connection: 
java.sql.SQLException: ORA-12154: TNS:could not resolve service name 
All of the following symptoms apply: 
- Solaris OS 
- Oracle JDBC/OCI driver 
- ORA-12154 Error 
- Failure occurs on 257th connection between JDBC client and Oracle server. 
- Same program works on a non-Solaris OS, exceeding the 257th connection. 
Solution Description 
-------------------- 
This is a known Solaris bug (1084772). Contact Sun for further information and/or 
possible patch. As a workaround, you can hardcode the full tns description in the 
JDBC/OCI connection string. This avoids the need to read the tnsnames.ora file. 
This will not eliminate the problem, but should free up more file descriptors for 
your use, thus deferring failure until later. 
jdbc:oracle:oci8:@(description=(address=(host=pepper)(protocol=tcp)(port=1521))(connect_data=(sid=ORCL)))
 
Explanation 
----------- 
The OS file descriptor limit is being reached. Thus, the tnsnames.ora file cannot 
be read to resolve the tns alias suppled to the connection string. 
References 
---------- 
http://sunsolve.sun.com 
bug (1084772) Summary: Although the limit for file descriptors is 1024, you  cannot 
open more than 256 fd's using stdio.h. (This is not an Oracle bug.) 
note:94091.1 Example: Identifying Connection String Problems in JDBC 
bug:777647 When Opening > 253 File Descriptors and Then Connection 
bug:2060739 ORA-12154 After Creating 220+ Connections Using Thick (OCI8) JDBC Driver 

</solaris only>

Raj
--------------------------------------------------------------------------------
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !


-----Original Message-----
Sent: Tuesday, December 16, 2003 2:39 PM
To: Multiple recipients of list ORACLE-L


Dear Gurus,

We are getting the following error if we try to create more than 256 connections from 
the same client. The problem is easily reproducible bt writing simple java program and 
keep creating connections(do not close it).

Did anyone encounter this kind of issue and how did you solve it?

Exception in thread "main" java.sql.SQLException: ORA-12154: TNS:could not resolve 
service name
 
        at java.lang.Throwable.fillInStackTrace(Native Method)
        at java.lang.Throwable.fillInStackTrace(Compiled Code)
        at java.lang.Throwable.<init>(Compiled Code)
        at java.lang.Exception.<init>(Compiled Code)
        at java.sql.SQLException.<init>(SQLException.java:43)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
        at oracle.jdbc.oci8.OCIDBAccess.check_error(Compiled Code)
        at oracle.jdbc.oci8.OCIDBAccess.logon(Compiled Code)
        at oracle.jdbc.driver.OracleConnection.<init>(Compiled Code)
        at oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled Code)
        at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
        at java.sql.DriverManager.getConnection(Compiled Code)
        at java.sql.DriverManager.getConnection(Compiled Code)
        at j1.main(Compiled Code)

Thanks in advance

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


**************************************************************************************
This e-mail message is confidential, intended only for the named recipient(s) above 
and may contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank you.
**************************************************************************************5
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jamadagni, Rajendra
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to