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.
Author |
Topic |
Peter99
Constraint Violating Yak Guru
498 Posts |
Posted - 2012-07-27 : 11:31:43
|
Hi,I have locking issue on one table.When I issue select count(*) from tablename with (nolock) it works. But when I issue same query without nolock it never finish. I run sp_who2 and activity monitor there are some process that create locks. How to overcome this issue?Thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-07-27 : 12:26:54
|
If you are just looking for row count in the table, you could do this:SELECT row_countFROM sys.dm_db_partition_statsWHERE OBJECT_NAME(OBJECT_ID) = 'YourTableName'; |
|
|
|
|
|