This is a discussion on track user's select statements within the Oracle Database forums, part of the Database Server Software category; --> Hi: I want to track select statements executed by a user on some tables,any ideas? Thanks for the Help....
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| "cobra" <rock252@126.com> a écrit dans le message de news: 1164172720.050379.308120@h54g2000cwb.googlegroups. com... | Hi: | I want to track select statements executed by a user on some | tables,any ideas? | Thanks for the Help. | Search for AUDIT or FGA (Fine-Grained Auditing) in documentation. http://otn.oracle.com/pls/db102/db102.federated_search Regards Michel Cadot |
| |||
| You could also use the dbms_support package, start_trace_in_session, but this is something to need to do, AUDIT and FGA can be more "triggered" events. On Nov 21, 11:51 pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote: > "cobra" <rock...@126.com> a écrit dans le message de news: 1164172720.050379.308...@h54g2000cwb.googlegroups. com... > | Hi: > | I want to track select statements executed by a user on some > | tables,any ideas? > | Thanks for the Help. > | > > Search for AUDIT or FGA (Fine-Grained Auditing) in documentation. > > http://otn.oracle.com/pls/db102/db102.federated_search > > Regards > Michel Cadot |
| |||
| cobra wrote: > Hi: > I want to track select statements executed by a user on some > tables,any ideas? > Thanks for the Help. What version of Oracle? For what purpose? There are a number of ways to accomplish this depending on version including: Fine Grained Auditing Streams Change Data Capture Log Miner Triggers -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org |
| |||
| On 11月23日, 上午3时18分, DA Morgan <damor...@psoug..org> wrote: > There are a number of ways to accomplish this depending > on version including: > > Fine Grained Auditing > Streams > Change Data Capture > Log Miner > Triggers > -- > Daniel A. Morgan > University of Washington > damor...@x.washington.edu > (replace x with u to respond) > Puget Sound Oracle Users Groupwww.psoug.org thanks The version is Oracle 8.1.7.4, Can Fine-Grained Auditing work? I think trigger is a good idea,but how to track select statements using trigger? I want to track the whole select statement when a user select some columns on a table. |
| ||||
| cobra wrote: > > On 11月23日, 上午3时18分, DA Morgan <damor...@psoug.org> wrote: >> There are a number of ways to accomplish this depending >> on version including: >> >> Fine Grained Auditing >> Streams >> Change Data Capture >> Log Miner >> Triggers >> -- >> Daniel A. Morgan >> University of Washington >> damor...@x.washington.edu >> (replace x with u to respond) >> Puget Sound Oracle Users Groupwww.psoug.org > > thanks > The version is Oracle 8.1.7.4, Can Fine-Grained Auditing work? > I think trigger is a good idea,but how to track select statements using > trigger? > I want to track the whole select statement when a user select some > columns on a table. > The old version of Oracle will limit what you can do. Since you are on Oracle 8.1.7, this precludes FGA, Streams, CDC from being used as those were introduced in later versions. So from the list above, that leaves you with Log Miner and Triggers. However, those are only good for tracking changes to the database and do not capture SELECT statements. In Oracle 8i, your only realistic option is to look towards the SQL Trace facility. For each user, have them turn on tracing: ALTER SESSION SET sql_trace=true; This will generate lots of trace files in your USER_DUMP_DEST directory, so make sure you have plenty of space. HTH, Brian -- ================================================== ================= Brian Peasland dba@nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - Unknown |