SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru MikeBigg's Avatar
    Join Date
    Jun 2004
    Location
    Reading, UK
    Posts
    970
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Accessing server name from within a trigger

    Is it possible to get hold of the server name the db is resident on in an update trigger?

    I'm tracking changes to a table using a trigger on update and would like to add a column in the log table alongside Current_User and Current_TimeStamp that would indicate which server the update was done on.

    Thanks,

    Mike

  2. #2
    SitePoint Guru MikeBigg's Avatar
    Join Date
    Jun 2004
    Location
    Reading, UK
    Posts
    970
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Answering your own question so soon after posting is a bad sign.

    Looks like host_name() will do the trick.

    Mike


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •