Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to "audit" without auditing ?
This view can be created under account internal or sys,
after you can
grant select on sqlsent to <user>;
and select the records accessing by
<user> SQL> select * from sys.sqlsent;
or create a synonym.
<davide_at_yahoo.com> a écrit dans le message news:
9rr6jb$v68ut$1_at_ID-18487.news.dfncis.de...
> 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
>
Received on Thu Nov 01 2001 - 06:58:16 CST
![]() |
![]() |