Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 trap

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-12-02 : 08:24:39
shreeman writes "how can i build my own tracer if i am not the administrator.
suppose i want to put a trap on all the users to get the command executed by them using the generated spids? but how can i use fn_get_sql to know the command against the particular spid.
shreeman"

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-12-02 : 12:26:44
SQL Profiler will show you the commands and DBCC INPUTBUFFER will show you part of the command, but you are going to need some permissions for this.

Tara
Go to Top of Page

VyasKN
SQL Server MVP & SQLTeam MVY

313 Posts

Posted - 2003-12-02 : 12:51:18
The following link will show you how to use fn_get_sql, but that'll still require you to be a sysadmin.
http://www.sqlteam.com/redir.asp?ItemID=14856

Why do you want to trace other users' commands, if you are not an administrator of that SQL Server? ;-)

--
HTH,
Vyas
http://vyaskn.tripod.com
Go to Top of Page
   

- Advertisement -