see answer below
> -----Original Message-----
> From: Reardon, Bruce (CALBBAY)
> [mailto:[EMAIL PROTECTED]]
>
> 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" <[EMAIL PROTECTED]>
> > 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
