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: tojo <Tojo_at_hotmail.com>
Date: Tue, 1 Jul 2003 16:37:46 +0200
Message-ID: <MPG.196bbb2721a941f698968f@news.t-online.de>


In article <fc071652.0307010551.702b1b7_at_posting.google.com>, seanhennessy_at_eircom.net says...
> 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.
>
> The issue arises because for testing purposes the customer frequently
> rebuilds a backup machine from a copy of the main database. We need to
> be 100% certain which we are connected to before doing any tests.
>
> What's the easiest way to accomplish this given that a) we're not
> getting paid for this so we don't want to expend too much effort and
> b) don't want to compromise security?
>
> Thanks in advance,
> Seán Hennessy
>

Does the owner of the package have select rights to SYS.V$INSTANCE?

Did you include the schema name in your package: SYS.V$INSTANCE, not just V$INSTANCE

Otherwise your package strategy is the way to go IMO.

Received on Tue Jul 01 2003 - 09:37:46 CDT

Original text of this message

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