SQL Server not response SELECT

Hello Experts, I want to verify data in a table that has a few rows, but when I try it with a simple select sentence, SQL Server  not response me. Is the table locked ? What sentence will I use for know what tables are locked???
karencita78Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Scott PletcherConnect With a Mentor Senior DBACommented:
Cancel that SELECT and from QA try this:


SELECT ...
FROM tableName WITH (NOLOCK)
WHERE ...
...


If that works, then the table was locked.  You can use this to find locks:


EXEC sp_lock2  --if it works
EXEC sp_lock  --if sp_lock2 doesn't work

0
All Courses

From novice to tech pro — start learning today.