Unix Technical Forum

track user's select statements

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....


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 01:50 PM
cobra
 
Posts: n/a
Default track user's select statements

Hi:
I want to track select statements executed by a user on some
tables,any ideas?
Thanks for the Help.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-25-2008, 01:50 PM
Michel Cadot
 
Posts: n/a
Default Re: track user's select statements


"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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-25-2008, 01:51 PM
rhalabicki
 
Posts: n/a
Default Re: track user's select statements

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-25-2008, 01:51 PM
DA Morgan
 
Posts: n/a
Default Re: track user's select statements

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-25-2008, 01:52 PM
cobra
 
Posts: n/a
Default Re: track user's select statements



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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-25-2008, 01:52 PM
Brian Peasland
 
Posts: n/a
Default Re: track user's select statements

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:52 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com