For SQL SERVER user

  • Thanks everybody!!!I Have trouble Help ME!!

    1.

    I have to write a procedure or a trigger to

    get the user's ip address who login the SQL SERVER. how cai i do ?

    2.

    How cal i hnow the user login the SQLSERVER

    at once?

  • The wonderword is sp_who. or better master..sysprocesses.

    There you can see the hostname what you can ping to get the IP address. Within whe sysprocesses you can also have the net_address if it helps you



    Bye
    Gabor

  • Some of this is dependent on the user submitting the information, like the Appname. Not sure if the IP falls into this.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    http://www.dkranch.net

  • to :nyulg,Steve Jones

    thank you very match!

    I khnw very pool aobut windows

    I think windows could be hnown who has access and ip adress.

    perhaps the ip store somewhere,but i don't hnow.

    how can i get it?

    sysprocesses can hnow the hostname,use ping hostname get ip and give it to a variable is difficult.

    And the other question id: how can i hnown who login SQL SERVER at once?

  • Also check sp_who2. It shows more info

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

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