Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: return hostname in PL/SQL
Here is what I did just yesterday -
HTH!
DECLARE
CURSOR machine_cur IS
select machine from v$session where program like '%PMON%'; v_Host VARCHAR2(16);
BEGIN
DBMS_OUTPUT.ENABLE(100000);
FOR machine_rec IN machine_cur LOOP
v_Host := machine_rec.machine;
END LOOP;
DBMS_OUTPUT.PUT_LINE(v_Host);
gen_host_env(v_Host);
EXCEPTION
WHEN OTHERS THEN RAISE;
END;
John Dunn wrote:
>
> How can I get hold of the machine hostname via PL/SQL?
>
> John
>
> --
> Author: John Dunn
> INET: john.dunn_at_sefas.co.uk
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- Charlie Mengler Maintenance Warehouse charliem_at_mwh.com 5505 Morehouse Drive 858-552-6229 San Diego, CA 92121 If you don't use vi, then you shouldn't be working on UNIX!Received on Tue May 23 2000 - 07:54:34 CDT
![]() |
![]() |