Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the Computer Name from T-SQL

Status
Not open for further replies.

shanegarcia

Programmer
Mar 6, 2001
10
PH
Hi,

I'm writing a trigger that logs updates to the database as part of audit requirements. I can get the SQL Login name of the user who made the changes but I'm also being asked to log the workstation used to perform the update. Is there a way to do this in SQL?

I'm using Windows 2000 and SQL 2000.

Any help would be greatly appreciated.

Thanks!
 
Look at the SQL function HOST_NAME()...
Code:
SELECT HOST_NAME()

-- gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top