Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
haroon2k9
Constraint Violating Yak Guru
328 Posts |
Posted - 2010-03-05 : 01:21:44
|
| Hi,Good Day to You..Could you please suggest me the Audit trial for best practices of using <b><red>Trigger and Output Clause</red></b> under which scenario to choose what...I have been googling but not find much... |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-05 : 10:11:57
|
| its always better to go for trigger if you want to have more track on code and from maintainability point of view. Using OUTPUT clause and doing it inline will have problem in future when you need to do some changes to main table and dont know where exactly are logic that tracks change of values and do auditing. Keeping audit logic in triggers will help at future stage------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
haroon2k9
Constraint Violating Yak Guru
328 Posts |
Posted - 2010-03-08 : 00:20:54
|
quote: Originally posted by visakh16 its always better to go for trigger if you want to have more track on code and from maintainability point of view. Using OUTPUT clause and doing it inline will have problem in future when you need to do some changes to main table and dont know where exactly are logic that tracks change of values and do auditing. Keeping audit logic in triggers will help at future stage------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Thank you Mr.Visakh.i shall begin to look on Triggers.. |
 |
|
|
|
|
|