Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Art S. Kagel — — source: Usenet: comp.databases.informix
On Fri, 05 Dec 2003 09:20:10 -0500, John David Adamski wrote:
> We are on IDS 7.31 on a HPUX machine and have 5 databases and I have some SQL
> that runs in dbaccess on most of them regularly. Its just a report and it
> would be nice to know on the report which database this one was generated.
>
> What is the SQL code that will identify the current database I am running on?
select sqc_currdb
from syssqlcurall
where sqc_sessionid = dbinfo('sessionid');
The VIEW syssqlcurall simplifies a complex query on the sysopendb table.
Art S. Kagel
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.