PRO*C - getting the Session ID ?

From: David Barnes <dvb_at_dial.pipex.com>
Date: Tue, 11 Aug 1998 14:32:20 +0100
Message-ID: <35D047E4.276_at_dial.pipex.com>



Is there any OCI lib, SQLLIB, internal variable that I can access in order to
determine the current Oracle connection/session id ? I want to determine whether
a re-call to a PRO*C function is occcuring over the same connection i.e. a EXEC SQL [DIS]/CONNECT has occured ? Currently all I can think of is to
do

b0 = getpid();
EXEC SQL IMMEDIATE "Select SID from v$session WHERE process = :b0"

TIA. Received on Tue Aug 11 1998 - 15:32:20 CEST

Original text of this message