0% found this document useful (0 votes)
157 views

Oracle Listener Error Code 12500

The document discusses troubleshooting the TNS-12500 error which occurs when the listener fails to start a dedicated server process due to lack of operating system resources. This is usually due to insufficient physical memory, swap space, or file descriptors. The error is accompanied by an OS error code in the listener log which provides clues on the specific resource shortage. Methods are presented to check the OS error code description on different platforms and potentially address the resource issue by increasing virtual memory, reducing Oracle process stack sizes, or decreasing the SGA size.

Uploaded by

sanyahv
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
157 views

Oracle Listener Error Code 12500

The document discusses troubleshooting the TNS-12500 error which occurs when the listener fails to start a dedicated server process due to lack of operating system resources. This is usually due to insufficient physical memory, swap space, or file descriptors. The error is accompanied by an OS error code in the listener log which provides clues on the specific resource shortage. Methods are presented to check the OS error code description on different platforms and potentially address the resource issue by increasing virtual memory, reducing Oracle process stack sizes, or decreasing the SGA size.

Uploaded by

sanyahv
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

[Update 2011-05]

Beginning late 2010, this note is no longer frequently visited, possibly


indicating "massive" deployment of 64-bit Oracle.
TNS/ORA-12500: TNS:listener failed to start a dedicated server process
Simply put, you most likely run out of OS resources, either physical memory or
swap space, or if on UNIX/Linux, also file descriptors (Windows hardly has a
per-process file descriptor restriction[note1]).
Regardless OS, the error should be accompanied by an OS dependent error code in
listener.log. An example (from Windows) is like this:
TNS-12500: TNS:listener failed to start a dedicated server process
TNS-12540: TNS:internal limit restriction exceeded
TNS-12560: TNS:protocol adapter error
TNS-00510: Internal limit restriction exceeded
32-bit Windows Error: 8: Exec format error
The last line is helpful because it tells you the OSD layer reason. Oracle
needs to fix this port-specific "bug".[note2] On Solaris and other
UNIXes/Linux, error 8 is indeed "Exec format error". But on Windows, it's
actually:
C:\>net helpmsg 8
Not enough storage is available to process this command.
Like in several other OSes, "not enough storage" doesn't mean lack of disk
space. It means lack of virtual memory instead, including swap space.
You may think OSD 8 doesn't help because you already guessed it's short on
memory. But sometimes the error does help, like this:
TNS-12500: TNS:listener failed to start a dedicated server process
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
32-bit Windows Error: 54: Unknown error
Windows error 54 is "network is busy". So in this case you could do a little
research on your network. Another example:
TNS-12500: TNS:listener failed to start a dedicated server process
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
32-bit Windows Error: 109: Unknown error
I get this error when I start 9.2 TNS listener to serve a 10g database and
attempt to connect to the 10g database. The fix is simply to use 10g listener.
*********************************************
As I showed, "net helpmsg" is the command you use on Windows to get Windows
error. There's actually a generic way, independent of OS, to get the
description of an OS-dependent error, if you have Perl installed:
perl -e '$^E=8; print $^E' (for UNIX/Linux)
perl -e "$^E=8; print $^E" (for Windows)
But on UNIX, you can also just find the error in errno.h file, like "grep -w 12
/usr/include/sys/errno.h" on Solaris. On Linux, it's /usr/include/asm/errno.h.
If the file path is not obvious, find it with my recinc.pl at
http://yong321.freeshell.org/computer/archive.txt.
*********************************************
On UNIX, you should also check system message log, such as /var/adm/messages on
Solaris, /var/log/messages on Linux (find "default syslog and messages" at
http://bhami.com/rosetta.html). A common error is error 12, which is "#define
ENOMEM 12 /* Not enough core */" on Solaris, where "core" really just means
memory. If you get this error on Solaris, it's possible that /tmp is full
because usage in /tmp takes away swap space. (Nobody should create huge files
in /tmp on Solaris.)
It's not uncommon to get this error on Windows. If you do have enough RAM and
get this error, consider extending the user space of a Windows process virtual
memory from its default 2GB to 3GB by appending /3GB switch to c:\boot.ini
(most likely you already have /fastdetect switch, so just append to that,
separated with a space), then reboot. But this may still be insufficient, and
you do have lots of lots of memory. Then consider PAE (physical address
extension), a.k.a., AWE (address windowing extention). Add /PAE switch to
boot.ini. In either case, you can increase pagefile size to a huge number. Note
that 64-bit Windows doesn't need this kludge. Reference: Metalink Note:225349.1.
If that still doesn't solve the problem, consider reducing stack size inside
oracle.exe and tnslsnr.exe. Backup the exe file and run "orastack oracle.exe
500000" to set the stack reserve size to 500000 bytes (default is 1M). Just
type orastack for help. This way, each Oracle connection (if using dedicated
configuration) uses less memory inside the oracle.exe process. Note that this
doesn't change stack commit size, which remains at 1 memory page size (4K for
most architectures). Stack commit pages gradually increase with usage, up to
reserved size.
If nothing helps, then give up and reduce SGA, or configure shared server
If on UNIX/Linux, also consider DCD, dead connection detection. It
doesn't directly solve the problem of TNS-12500 but helps clean up useless
sessions. (DCD in 8i to 10gR1 on Windows has problems; see Note:285026.1.) If
this is considered, also consider idle_time profile for database users.
Advice of increasing processes parameter is dubious. When you hit that
limit as seen in v$resource_limit, you get ORA-20, not TNS-12500. If the listene
r
blocks connections due to transient connection spike reaching the "processes"
limit, you get TNS-12519 and TNS-12516. See Note:240710.1.
________________
[note1] The theoretical open handle limit for a Windows process is 16 million.
But it could be much lower in reality, perhaps tens of thousand. See
http://blogs.technet.com/markrussinovich/archive/2009/09/29/3283844.aspx
[note2] This Windows error 8 is misinterpreted even in Note:171636.1, but
Note:46001.1 gets it right. I got interested in tracing this error. It looks
like we can't completely blame Oracle. It's Microsoft that gets loose in their
errno.h in an early attempt to show compatibility with UNIX and XENIX. See
http://msdn2.microsoft.com/en-us/library/s37ta3wt.aspx
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B47692
On the other hand, Microsoft warns users (such as Oracle) about these
misleading errors. If you run
cd /d C:\WINDOWS\system32
grep "Exec format error" *.dll 2>nul: | grep ^Binary
you'll find half of dozen files have that string hardcoded, including
crtdll.dll, msvcr71.dll, etc. Oracle's hsbase.dll and hsnav32.dll (and
OsUtils.dll in 10g) also have it.

You might also like