Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Direct Vs. SQL*net
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') ;
![]() |
![]() |