how to obtain a user name from sql server 2005 at run time

  • I need to save the user at run time when it insert or update any field

    How can I do that?

    thanks

    Nelsopn

  • Enable triggers and use Host_Name () function if you are using a Domain login, or use trace to get the login, if this is what you are looking for

    🙂

  • user_name() or suser_sname() might be what you want if you want the account making the change. Host_name is the computer name, if it's sent.

  • beautifull thank you !!!! works

    thanks alot

  • Ops Steve, thats my mistake, that explains to it self that it is a computer name, 😀

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

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