In
sqlplus di
Oracle è possibile visualizzare il nome della
macchina a cui si è
collegati con questa query
PL/SQL:
SELECT host_name FROM v$instance;
che ha un output simile a questo
HOST_NAME
----------------------------------------------------------------
srv-ora-1.dominio.local
Altre informazioni possono essere ricavate con questa query:
select sys_context ( 'USERENV', 'DB_NAME' ) db_name,
sys_context ( 'USERENV', 'SESSION_USER' ) user_name,
sys_context ( 'USERENV', 'SERVER_HOST' ) db_host,
sys_context ( 'USERENV', 'HOST' ) user_host
from dual;
che da come output
DB_NAME
--------------------------------------------------------------------------------
USER_NAME
--------------------------------------------------------------------------------
DB_HOST
--------------------------------------------------------------------------------
USER_HOST
--------------------------------------------------------------------------------
dbsviluppo
nomeutente
srv-ora-1
DOMINIO\COMPUTERNAME