Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQL Query to retrieve Server Hostname/IP address

4,067 views
Skip to first unread message

Sawan

unread,
Apr 28, 2009, 6:50:55 AM4/28/09
to
Is there a SQL query to retrieve server full hostname or IP address.

Something like
select current server as server from sysibm.sysdummy1

Thanks.

4.s...@mail.ru

unread,
Apr 28, 2009, 7:42:22 AM4/28/09
to

SELECT HOST_NAME FROM TABLE(SYSPROC.ENV_GET_SYS_INFO()) T

Sincerely,
Mark B.

Sawan

unread,
Apr 28, 2009, 7:54:41 AM4/28/09
to

Thanks. It gives me the hostname, Is there a way to retrieve domain as
well ?

Sawan

unread,
Apr 28, 2009, 7:56:59 AM4/28/09
to

Against z/OS it gives
SQL0104N An unexpected token "<EMPTY>" was found following "".
Expected
tokens may include: "CORRELATION NAME". SQLSTATE=42601

0 new messages