Get Oracle HOST_NAME and SERVICE_NAME via SQL

Problem

  • You need the HOST_NAME and SERVICE_NAME for your database access

Solution

Query HOST_NAME

SELECT host_name FROM v$instance;

Query SERVICE_NAME

SELECT value FROM v$parameter WHERE name like ‘%service_name%’;

Fin.

 

Advertisements