From: brhurley on
Background: Fresh install of oracle 10g on WindowsXP for a development
enviroment. This computer is a laptop that moves between domains/ips.
I used DBCA to create the database while I was attached to my work IP.
This instance is setup in a dedicated server mode. Everything worked
just fine at work but when I got home I could not connect using connect
<user>/<pass>@devtest returning ORA-12518.
I can connect using connect <user>/<pass>.
Here is the related files along with the listener trace.

listener.ora
----------------
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\Server\Oracle\10g)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = devtest)
(ORACLE_HOME = C:\Server\Oracle\10g)
(PROGRAM = devtest)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)

tnsnames.ora
-------------
DEVTEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = devtest)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

listener.log
------------
05-OCT-2005 09:42:51 *
(CONNECT_DATA=(SERVICE_NAME=devtest)(CID=(PROGRAM=C:\Server\Oracle\10g\BIN\sqlplusw.exe)(HOST=mylaptop)(USER=hurley)))
* (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=3711)) * establish *
devtest * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error

listener.trc (Truncated for space)
------------
....
snlinGetNameInfo: entry
snlinGetNameInfo: Using numeric form of host's address 127.0.0.1
snlinGetNameInfo: exit
nttaddr2bnd: Resolved to 127.0.0.1
nttaddr2bnd: exit
nsglbgetRSPidx: entry
nsglbgetRSPidx: returning ecode=0
nsglbgetRSPidx: exit
nsglb: entry
nsglb: exit
nsbequeath: entry
nsc2addr: entry
nsc2addr:
(ADDRESS=(PROTOCOL=beq)(PROGRAM=devtest)(ENVS='ORACLE_HOME=C:\Server\Oracle\10g,ORACLE_SID=devtest')(ARGV0=devtestdevtest)(ARGS='(LOCAL=NO)'))
nlpcaini: entry
nlpcaini: prg = devtest
nlpcaini: arg[0] = devtestdevtest
nlpcaini: arg[1] = (LOCAL=NO)
nlpcaini: env[0] = ALLUSERSPROFILE=C:\Documents and Settings\All Users
nlpcaini: exit
nsc2addr: normal exit
nsbeqaddr: entry
nsbeqaddr: connecting...
nsopen: entry
nsmal: entry
nsmal: 736 bytes at 0xe09008
nsmal: normal exit
nsopenmplx: entry
nsmal: entry
nsmal: 1644 bytes at 0xdc2c00
nsmal: normal exit
nsiorini: entry
nsbal: entry
nsbgetfl: entry
nsbgetfl: normal exit
nsbal: normal exit
nsiorini: exit (0)
nscpxget: entry
nscpxget: normal exit
nsopenalloc_nsntx: nlhthput on mplx_ht_nsgbu:ctx=e09008, nsntx=dc2c00
nsopenmplx: normal exit
ntpcon: entry
ntpcon: toc = 6
ntpcon: exit
nsopen: opening transport...
ntpcon: entry
ntpcon: toc = 1
sntpcall: entry
snlpcss: entry
snlpcss: Unable to create devtest process, error 2.
sntpcall: exit
ntpcon: exit
nserror: entry
nserror: nsres: id=0, op=65, ns=12560, ns2=0; nt[0]=530, nt[1]=2,
nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
nsopen: unable to open transport
nsiocancel: entry
nsiofrrg: entry
nsbfr: entry
nsbaddfl: entry
nsbaddfl: normal exit
nsbfr: normal exit
nsiofrrg: exit
nsiocancel: exit
nsopenfree_nsntx: nlhthdel from mplx_ht_nsgbu, ctx=e09008 nsntx=dc2c00
nsiocancel: entry
nsiofrrg: entry
nsiofrrg: exit
nsiocancel: exit
nsmfr: entry
nsmfr: 1644 bytes at 0xdc2c00
nsmfr: normal exit
nsmfr: entry
nsmfr: 736 bytes at 0xe09008
nsmfr: normal exit
nsopen: error exit
nsbeqaddr: error exit
nsbequeath: error exit
nsgcses: Bequeath handoff errors: ns=12560, ns2=0.
nsglrespond: entry
nsrefuse: entry
nsdo: entry
nsdo: cid=3, opcode=67, *bl=119, *what=10, uflgs=0x0, cflgs=0x3
nsdo: rank=64, nsctxrnk=0
nsdo: nsctx: state=2, flg=0x4004, mvd=0
nsdo: gtn=237, gtc=237, ptn=10, ptc=2011
nscon: entry
nscon: sending NSPTRF packet
nspsend: entry
nspsend: plen=131, type=4
nsiosend: entry
nttmwr: entry
nttwr: entry
snttcallback: entry
snttcallback: exit
nttwr: socket 304 had bytes written=131
nttwr: exit
nsiosend: exit (0)
nspsend: packet dump
nspsend: 00 83 00 00 04 00 00 00 |........|
nspsend: 22 00 00 77 28 44 45 53 |"..w(DES|
nspsend: 43 52 49 50 54 49 4F 4E |CRIPTION|
nspsend: 3D 28 54 4D 50 3D 29 28 |=(TMP=)(|
nspsend: 56 53 4E 4E 55 4D 3D 31 |VSNNUM=1|
nspsend: 36 39 38 36 39 35 36 38 |69869568|
nspsend: 29 28 45 52 52 3D 31 32 |)(ERR=12|
nspsend: 35 31 38 29 28 45 52 52 |518)(ERR|
nspsend: 4F 52 5F 53 54 41 43 4B |OR_STACK|
nspsend: 3D 28 45 52 52 4F 52 3D |=(ERROR=|
nspsend: 28 43 4F 44 45 3D 31 32 |(CODE=12|
nspsend: 35 31 38 29 28 45 4D 46 |518)(EMF|
nspsend: 49 3D 34 29 29 28 45 52 |I=4))(ER|
nspsend: 52 4F 52 3D 28 43 4F 44 |ROR=(COD|
nspsend: 45 3D 31 32 35 36 30 29 |E=12560)|
nspsend: 28 45 4D 46 49 3D 34 29 |(EMFI=4)|
nspsend: 29 29 29 |))) |
....

From: DA Morgan on
Comments in-line.

brhurley(a)gmail.com wrote:
> Background: Fresh install of oracle 10g on WindowsXP for a development
> enviroment. This computer is a laptop that moves between domains/ips.
> I used DBCA to create the database while I was attached to my work IP.
> This instance is setup in a dedicated server mode. Everything worked
> just fine at work but when I got home I could not connect using connect
> <user>/<pass>@devtest returning ORA-12518.
> I can connect using connect <user>/<pass>.
> Here is the related files along with the listener trace.
>
> listener.ora
> ----------------
> LISTENER =
> (DESCRIPTION_LIST =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

Drop LOCALHOST and use the machine name or static IP.

> tnsnames.ora
> -------------
> DEVTEST =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = devtest)
> )
> )

Same here.

Alternatively use NETCA to drop and recreate the listener.
--
Daniel A. Morgan
http://www.psoug.org
damorgan(a)x.washington.edu
(replace x with u to respond)
From: JTommaney on
Is it possible you are picking up a different tnsnames file?
tnsnames.ora references local/1521:
... (HOST = localhost)(PORT = 1521)) ..

The log references this for devtest.
.... HOST=127.0.0.1)(PORT=3711 ...

> host tnsping devtest

should echo back out the tnsnames.ora entry to double check.

From: roar.dale on

JTommaney wrote:
> Is it possible you are picking up a different tnsnames file?
> tnsnames.ora references local/1521:
> .. (HOST = localhost)(PORT = 1521)) ..
>
> The log references this for devtest.
> ... HOST=127.0.0.1)(PORT=3711 ...
>
> > host tnsping devtest
>
> should echo back out the tnsnames.ora entry to double check.

Try to change SID = ..... to SERVICE_NAME = .... in tnsnames.ora