In sql server when you get the ipconfig using the cmdshell it returns the ip address of the machine which the database engine is running on.
but I have one sql server engine and multiple users over the network with their own applications, all of their applications are using the sa login, so when they run my sp to get their ipconfig it returns the ip address of the main machine.
how can I take their own ip addresses.
Lets say it's going to give me a record in my log table like;
Date | Time | Login UserName | user ip address
and I don't know how to achieve it.
any help or advice would be helpful and I'm grateful for that,
What I have tried:
I'm reading the cmdshell right now but I still haven't found an answer for it.