ORA-12519, TNS:no appropriate service handler found
66 Comments Published June 1st, 2007 in Internet, Java, Software, Web Tags: .
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!
66 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
- 8 Trackback on Apr 29th, 2010 at 02:13
- 9 Trackback on Jul 22nd, 2010 at 19:54
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
Categories
Tag Cloud
Android API Bash Bios CSS Development Eclipse Encription Error Handling Font Git Google GWT Hardware How-To HTML Installation iPod Java JavaScript Karmic Linux Lucks MacBook Open Source Opinion OSX Pitfalls Pkg Practices Python Resume Security Software Suspend TDD Testing Tools Top Down Tricks Ubuntu Uninstall Wakup On Lan Web Workaround
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Blog License
Blogs I like
Books on the desk
Friends' Blogs
- Antonio Terreno & Valter Bernardini
- Bruno Bossola
- Daniele Galluccio
- Domenico Ventura
- Ed Schepis
- Fabrizio Gianneschi
- Luca Grulla
- Luigi Zanderighi
- Marcello Teodori
- Mida Boghetich
- Muralidharan Chandrasekaran
- Piero Ricca
- Renzo Borgatti
- Simone Bordet
- Simone Bruno
- 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 :o)
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 :P, 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.
thank you for the tip. it helped me.
When you run out ouf hand(ler)s, you can of course attack new arms and hands oooor you can alternately use connection pooling and use the same two hands you already have to get through your life.
Opening connections for every bowel movement in your java classes isn’t the answer! Repent! .. *sigh*
Of course I was already using a connection pool, as probably all the above people. The problem above occurs even if you use a connection pool. As written, it’s a bug on how oracle manages and monitors processes. When Oracle runs out of connections you get a different error btw, and this is not the case
Thanks Luigi. Using your tip, I was able to resolve the issue by increasing the number of processes.
Thanks for
“ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;
fix too.
You made me happy :)
I had oracle 10g 10.1.0.2.0, i removed it and installed 11g 11.1.0.6.0standard edition, then i exported all the dmp file in my newly created database, but when i run my application server i get an error ora-12519 on application running client machine and at the same time i get error on server maximum processes(%s%) exceeded, when i try to login in sqlplus. I increased it upto 500 but it still not resolved.
thank you very much for this hint. now my code works fine on win2000 and ubuntu.