September 29, 2010 at 2:26 pm
Can I create a SQL2000 TRIGGER that will capture the HOSTNAME of what Triggered my event?
September 29, 2010 at 2:31 pm
I do not have a SQL 2000 server anymore, but HOST_NAME() will return the hostname of the current connection. If you have an After Insert/Update/Delete and dump it to a table, just add host_name() to the records you write. Also suser_sname() is another good one to log.
September 29, 2010 at 2:33 pm
Thanks, Derrick!
I don't suppose you have a URL handy that shows these in action?
September 29, 2010 at 2:36 pm
Not really...just google for some examples of auditing triggers. Chances are you set up an auditing table for this and then insert key pieces of the data that was changed into it (record id, or whatever else) - in addition to those, just create columns for and insert host_name() and suser_sname().
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply