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: How to "audit" without auditing ?

Re: How to "audit" without auditing ?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 01 Nov 2001 18:54:13 +0000
Message-ID: <3BE19A55.4CF@yahoo.com>


davide_at_yahoo.com wrote:
>
> Ok, I admit that the subject is quite confusing, so I will try to be
> a little clear (at the expenses of to be logorroic): we are developing
> a web application using Dynamo as Application Server, Dynamo uses a
> sort-of internal connection system to talk to an Oracle database.
> Unfortunately, doing this, the developer does not have any clue about
> the "real" SQL instruction sent to the database, just the error (in case)
> returned.
>
> I was asking to find a way to "inspect" the SQL instruction when they are
> received by Oracle.
>
> Now, I know that the V$SQLTEXT view contains some information about the
> last (or almost last) SQL sent, and that view can be connected with
> information from V$SESSION to have some more data related to who
> performed the instruction... but...
>
> When I do the following:
>
> select
> to_char(logon_time,'DD-MM-YYYY HH:mm') as data,
> status,
> sql_text
> from
> v$session sess,
> v$sqltext_with_newlines testo
> where
> sess.SQL_ADDRESS=testo.ADDRESS and
> sess.SQL_HASH_VALUE=testo.HASH_VALUE
> order by sid desc, piece
>
> I receive the data expected (more or less), but if I try to do
> the following:
>
> create view sqlsent as
> select
> .... exactly the same as before
>
> I receive an error:
>
> v$sqltext_with_newlines testo
> *
> ERROR at line 10:
> ORA-00942: table or view does not exist
>
> ?? Why this ?
> There is another way to do the same or any other good idea ?
>
> Davide

Typically v$xxx is just a synonym for sys.v_$xxx. You would need to grant on the genuine object to see it.

hth
connor

-- 
==============================
Connor McDonald

http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue..."
Received on Thu Nov 01 2001 - 12:54:13 CST

Original text of this message

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