Solved

SQL Server not response SELECT

Posted on 2004-10-19
3
189 Views
Last Modified: 2012-06-21
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???
0
Comment
Question by:karencita78
3 Comments
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 50 total points
ID: 12352575
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

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question