Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Profiler (SQL Server 2000), how to filter only my activities?

We have a big system with several hundred concurrent users so sql profiler gives a bit too much information without appropriate filters. I'd like to see what SQL commands are run under my account and my account only. With account I mean the username I use to log in to the system. These user names are stored in a regular database table and thus can't as such be entered to any filter in sql profiler, I guess? But every user that logs in might have some unique id anyway even thou we all use the same SQL login/user?

So, the question is mostly how to get that unique value and which filter to use? Or is there any way to see this and only this in sql profiler?

like image 822
Micke Avatar asked Dec 18 '09 12:12

Micke


People also ask

How do I select an event in SQL Profiler?

Events Selection tab To view this window, use SQL Server Profiler to open a trace table. Then on the File menu, click Properties, and then click the Events Selection tab.

Which of the following activities can do using SQL Server Profiler?

Use SQL Server Profiler You can capture and save data about each event to a file or table to analyze later. For example, you can monitor a production environment to see which stored procedures are affecting performance by executing too slowly.

Is SQL Server Profiler deprecated?

We are announcing the deprecation of SQL Server Profiler for Database Engine Trace Capture and Trace Replay. These features will be supported in the next version of SQL Server, but will be removed in a later version. The specific version of SQL Server has not been determined.


1 Answers

You should be able to get the hostname of the machine connecting to SQL server. In the Trace Properties/Event Section tab, tick the Show all Columns option then in Column Filters you can specify HostName.

If you want to know the hostname of a machine you are using then at the command prompt type hostname

like image 170
pjp Avatar answered Oct 05 '22 21:10

pjp