Re: Trigger for audit log
From: Kirk Graves (krgitsoftware_at_yahoo.com)
Date: 03/04/04
- Next message: Eric Sabine: "Re: Trigger for audit log"
- Previous message: Raymond D'Anjou \(raydan\): "Re: How to SET Variable from a Select SQLSTATE 42000 ERROR 107"
- In reply to: E Sullivan: "Trigger for audit log"
- Next in thread: Eric Sabine: "Re: Trigger for audit log"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 4 Mar 2004 12:52:19 -0700
The only way data is going to change in the table is through an Insert,
Update, or Delete (assuming that security is set correctly on the table).
So you should be able to trap all changes to the table in the appropriate
trigger.
Be aware that there is one other way to change the data. Truncate. If a
user Truncates the table, all data is dropped, and no trigger is called, no
Transaction is generated, it is nasty. However, you should have the
database set up so that only your dbo can truncate, and more importantly,
noone is logging into the database as dbo except as specific maintainence
issues require.
Kirk
"E Sullivan" <ellie999nospam@nospamptd.net> wrote in message
news:%23WEONAiAEHA.1468@tk2msftngp13.phx.gbl...
> Hi,
>
> I'm thinking of using a trigger to write to a table whenever data is
changed
> in a table. Since you can get a trigger to work for the insert, update or
> delete statement, is that the only way, through VB code, to make a change
to
> the data in a table?
>
> Thanks,
>
> Ellie
>
>
- Next message: Eric Sabine: "Re: Trigger for audit log"
- Previous message: Raymond D'Anjou \(raydan\): "Re: How to SET Variable from a Select SQLSTATE 42000 ERROR 107"
- In reply to: E Sullivan: "Trigger for audit log"
- Next in thread: Eric Sabine: "Re: Trigger for audit log"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|