Avatar of chaitu chaitu
chaitu chaituFlag for India asked on

how to find on which query is taking lot of time and also table getting locked

our application is developed in sql server and java.this application will be hit by concurrent users.

we have written somewhat big queries in this application. sometimes tables are getting locked.we want to know during executing which query  this table is getting locked .can we have any option in toad to see these or do we have any queries to see this infornation?
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Jim Horn

8/22/2022 - Mon
plusone3055

im not that familiar with Toad
but you can look at the queries in text and any of the that have (tablock) in them are locking tables

here is a great article from MSDN (not a competing site)
regarding locks
http://msdn.microsoft.com/en-us/library/ms190345.aspx
SOLUTION
plusone3055

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Your help has saved me hundreds of hours of internet surfing.
fblack61