network name with T-SQL

  • Hi everyone,

    is it possible to know the network name of the computer (user's computer) with T-SQL?

    I want to store this information in a table.

    I'm using sql server 2k

    thanks

    Eric

  • Hello Eric,

    Please check the system table "sysprocesses". You will get the hostname of the machine.

    Thanks and have a nice day!!!


    Lucky

  • thanks a lot, works well!

  • From BOL: (what's an idea to read it time to time! )

    HOST_NAME

    Returns the workstation name.

    Syntax

    HOST_NAME ( )

    Return Types

    nchar

    _____________
    Code for TallyGenerator

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply