March 30, 2009 at 1:23 am
Hi,
is it possible to write a trigger that keep track the database record was updated by which server?
thanks.
March 30, 2009 at 3:01 am
Yes
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2009 at 3:40 am
May I know how to do that? 🙂
March 30, 2009 at 6:48 am
Sure. no problem.
That is, if you can give us some info on the table the trigger's going on, what the trigger needs to do and when, and, if it has to audit or update something else, what that other table looks like.
Currently there's not enough information on what you want for me to say anything other than what I have already.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2009 at 6:55 am
You can use the HOST_NAME() function to retrieve the client name.
If you aren't sure how to create a trigger you can start by reading this article[/url].
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 30, 2009 at 8:55 pm
Thanks for the help of Jack Corbett & GilaMonster.
I used the Host_Name() to detect record modified by which server.
Big thanks again. 😀
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply