May 18, 2023 at 1:11 am
There is a web-based oa system, it has an IIS application server(OA was deployed on this IIS application server), and IIS application server accesses SQL Server database, there are many online users to use OA system at the same time, is there is a way to detect the sql script from computer A? I know if the c/s system accesses SQL server we can use hostname or ClientProcessID to filter. how to detect the SQL Script from computer A? thanks!
May 18, 2023 at 2:54 am
When you setup the trace in SQLProfiler, be sure to include the TextData and HostName columns. Then, on the Events Selection tab, click on the column name and setup a filter for the exact host name.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 18, 2023 at 9:06 am
Thanks Jeff Moden for you kind help!
but it is a web system, there are many user accessing this system thru Google browser at the same time, and Google browser access IIS application server first (as the web system is deployed on IIS application server), then IIS application server access SQL server, if I use hostname(such as computer A) to filter, the hostname of the SQL Server Profiler only shows the name of IIS application Server's name, so we can't use user's computer name to fiter, if so, is there any way to capture the sql script from my computer? thanks!
May 18, 2023 at 9:15 am
No you cannot get the true end users computer from profiler (or extended events for that matter) as that is not the computer connecting to SQL.
If you want to get the true end users machine, you're going to have to put logging at the IIS level, and not the SQL level.
May 18, 2023 at 8:30 pm
Or you need to include that information in the calls to SQL Server - as in a parameter to a stored procedure (e.g. User, UserID, etc.)
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 19, 2023 at 1:16 am
No you cannot get the true end users computer from profiler (or extended events for that matter) as that is not the computer connecting to SQL.
If you want to get the true end users machine, you're going to have to put logging at the IIS level, and not the SQL level.
if I want to get the true ene users machine, how can I put logging at the IIS level? thank you !
May 19, 2023 at 1:29 am
Or you need to include that information in the calls to SQL Server - as in a parameter to a stored procedure (e.g. User, UserID, etc.)
yes , this is a solution, but sometimes, when using SQL server profiler to trace the running SQL script, it can't the paramter's value, don't know how to get parameter value, thanks!
May 19, 2023 at 1:49 am
Jeffrey Williams wrote:Or you need to include that information in the calls to SQL Server - as in a parameter to a stored procedure (e.g. User, UserID, etc.)
yes , this is a solution, but sometimes, when using SQL server profiler to trace the running SQL script, it can't the paramter's value, don't know how to get parameter value, thanks!
To be honest, I've never seen SQL Profiler miss such things if it's done correctly on the WebServer. When it's not done correctly on the WebServer, there's a real high probability that the code on the WebServer is prone to SQL Injection attacks.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply