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: Capture SQL for selected users

Re: Capture SQL for selected users

From: Steve Howard <stephen.howard_at_us.pwcglobal.com>
Date: 23 Nov 2004 08:42:26 -0800
Message-ID: <6d8b7216.0411230842.3ea5e6b2@posting.google.com>


"ghm" <ghm_at_dslextreme.com> wrote in message news:<10q04gv8apaa8a9_at_corp.supernews.com>...
> Is it possible without creating triggers on every table in my database to
> capture all DDL/DML (excluding SELECT) for selected users? For audit
> purposes, I need to capture the SQL for certain users only.
>
> Thanks in Advance

You could always issue a good ole' SQLTRACE on their session via a login trigger. You could then write their OSPID, logon time, username, etc to a table via the same trigger. This table could also have a BLOB column. On logoff, fire another trigger that loads their trace file (DBMS_LOB.LOADFROMFILE) into the BLOB in the row for their session.

If you ever need it, extract it from the database and run it through tkprof, or whatever. Although you didn't ask, you could also see the SELECT's they did issue. May be messy in any kind of "grouped" login type of application though, but it may work. Just another idea...

Regards,

Steve Received on Tue Nov 23 2004 - 10:42:26 CST

Original text of this message

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