Solved

SQL Server not response SELECT

Posted on 2004-10-19
3
193 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
connection to SQL 2012 error in windows 10 18 47
SQL Server Error: 4060 8 33
SQL Query 20 22
Sql Query to return all values in Capital letters 2 14
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

739 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