About

Martin Klier

usn-it.de

Oracle: How to stop a (MTS) dispatcher process – mad behaviour of ALTER SYSTEM

Manually stopping a dispatcher process is one of the things I have to look up each time, since it’s needed not that often. And, the word “dispatcher” does not appear in the command line! 🙂

alter system shutdown immediate 'D000';

where “D000” is the dispatcher process name selected from v$dispatchers or gv$dispatchers. (In the latter case, be careful to issue the stop command on the correct instance!

Furthermore, the command “ALTER SYSTEM SET DISPATCHERS=” has a mad behaviour, if you are using a multi-threaded server setup and you are configuring the DISPATCHERS init parameter in the appropriate way. Let me give you an example (mind to remove the CR/LF, alter system won’t like them):

alter system set dispatchers=
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3000))(dispatchers=1)(SERVICE=TEST)',
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3005))(dispatchers=1)(SERVICE=TEST)',
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3010))(dispatchers=1)(SERVICE=TEST)',
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3015))(dispatchers=1)(SERVICE=TEST)',
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3020))(dispatchers=1)(SERVICE=TEST)'
scope=both sid='SID13';

you will end up with that (created a pfile-from-spfile to evaluate it, since “show parameter” does not show overlong parameter values):

SID13.dispatchers=
'(PROTOCOL=TCP) (SERVICE=COM_SH)',
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3000))(dispatchers=1)(SERVICE=TEST)',
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3005))(dispatchers=1)(SERVICE=TEST)',
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3010))(dispatchers=1)(SERVICE=TEST)',
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3015))(dispatchers=1)(SERVICE=TEST)',
'(address=(partial=true)(protocol=tcp)(host=hostname)(port=3020))(dispatchers=1)(SERVICE=TEST)'

Nice, isn’t it? The ‘(PROTOCOL=TCP) (SERVICE=COM_SH)’ part will start up a default dispatcher with a completely different, dynamically assigned port, in my case it was 30125. And that’s a problem, if there is a firewall blocking everything except the five ports given literally: Occaisionally, the listener will shift a connection to the dispatcher process on the blocked port. Lock. Dead DB link. Boss on the phone.

So tell me why does that happen?
My workaround is, to shut down the instance and provide a correct spfile without any phantasitcs inside.

Regards
Usn

Switch workspace on command line
This site is not tested with Internet Explorer(c) :)

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.