"Soeren Degn Jahns" <no****@nospam.dk> wrote in message news:<A5********************@news000.worldonline.d k>...
This is probably a very elementary question. I would like to have an sql
which returns the name of the Oracle server and the current database.
Could anybody help me out?
Server name etc.:
http://www.orafaq.com/scripts/sql/ver.txt
Current database.:
http://www.orafaq.com/scripts/sql/whoami.txt
// Soeren
Richard, you can find the database name in v$database while the
machine name for both the front-end and Oracle session background
processes can be found in v$session. The dynamic performance views,
v$..., are documented in the Oracle version# Reference Manual.
The sys_context function is a handy source of information about the
current session including Oracle username, Os user, Proxy user, IP
address, .... See the SQL Manual.
HTH -- Mark D Powell --