ORA-12519, TNS:no appropriate service handler found
Published by Luigi June 1st, 2007 in Java, Internet, Software, Web
I used to hate Oracle Database (and other Oracle products too) because of it is much more complicated / heavyweight / slow / buggy and full of useless and sometime harmful stuff than needed. Also when you install you can’t remove it without leaving tons of zombie files around, breaking your JVM/Apache/Windows/etc. After an Oracle installation, your system will never be as before. And hey, have you ever seen an “universal installer” more pathetic than the oracle one?
But I see they are finally realizing that, so they released a “no-frills edition” of their database (160MB sized download, 700MB of memory used on my laptop, 1.2GB of disk space. “no frills”? wow! I’ll try to install it on my cellphone) that can be freely used for development and production. With native installer (happy to see that installer in the garbage)
The good news is that “Oracle Database XE is created from the same code base as the Oracle Database 10g product line”, so that you still have - for free! - the same usual Oracle buggy stuff (“varchar 2, the revenge!”, empty string == null, blob/clob limitation to 4k, etc), bugs, and nice useless error messages like
- “ORA-00020: Maximum number of processes (%s) exceeded” (notice the %s)
- “ORA-00904: invalid column name” (now guess which one!)
- “ORA-00942: table or view does not exist” (when you join 96 tables in a query)
- “ORA-00911: invalid character” (when your query is 1 billion character long…)
- “ORA-01722: invalid number” (maybe I typed slevin?)
- …and much more!
But now you have additional bugs due to the “no-frills edition”.
For example this one: when you use your poor Oracle connected application, after some time of activity you get “ORA-12519, TNS:no appropriate service handler found”, and you don’t get any more connection from the db, with SQLExceptions instead. The quick way to solve, is to restart the listener. Not bad uh, for a “proven industry database”, isn’t that?
Googling around I found that this is a bug on how OracleXE monitors processes, and issuing the following command at SQL command line will fix it (after restarting the listener): “ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;”.
Worked for me. This saved me to install Oracle Enterprise on my laptop.
So, let’s run to download this new gem from Oracle and have fun!
57 Responses to “ORA-12519, TNS:no appropriate service handler found”
- 1 Pingback on Jun 14th, 2007 at 15:59
- 2 Pingback on Jul 18th, 2007 at 17:34
- 3 Trackback on Sep 15th, 2008 at 23:35
- 4 Pingback on Sep 17th, 2008 at 06:21
- 5 Pingback on Nov 10th, 2008 at 15:04
- 6 Pingback on Jul 30th, 2009 at 02:03
- 7 Trackback on Aug 24th, 2009 at 16:10
Leave a Reply
Search
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « May | Jul » | |||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | |
Archives
- January 2010 (2)
- December 2009 (1)
- November 2009 (3)
- September 2009 (2)
- August 2009 (4)
- July 2009 (1)
- June 2009 (2)
- May 2009 (4)
- April 2009 (2)
- March 2009 (7)
- February 2009 (5)
- January 2009 (2)
- December 2008 (1)
- November 2008 (8)
- October 2008 (12)
- September 2008 (3)
- August 2008 (2)
- July 2008 (6)
- June 2008 (16)
- May 2008 (2)
- April 2008 (3)
- March 2008 (6)
- October 2007 (1)
- September 2007 (1)
- August 2007 (5)
- July 2007 (6)
- June 2007 (6)
- May 2007 (1)
- March 2007 (1)
- February 2007 (2)
- January 2007 (1)
- December 2006 (2)
- November 2006 (4)
- October 2006 (7)
- September 2006 (1)
- August 2006 (2)
- July 2006 (6)
- June 2006 (3)
- February 2006 (1)
- January 2006 (1)
- December 2005 (5)
- November 2005 (2)
- October 2005 (2)
- September 2005 (7)
- August 2005 (2)
- July 2005 (8)
- June 2005 (12)
Categories
- Books (7)
- Eclipse (10)
- Errors (2)
- Firefox (7)
- Hardware (14)
- Horror Code (8)
- Internet (17)
- Java (85)
- JavaScript (8)
- Life, universe and everything (29)
- Linux (44)
- Mac (18)
- Software (25)
- Speeches and Conferences (8)
- Web (19)
- Windows (16)
Latest
- Syntactic sugar and Java arrays.
- 3G USB Stick on Ubuntu
- Ipod touch with Linux
- Karmic and Luks: USB drive encryption made (almost) easy
- Suspend/Resume in Karmic /2
- Suspend/Resume problem in Ubuntu Karmic 9.10 running on MacBook Pro 5.1
- MacBook International Keyboard and Linux
- Mighty Mouse: reverse horizontal scrolling workaround on Ubuntu Linux 9.04
- Skype 2.1.0.47 beta released, and amd64 packages available!
- Linux RAM Disks
My open source projects
Blog License
Blogs I like
Friends' Blogs
- Antonio Terreno & Valter Bernardini
- Bruno Bossola
- Daniele Galluccio
- Domenico Ventura
- Ed Schepis
- Fabrizio Gianneschi
- Filippo Diotalevi
- JavaJournal.it Blog
- Luca Grulla
- Luigi Zanderighi
- Marcello Teodori
- Mida Boghetich
- Muralidharan Chandrasekaran
- Piero Ricca
- Renzo Borgatti
- Simone Bordet
- Uberto Barbini
- Valvolog
- Webtide blogs (Greg Wilkins & Jan Bartel)
Links








What are you smoking? I use CLOBs larger than 4k every day. It used to be that you had to handle CLOBs using the standard JDBC Clob type like all JDBC manuals tell you to, but these days the convenience direct read as String works too.
:-)
Mikael, check the link
Thanks for the “ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;” fix, I found your blog before the other forums page and was very happy to have my unit tests running again. Got to love the spurious oracle weirdness
I found your page after a lot of searching. How Oracle can do this? I wasted almost a day in searching for this solution to this issue.
Mikael, it works for you because you use a patched driver without knowing it
I stumbled on your blog when I searched “see number of processes in oracle xe”. I been trying to figure out why this is happening and even though I got lot information from other sites (over last 3 days) nothing gave me more relief than to see my problems termed as “BUG(s)”. So its not only Microsoft Monopoly on Bugs. I also got my application running back thanks to your suggestion of “ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;”
Just for Information I was using ASP.NET 2.0 and ODP.Net (2.111.5.10)
Thanks a lot Buddy. It might be that streets in Dallas are getting flooded but I am relaxed now.
a big THANK YOU for this post, it also saved me from the hell that is Oracle’s confusing error messages!
Thank you soooooooo much. If I would not have found your fix it would have cost me days. I’ll spend you a few beers, if you are in zurich once.
Hello Luigi,
friendsforfree brought me here…it’s 8:30PM and finally I have been able to install CS (you know what I am talking about…).
Many thanks for this…and I am sure I will become a frequent reader of your blog!
P.S. What about arranging a beer party someday with friendsforfree in duss?
Cheers,
Giovanni
Thanks for the TNS workaround, will buy you a beer if you make it to Geneva!
Thanks for this, just spent two days fixing after a corrupt database and had to do a complete reinstall of OracleXE and got very frustrated with the ORA-12519 error.
Going to take some headache tablets now and go home
)
Thanks soo much…
You have saved me lots of time.
I appreciate your blog entry.
Regards,
Richard
India
amazing that an product with so much money behind it can have a stupid bug in there product for so many months!!
thanks and nice to read
Hi
I had the same problem and find a quite easy solution: Just use less Connections. So if you instantiate the Connection in a class, lett other classes using a db connection know this class. Add a method like getConnection() to give a reference to the connection to every class needing a db connection. than you create statements, close them and so on, but don’t close the connection! That way heavy traffic, many statements or multithreading won’t be a problem any more.
Regards
I was also getting the “ORA-12519, TNS:no appropriate service handler found” error with Oracle Express. Your fix worked great for me. Thanks for helping me solve this.
Happy to be helpful to you!
Obrigado, você salvou nosso tcc =D
Greetings,
I obtained this error today after an update of NetBeans to version 6.5. Once I added the ojdbc jar to the lib directory and restarted GlassFish, the error went away.
-Michael
Thanks Luigi for the post, now I can run my unit tests.
Thanks google for showing this post on top of the search results for TNS:no appropriate service handler found
Thanks oracle for having the bug in the first place
Great job man! Thank you very much!
OMG!!! i lost the whole day for this unkown bug, and your solution was the answer….i keept looking at my code becose i moved the data base… and the code was fine…. its was oracle O_O!!! DAMM thxs
Hi!
Your blog post has helped me a lot. Thanks!
Now I can still use Oracle 10g XE within some VMware images instead of having to resort to a full blown Oracle 10g.
–
Danai
Worked great!
Probably saved me a day or two of running around completely mad, throwing things by the window, getting mad at my wife, thus eventually divorced, probably alcoholic, out of job, etc…
Saved my life, really
Thanks!
–JP
Good sense of humor and a great fix!
P.S. - Oracle does suck.
Thanks Buddy.. This post was very useful. Solved my issue right away !!
Thanks again !
ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;
don’t worked for me
I’m running a java program in witch I open and close connection
sometimes, when I try opening one the last was not steel closer and the listener refuses to connect
I put a cicle for sleeping before opening and all work
the solution is to use one connection only (reusing it) as suggested by Andree implementing a getConnection metod and reusing it till the end
A connection pool could help reusing the connections, and keeping their number low even if you open/close the connection every time.
Im also facing the problem
“Failed to connect to database: ORA-12519: TNS:no appropriate service handler found (DBD ERROR: OCIServerAttach).”
this problem started recently after we created a new pfile to start up database.
Then we created new spfile also.
As per the comments above I checked my parameter list
both Spfile and Pfile is showing
processes=150
Do I again need to run the query “ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;” ?
I don’t think you need. BTW, if you get the problem, you know how to solve it.
Nooo.. i dont know how to solve it …
I will copy the message from Alert file below.
Alert file
=========
Mon May 04 11:44:05 2009
Process q002 started up but failed with error = 20
Process q002 started up but failed with error = 20
Process q002 started up but failed with error = 20
Process q002 started up but failed with error = 20
Process q002 started up but failed with error = 20
Mon May 04 11:49:18 2009
Process q005 started up but failed with error = 20
Process q005 started up but failed with error = 20
Process q005 started up but failed with error = 20
Process q005 started up but failed with error = 20
Process q005 started up but failed with error = 20
Mon May 04 11:51:02 2009
Private_strands 7 at log switch
Thread 1 advanced to log sequence 44692
Current log# 3 seq# 44692 mem# 0: D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCLJDE\REDO03.LOG
Mon May 04 11:52:31 2009
Errors in file d:\oracle\product\10.1.0\admin\orcljde\udump\orcljde_ora_3800.trc:
ORA-25254: time-out in LISTEN while waiting for a message
ORA-06512: at “SYS.DBMS_AQ”, line 577
ORA-06512: at “SYSMAN.EMD_NOTIFICATION”, line 492
ORA-06512: at line 1
————————————————————————————————
When I checked individual trace file it shows as below
=====================================
Dump file d:\oracle\product\10.1.0\admin\orcljde\bdump\orcljde_ora_4392.trc
Mon May 04 11:02:28 2009
ORACLE V10.1.0.2.0 - Production vsnsta=0
vsnsql=13 vsnxtr=3
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Windows Server 2003 Version V5.2 Service Pack 2
CPU : 4 - type 586, 2 Physical Cores
Process Affinity: 0×00000000
Memory (A/P) : PH:20392M/24575M, PG:27290M/32151M, VA:940M/2047M
Instance name: orcljde
Redo thread mounted by this instance: 1
Oracle process number: 0
4392
Died during process startup with error 20 (seq=1464)
OPIRIP: Uncaught error 20. Error stack:
ORA-00020: maximum number of processes (150) exceeded
You may try to increase the number of processes further (200 or 250 or more), or call the Oracle support. This issue is an old bug on how Oracle is tracing the processes; so it may have a fix now, hopefully.
Hi
You save my life.. I have been spending days and nights just trying to figure out what’s wrong. I tried many different approached but end up failed.
Thank you so much.
Thank Oracle for giving me such a nightmare experience.
Thanks Buddy, that was a great tip!!!!!!
Nice! Couldn’t have figured it out myself.
Thanks, this saved me days of frustration, too. Oracle: so much to hate, so much to pay for the privilege of hating it properly.
Hi,
Im a db qa, i was facing this ORA-12519 error when ever i build a Oracle base, your blog really helps me in fixing this issue without contacting my devl….
Beautiful fix - worked like a charm!
Thanks mate, works like a charm, I was worried why I was getting that exception until I landed up on your blog.
Cheers,
LC
next time your in bucharest, ill buy you some beers too
Works like a champ! Thanks buddy!
The logs did not show the real problem. Once I ran the command, the app server “magically” came to life. I was about to re-install the whole thing. Thanks for the tip.
Thanks for this post. I implemented the change a bit differently:
Edited file:
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/config/scripts/init.ora
added this at the bottom of file:
processes = 150
SCOPE = SPFILE
I then restarted Oracle, and the problem was gone.
I second that Oracle has just about every default set to some wrong value, and it takes hours/days to get it behave. Coming from MySQL, thi sis really annoying.
cheers
Thanks buddy, it solves the my problem
Hi Guys,
Thanks to everyone who has contributed to this blog - you have saved me a great deal of heartache!
Luigi - it looks like you can do a ‘pub crawl’ around the world collecting your free beers! You can have one in Cambridge (UK) too!
Uff! Now my connection pool is working!
Next time in Berlin, …
Hi my spfile already show 150 processes but i still get this error periodically and this error disappears automatically as well.
can i increase those to around 200 or executing 150 processes statement again will stop this error appearing again??
Zahid, you can do that. It’s an Oracle bug, this is just a workaround, until Oracle decides to fix it.
Thanx Luiqi,
I am going to increase process to 200.
Well sorry can’t offer you a beer as i am muslim
, But can offer you something else if u ever visit Lahore, Pakistan
Unbelievable. So here I am in 2010 reading a blog post from 2007, and sure enough the fix works. I thought surely this wouldn’t be applicable 3 years later, because surely the bug/fix/ridiculous incompetence by Oracle would be fixed. Right? Wrong.
Thank you very much.
Thanks a lot. I had to increase to 450 processes before my issue went away, because I an inserting a whole bunch of rows using OpenJPA and why a separate process is spawned for every insert is beyond me.