Hi Guys,
How can I get the current loged in UserName in windows in MSSQL?
The problem is:
Users login into their PC (Windows Login)
Enter a URL of the intranet application
They would then be able to access the web base application (Intranet)
The web application has a string connection to make a connection to the database
I want to have a Trigger for my "products" table so if the table is modified (Insert/Update) all those changes be entered in "products_Audit" table
Now on "products_Audit" table I have a field "ChangedBy" where I want to store the windows loged in User Name (SYSTEM_USER just return the Username for the SQL connection that the web application use)
I would really appreciate all your help and suggestions.
Regards,
Mehdi
How can I get the current loged in UserName in windows in MSSQL?
The problem is:
Users login into their PC (Windows Login)
Enter a URL of the intranet application
They would then be able to access the web base application (Intranet)
The web application has a string connection to make a connection to the database
I want to have a Trigger for my "products" table so if the table is modified (Insert/Update) all those changes be entered in "products_Audit" table
Now on "products_Audit" table I have a field "ChangedBy" where I want to store the windows loged in User Name (SYSTEM_USER just return the Username for the SQL connection that the web application use)
I would really appreciate all your help and suggestions.
Regards,
Mehdi