Re: why does this guy use dual?

From: BicycleRepairman <>
Date: Fri, 28 Jan 2011 04:36:04 -0800 (PST)
Message-ID: <>

On Jan 27, 8:29 pm, John Hurley <> wrote:
> Joel:
> # have an unnecessary
> use of dual, or am I missing something?
> A new hire to a certain unnamed consulting group?

That's my vote. Since PUBLIC access to UTL_TCP is a 'critical' security policy finding, and access to V$INSTANCE requires additional privileges, why not do it the simple way that anyone with CREATE SESSION can use?
create user test identified by test;
grant create session to test;
connect test/test_at_alias
select sys_context('userenv','server_host') host, sys_context('userenv','instance_name') instance_name, sys_context('userenv','ip_address') ip_address from dual;

HOST                           INSTANCE_NAME
------------------------------ ------------------------------
laptop-1005596                 orcl

I know, it's a lot more typing! Received on Fri Jan 28 2011 - 06:36:04 CST

Original text of this message