Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select events 1

Status
Not open for further replies.

mushin

Programmer
Oct 4, 2000
49
Has anyone ever heard of an "ON SELECT" event or trigger ?
If so, perhaps an example or reference point.

I am trying to trap rows accessed from a view table for audit purposes...........

TIA [sig][/sig]
 
About the closest you can come to what you want is using the SQL Server Profiler (see the BOL topic "events, object"), but it may not give you everything you want.

As discussed in other threads on this topic, the better way is to revoke select permissions on the desired table, and only allow queries via a stored procedure. The SP can then log the operations as part of its nature. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Excellent question and Robert is right. The only way to audit this is: in profiler, through a proc, or though a trigger.

You can filter out enough stuff in profiler to capture the SELECTs. You can store the output of this trace in another table for future querying. If you need more info, you can write an INSERT trigger on your profiler output table to gather even more info...

Thanks,

Tom :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top