Re: Vreifying the connection to the database?

From: Ari Kaplan <akaplan_at_psycfrnd.interaccess.com>
Date: 1995/07/26
Message-ID: <3v6h6j$5a8_at_nntp.interaccess.com>#1/1


amit_at_MCS.COM (Amit Srivastava) writes:

>Hi,
> Is there a way to verify which database one is connected to. This
>gets esp. important when you have several local/remote db's. And if you
>are using CONNECT in sqlplus to connect to a db.

>--
> _/_
> __. ____ o /
>(_/|_/ / /_<_<__ |address:amit_at_mcs.com|

Amit,

Try:

SELECT NAME FROM V$DATABASE; This will work even when using db links, which is what I assume your last sentence is about.

For related information which may further help you, look at the V$SESSION view, described on page B-89-91 in the Administrator's Guide. This will show all sessions on the instance, it's operating system id, machine, terminal, program, etc.

Hope this helps!

-Ari Kaplan
akaplan_at_interaccess.com Received on Wed Jul 26 1995 - 00:00:00 CEST

Original text of this message