Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create a log of all updates...
Message
De
11/03/2003 09:51:48
 
 
À
11/03/2003 09:24:17
Eudoxio Junior
Hospital Sao Marcos
Teresina, Brésil
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Sécurité
Divers
Thread ID:
00764180
Message ID:
00764204
Vues:
22
>Hi everyone...
>I've a table that is used as log of updates made in other tables by the users through the applications... Triggers were created in every single table I'd like to have update control... Today I know the moment that a table was modified and who (user) did it... But I also need to know which columns where modified and this is my problem... If I put a UPDATED() statement inside the trigger i think maybe my application will loose performance (because i will fill it with IFs)... Does anybody know how to log changes made in a table and in its columns? Has someone done this yet?
>
>Thankz...

You can use the columns_updated()'s bitmask to get and store a comma delimited list of changed field names into a column in your audit table.

Although, I don't know that this performance will be any faster that a bunch of IF UPDATED() statments since you will have to query the schema. Unless you want to include a comma delimited list of all your fields in your trigger. But, this would add one more maintenance item everytime you change the schema.

BOb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform