HowTo find the Servername of a Oracle DB via SQL

Yust for me to remeber..:
SELECT SYS_CONTEXT (‘USERENV’, ‘SERVER_HOST’) FROM DUAL;
SELECT SYS_CONTEXT (‘USERENV’, ‘HOST’) FROM DUAL;
SELECT SYS_CONTEXT (‘USERENV’, ‘IP_ADDRESS’) FROM DUAL;

also try:
SELECT DBMS_UTILITY.PORT_STRING FROM DUAL;
and
SELECT HOST_NAME FROM v$instance;

Leave a Reply

Your email address will not be published. Required fields are marked *

*