On Mon, 17 Mar 1997 08:02:47 +0100, Stefan Weideneder
<stefan@www.weideneder.de> wrote:
>Rick Ward wrote:
>>
>> Can anyone supply me with some SQL to run against Online V7.13, which
>> will return the name of the database this session is currently
>> connected to ?
>>
>> ---
>> Rick Ward
>> Senior DBA
>> Great Universal Stores Home Shopping
>> MANCHESTER, UK
>>
>> All views and comments in this e-mail are expressed by myself only, and
>> are not necessarily representative of my employer, Great Universal
>> Stores.
>
>Hi Rick,
>
>have a look inside your $INFORMIXDIR/etc/sysmaster.sql file. There
>you will find a table called "sysopendb" which contains the
>"odb_sessionid" as well as "odb_dbname" and additional informations
>that you will receive by "onstat -g sql".
>
>Bye
>
>Stefan
>
>PS:
>
>select odb_dbname from sysmaster:syssessions as a,>sysmaster:odb_sessionid as b where
>a.sid = b.odb_sessionid;
>
>
>I gave you "syssessions" just to find out your current program.
This is the sql that runs
select username User, odb_sessionid Ses_ID, odb_dbname DBASE
from syssessions a, sysopendb b
where a.sid = b.odb_sessionid;
Chris Burton
cburton@gte.net