Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Allowing users to see oracle host_name

Re: Allowing users to see oracle host_name

From: Anthony Hogan <ahogan-nospam-_at_iespana.es>
Date: Wed, 02 Jul 2003 09:30:13 +0100
Message-ID: <3F029815.2624C180@iespana.es>


Seán Hennessy wrote:
>
> Hi,
>
> I want to display the host_name of the Oracle server in the 'About'
> box of my application. Of coure only SYS or SYSDBAs have access to
> V$INSTANCE, so a straight select simply won't work for most users. I
> tried to put the select in a package (on the basis that it would then
> run under the permissions of the packages creator), but Oracle
> wouldn't recognise V$INSTANCE.

Hi Seán,
You could try the following:

>create view sys.hostname as select host_name from sys.v$instance;

>grant select on sys.hostname to app_owner;

hth
Anthony Hogan Received on Wed Jul 02 2003 - 03:30:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US