Trigger

  • Hi,

    is it possible to write a trigger that keep track the database record was updated by which server?

    thanks.

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • May I know how to do that? 🙂

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • 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].

  • 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