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

Home -> Community -> Usenet -> c.d.o.server -> Re: select * from V$SESSION from SQL+ but not application

Re: select * from V$SESSION from SQL+ but not application

From: <sybrandb_at_hccnet.nl>
Date: Sat, 11 Aug 2007 12:20:04 +0200
Message-ID: <t53rb3ldkmupued7ojp2vfmjnbs3jtqgdl@4ax.com>


On Sat, 11 Aug 2007 09:46:07 -0000, dean <deanbrown3d_at_yahoo.com> wrote:

>On Aug 11, 4:51 am, sybra..._at_hccnet.nl wrote:
>> On Sat, 11 Aug 2007 07:19:51 -0000, dean <deanbrow..._at_yahoo.com>
>> wrote:
>>
>> >Hello all,
>>
>> >I can log in to SQL+ as user A and select * from V$SESSION. However,
>> >when I try to do the same thing from an application (logged in as same
>> >user A), I get a table or view does not exist error. The app uses ADO
>> >to connect.
>>
>> >Any idea what the difference could be?
>>
>> >Thanks
>>
>> >Dean
>>
>> >9.2i
>>
>> Why do you need that? Are you aware you can get session information
>> using the SYS_CONTEXT function, without such kludges as described by
>> the other poster?
>>
>> --
>> Sybrand Bakker
>> Senior Oracle DBA
>
>Sybrand - thanks for the tip, it works and I will use it. Are there
>related functions for V$SESSION_EVENT and other OWI views?

I'm not sure about that. However, I agree with Tom Kytes idea, one would better set up 1 account with the required privileges, encapsulate the SQL in functions or even a package, and grant execute on that package to multiple accounts, so as to avoid a plethora of standalone grants *which are not exported as they are grants on SYS objects* to multiple users.

-- 

Sybrand Bakker
Senior Oracle DBA
Received on Sat Aug 11 2007 - 05:20:04 CDT

Original text of this message

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