Path: news.easynews.com!core-easynews!newsfeed1.easynews.com!easynews.com!easynews!newsfeed1.earthlink.net!newsfeed.earthlink.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr17.news.prodigy.com.POSTED!34d3422d!not-for-mail
From: Karsten Farrell <kfarrell@belgariad.com>
Newsgroups: comp.databases.oracle.server,comp.databases.oracle.tools,comp.databases.oracle.misc
Subject: Re: SQL Works but PL/SQL hangs
Message-ID: <MPG.19202a2c34488ce989769@news.la.sbcglobal.net>
References: <8c1ec68c.0305030010.525ac4af@posting.google.com> <6IPsa.2698$MJ5.230@fed1read03> <8c1ec68c.0305042245.6fb7405c@posting.google.com> <8c1ec68c.0305050642.2f83b41a@posting.google.com> <1iu5ad2hko7xh$.coizh83pfhlz$.dlg@40tude.net>
X-Newsreader: MicroPlanet Gravity v2.60
Lines: 36
NNTP-Posting-Host: 67.117.210.172
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr17.news.prodigy.com 1052150376 ST000 67.117.210.172 (Mon, 05 May 2003 11:59:36 EDT)
NNTP-Posting-Date: Mon, 05 May 2003 11:59:36 EDT
Organization: Prodigy Internet http://www.prodigy.com
X-UserInfo1: [[PAPDCA[S@KBUT^AZNX_T\BUSXB@DTMNHWB_EYLJZ]BGIEL_NTKAH_[JTXDX_KI\VB]JBVMS^YT_G[CZVWAOS\DHFWEH]@KGXYHB\_CMDSFABP^J[AHHRKARLE_JDBLJ\XA[JRMEI]MGJSPB\Y]^KG\@S^@VQKI_Q[G@@_ACSARASDEFLBJ]S\GFNTUAVBL
Date: Mon, 05 May 2003 15:59:36 GMT
Xref: core-easynews comp.databases.oracle.server:185321 comp.databases.oracle.tools:58793 comp.databases.oracle.misc:97323
X-Received-Date: Mon, 05 May 2003 08:59:33 MST (news.easynews.com)

chuckh@softhome.net said...
> On 5 May 2003 07:42:47 -0700, Amir wrote:
> 
> > amirrazakhan@hotmail.com (Amir) wrote in message news:<8c1ec68c.0305042245.6fb7405c@posting.google.com>...
> > I think this problem is due to SQL*Net Compatibility. The database
> > link connects the Oracle 8.1.7 to Oracle 7.3.3. Hence the Net8
> > communicate with the SQL*Net ver2. Can u please help me out in this
> > compatibility problem? Thanks.
> > 
> > ~~Amir
> 
> I don't think it's a compatibility problem. Net8 and Sqlnet 2.3 (Oracle
> 7.3.3) should be completely compatible. If you really want to identify why
> the session's hanging, use a 2nd session to look at what it's waiting on
> while it's hanging.
> 
It's true they can communicate with each other ... but the syntax in one 
particular Net8 file (tnsnames.ora) has changed between Oracle7 and 
Oracle8.

Under Oracle7 your entry says "sid=..." and under Oracle8 it probably 
says "service_name=...". For backward compatibility, Net8 works with the 
"sid=..." (at least in 8i; don't know about 9i).

You might want to verify your tnsnames.ora. But I don't know why that 
would cause your app to "hang." You should just get the "cannot resolve 
service_name" error.

Another thing to check is that if your SELECT returns more than one row, 
you can't select it into a scalar variable. You'll need a WHERE clause. 
You should also consider putting an EXCEPTION section in your PL/SQL. I 
understand your sample code was just that ... and not meant to be the 
real code.
-- 
/Karsten
DBA > retired > DBA
