Hi,
I’m doing a database project and I need to make it an auditable system. I
mean, I need to know "the time and the date" when a user inserts a record, o
r
modify it, or delete it in some tables.
I’m working with Visual Studio 2005 and SQL Server 2000.
Any idea about it '
TanksRobe,
How about SQL triggers? You are able to capture when a record is
inserted, updated, or deleted.
You could create another simple history table, that logged that
information for you...just write a few SQL triggers to populate it.
Reuben
Robe wrote:
> Hi,
> I'm doing a database project and I need to make it an auditable system. I
> mean, I need to know "the time and the date" when a user inserts a record,
or
> modify it, or delete it in some tables.
> I'm working with Visual Studio 2005 and SQL Server 2000.
> Any idea about it '
> Tanks|||I have a convention where any table thats holding business
transactions has these additional fields:
Created, CreatedBy, LastUpdated, LastUpdatedBy, blnDeleted
The stored procedures for Add , Update, Delete (Update) use the
variables GetDate() and SYSTEM_USER - thus taking the audit atsk away
from the client application.
I thought about using triggers and a history table, it can store many
more facts, but this works for what we need.
HTH
reuben.ahmed@.gmail.com wrote:
[vbcol=seagreen]
> Robe,
> How about SQL triggers? You are able to capture when a record is
> inserted, updated, or deleted.
> You could create another simple history table, that logged that
> information for you...just write a few SQL triggers to populate it.
> Reuben
> Robe wrote:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment