Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create SQL Server users or use Windows users for auditin
Message
 
 
À
10/01/2021 00:12:40
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01677765
Message ID:
01677783
Vues:
46
>>Just for the record, I don't use Triggers to log changes. And as far as viewing the log file - via a VFP report - this feature can be set on/off by the user of the application.
>
>Obviously, different opinions and different approaches out there.
>
>My reason for usually advocating triggers - they are going to fire regardless of what process changed the row. It could be a DBA manually changing some rows, or an overnight ETL process to load data from a legacy system, etc. Many different scenarios where a table could be updated, but the trigger will always fire.

I am sure that triggers can do the job I am doing with my audit trail class. I simply don't know triggers that well and as a result not trust them. It is me, not triggers.
But the class that save the change in the audit file works very well. It saves, who made the change, the time, record number, type of change ("E/D/A"). And it stores the actual change is a specific format that allows me to get the information in the report. Here is an example, of how my class stores the information in one of the fields of the audit table:
cChanges = "<Fld><Name>MyField1</Name><OV>ABC</OV><NV>XZY</NV></Fld><Fld>
<Name>MyField2</Name><OV>123</OV><NV>FHFH</NV></Fld>"
As far as what you said about DBA manually changing some rows. I do not allow DBA (verbally, of course) to make ANY changes to my DB. All changes have to be done from the application.

Thank you for your message.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform