Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Audit command help
On Wed, 10 Mar 2004 16:50:35 -0800, in comp.databases.oracle.server,
Daniel Morgan <damorgan_at_x.washington.edu> scribbled:
>Teresa Redmond wrote:
>
>>>Look up DDL triggers at: http://www.psoug.org/reference/library.html
>>
>>
>> Okay, I've been fiddling with this and here is what I've come up with.
>> I based it on your example:
>>
>> So far, this works. This puts a record into audit_table after I
>> change a value in the atest table. Problem is, the SQL text it puts
>> in the record *is the SQL text from the trigger body*!!! I wanted the
>> SQL text that changed the value in the atest table! GRRRR!!!
>
>You chose the wrong example and then removed its functionality.
>
>Try this one and don't change CREATE OR ALTER OR DROP to UPDATE OR
>DELETE which have absolutely nothing to do with the subject:
Unfortunately I must not have made myself clear; ALTER or DROP were not my question but they were your suggestion. My question was, and has been, about UPDATE and DELETE, and when you suggested the DDL trigger rather than a DML answer (which I haven't found but that is definitely because I haven't looked everywhere yet), I thought you were pointing me in a direction and suggesting that I use my head to figure it out. That has been your style much of the time when you answer here, and I respect that because that's how one learns how to do things.
I hate to do it, but I must very respectfully say that you are wrong. The subject *is* UPDATE or DELETE, and since I'm the one who started the thread on that subject, I believe that I'm in a better position to know what the subject of my question is... which is why I apologize for not having made myself clear. :-(
[snip trigger example]
>
>If you want to audit UPDATE and DELETE then there are numerous
>examples at http://asktom.oracle.com and a schema trigger is
>not the solution.
Well I didn't *think* it was, but since I don't know these things, that's why I come here to research. I'll look again at asktom, thanks for the suggestion.
-- Teresa Redmond Programmer/Analyst III Anteon Corporation tredmond at anteon dot comReceived on Thu Mar 11 2004 - 08:30:20 CST