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)
 SQL Locks

Author  Topic 

catparks
Starting Member

18 Posts

Posted - 2004-09-01 : 14:23:31
I have a web-based application that runs on IIS. Each user has a login to the application, but the application uses one username/password to access the database. Frequently, a user will run a query that causes a lock on the database. I can open Enterprise Manager, go to Current Activity, Locks/ProcessID and right click on the spid causing the block and go to properties. The problem is that I can only see the partial SQL statement and I don't know who is actually running the statement. Does anyone have any suggestions on how to figure out what statement is being run?

Thanks,

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-01 : 15:37:50
DBCC INPUTBUFFER(<spidNo>

And that will only show a certain amount of characters as well (I forget the maximum). To see the entire query, you'll need to run SQL Profiler.

Tara
Go to Top of Page
   

- Advertisement -