Question

we have a table in sqlserver database. There is a windows service which picks up the record from this table where data is null. Process that record and updated current date. This service might have been installed on multiple developer's machine. Is that a way to find list of db users/ machine names where this service is running. If service is running on any of the machine, it is using same database and updating same table.

Was it helpful?

Solution

Open SQL Profiler => Events Selection Tab => Column Filters button.

DatabaseName : Like: "Target DB Name", TextData : Like : "Target Table Name"

Hit Ok. Check: Show all columns => Check BatchCompleted,BatchStarting for HostName Column => Click Run

You'll be able to watch every transaction that is being made on the target table. However, you won't be able to filter by which application is accessing the specified table(I believe Application name is: SqlClient Data Provider ) Unless You've added Application Name="My Application" to the connection string of your application which is a windows service in your case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top