Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Direct Vs. SQL*net

RE: Direct Vs. SQL*net

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Wed, 18 Apr 2001 18:10:37 -0700
Message-ID: <F001.002EC5A6.20010418173054@fatcity.com>

see answer below

> -----Original Message-----
> From: Reardon, Bruce (CALBBAY)
> [mailto:Bruce.Reardon_at_comalco.riotinto.com.au]
>
> Unfortunately this doesn't work for NT.
>
> Under NT using 817, the program field from v$process always
> seems to show
> Oracle.exe.
> Using v$session.program you can determine if a user is using
> svrmgrl but I
> do not know how to
> Also, the terminal and machine fields show the same values.
>
> Is there a solution that will work under NT?
> >
> > ____________________Reply Separator____________________
> > Author: "Charlie Mengler" <charliem_at_mwh.com>
> > Date:       4/18/2001 9:50 AM
> >
> > How can one determine via code (PL/SQL)
> > whether or not the current session is connected
> > "directly" (via the Bequeath protocol) or via
> > SQL*Net?
> >
> > The solution needs to work for both V7 & V8.

I'm not even going to try to write a query that would work under different versions of Oracle on different servers. I doubt that you could find a single query for all versions (unless maybe you use x$ tables.)

Here is the rough idea for a query for Oracle 8.1.7 on Windows NT. It would probably need to be enhanced.

select

   a.sid,
   a.serial#,
   a.username,
   decode (rtrim (substr (b.network_service_banner, 1, 18)),
           'Windows NT TCP/IP', 'SQL*Net',
           'Oracle Bequeath NT', 'Bequeath',
           'Other?'
          ) as connection_method
 from
   v$session a,
   v$session_connect_info b
 where
   a.sid = b.sid
   and rtrim (substr (b.network_service_banner, 1, 18))
       in ('Windows NT TCP/IP', 'Oracle Bequeath NT') ;




Jacques R. Kilchoer
(949) 754-8816
Quest Software, Inc.
8001 Irvine Center Drive
Irvine, California 92618
U.S.A.
http://www.quest.com Received on Wed Apr 18 2001 - 20:10:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US